Giter VIP home page Giter VIP logo

chpharos's Introduction

Kontena Classic

IMPORTANT! This project is deprecated. Please see Kontena Pharos - The Simple, Solid, Certifified Kubernetes Distribution That Just Works!

Build Status Join the chat at https://slack.kontena.io

Kontena Classic is a developer friendly, open source platform for orchestrating applications that are run on Docker containers. It simplifies deploying and running containerized applications on any infrastructure. By leveraging technologies such as Docker, Container Linux and Weave Net, it provides complete solution for organizations of any size.

Kontena Classic is built to maximize developer happiness; it is designed for application developers and therefore does not require ops teams to setup or maintain. Therefore, it is an ideal choice for organizations without aspiration to configure and maintain scalable Docker container infrastructure.

Kontena Classic Introduction

To accelerate and break barriers for containerized application development, Kontena Classic features some of the most essential technologies built-in such as:

  • Multi-host, multi AZ container orchestration
  • Overlay network technology by Weaveworks
  • Zero-downtime dynamic load balancing
  • Abstraction to describe services running in containers
  • Private Docker image repository
  • Kontena Vault - a secure storage for managing secrets
  • VPN access to backend containers
  • Heroku-like application deployment workflow

Kontena Classic supports any application that can run in a Docker container, and can run on any machine that supports CoreOS. You can run Kontena on the cloud provider of your choice or on your own servers. We hope you enjoy!

Learn more about Kontena:

Getting Started

Please see our Quick Start guide.

Contact Us

Found a bug? Suggest a feature? Have a question? Please submit an issue or email us at [email protected].

Follow us on Twitter: @KontenaInc.

Slack: Join the Kontena Community Slack channel.

License

Kontena Classic software is open source, and you can use it for any purpose, personal or commercial. Kontena is licensed under the Apache License, Version 2.0. See LICENSE for full license text.

chpharos's People

Contributors

jakolehm avatar kke avatar nevalla avatar rarean avatar sh4d1 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

chpharos's Issues

Make the debug flag set curl to verbose

Currently the user will only get something like "download failed" and there's no way to make chpharos display what was happening, for example http redirects failing to some domains when running in an environment requiring a proxy.

Help shows full paths

$ pharos
Usage: /usr/local/bin/pharos [version-number] <sub-command> <sub-command-options>

/usr/local/bin/pharos use [--local] <version>        Set the current Kontena Pharos version
/usr/local/bin/pharos install [--force] <version>    Install Kontena Pharos version
/usr/local/bin/pharos uninstall <version>            Uninstall Kontena Pharos version
/usr/local/bin/pharos current                        Show the current Kontena Pharos version
/usr/local/bin/pharos list                           List installed Kontena Pharos versions
/usr/local/bin/pharos list-remote [--pre]            List remote Kontena Pharos versions available for install
/usr/local/bin/pharos version                        Show pharos and pharos-cluster version

/usr/local/bin/pharos --help                         Show this help
/usr/local/bin/pharos --version                      Show pharos version 0.1.0

/usr/local/bin/pharos cluster                        Manage Kontena Pharos cluster

Publish and cache remote file list online

The function remote_files() contents are supposed to come from some URL.

It's called several times during one run when doing an install, so it should probably be cached locally so it's only downloaded max once per run.

Unknown argument -A when installing pharos

When I execute: chpharos install 1.3.1 I get:

Downloading 'pharos-cluster' (23854176 bytes) from https://get.pharos.sh/versions/download/pharos-cluster-linux-amd64-1.3.1 ..               
###################################################################################################################################### 100.0%
Verifying download SHA256 checksum.. OK                                                                                                      
Downloading 'kubectl' (55400930 bytes) from https://storage.googleapis.com/kubernetes-release/release/v1.11.1/bin/linux/amd64/kubectl ..     
###################################################################################################################################### 100.0%
Verifying download SHA256 checksum.. OK                                                                                                      
Unknown argument -A                                                                                                                          
error: installation failed, use: chpharos list-remote to get a list of available versions.

It is because

[ -d "${version_root}" ] && [ ! -z "$(ls -A "${version_root}")" ] && return 0
uses ls instead of /usr/bin/ls. In my case ls is an alias of exa which does not have a -A option.

Subcommands not found when using non-english locales

Hey,

on ubuntu 16.04 chparos work, but not on 18.04

sam@nb-sam:~ $ chpharos --version
error: unknown subcommand --version
sam@nb-sam:~ $ chpharos login
error: unknown subcommand login
sam@nb-sam: ~ $ set -xv ; chpharos login
set -xv ; chpharos login
+ set -xv
+ chpharos login
+ '[' 1 -eq 0 ']'
+ local subcommand
+ subcommand=_chpharos_subcommand_login
+ subcommand=_chpharos_subcommand_login
+ subcommand=_chpharos_subcommand_login
+ grep --color=auto -q function
+ type _chpharos_subcommand_login
+ _chpharos_error_echo 'unknown subcommand login'
+ echo 'error: unknown subcommand login'
error: unknown subcommand login
+ return 1

I've installed it manuelly via:

mkdir -p ~/.pharos/chpharos && \
  curl -sL https://raw.githubusercontent.com/kontena/chpharos/master/share/chpharos/chpharos.sh > ~/.pharos/chpharos.sh && \
  echo "source ~/.pharos/chpharos.sh" >> ~/.bash_profile

greetings
Sam

Improve http error handling

It's not very elegant right now

$ chpharos install 1.2.
Downloading 'Not' ( bytes) from  ..
curl: (3) <url> malformed
error: installation failed, use: chpharos list-remote to get a list of available versions.

Installation instructions

I ran:

brew install kontena/chpharos/chpharos

but chpharos was not installed, only chpharos-exec

and if I try to run:

$ chpharos-exec -i latest
error: You need to log in. Use: chpharos login
chpharos-exec: installation of version latest failed

I just want to be able to use pharos up -c cluster.yml with some local machines.

shasum not installed CentOS 7

CentOS "shasum" is called "sha{BIT}sum"

  • /usr/bin/sha{BIT}sum
    • alias shasum="/usr/bin/sha{BIT}sum"
  • /usr/bin/openssl sha{BIT}
    • alias shasum="/usr/bin/openssl sha{BIT}"
  • yum install -y perl-Digest-SHA

chpharos/build/generate_download_list.rb

-[name, tempfile.size, `shasum -a 256 #{tempfile.path}`[/[a-f0-9]+/], url].join("|")
+[name, tempfile.size, `sha256sum #{tempfile.path}`[/[a-f0-9]+/], url].join("|")
-[name, tempfile.size, `shasum -a 256 #{tempfile.path}`[/[a-f0-9]+/], url].join("|")
+[name, tempfile.size, `openssl sha256 #{tempfile.path}`[/[a-f0-9]+/], url].join("|")

installing pharos on debian docker fails due to shasum verification failed error

Source:

# using ubuntu:16.04, ubuntu:18.04, centos:latest all give same error
FROM debian

ENV CHPHAROS_TOKEN

WORKDIR /pharos

RUN apt-get update -y
RUN apt-get install -y curl
RUN curl -s https://get.pharos.sh | bash
RUN ln /usr/bin/sha1sum /usr/bin/shasum
RUN /bin/bash -c "source /usr/local/share/chpharos/chpharos.sh"
RUN source /usr/local/share/chpharos/chpharos.sh
# Fails
RUN chpharos install 1.3.3

Error:

...
Downloading 'pharos-cluster' (23899608 bytes) from https://get.pharos.sh/versions/download/pharos-cluster-linux-amd64-1.3.3 ..
######################################################################## 100.0%
Verifying download SHA256 checksum.. error: checksum verification failed
error: installation failed, use: chpharos list-remote to get a list of available versions.

sha files:

root@dd04f504a65d:/pharos# ls -lart /usr/bin/sha*
-rwxr-xr-x 2 root root 47976 Feb 22  2017 /usr/bin/shasum
-rwxr-xr-x 1 root root 60264 Feb 22  2017 /usr/bin/sha512sum
-rwxr-xr-x 1 root root 60264 Feb 22  2017 /usr/bin/sha384sum
-rwxr-xr-x 1 root root 56168 Feb 22  2017 /usr/bin/sha256sum
-rwxr-xr-x 1 root root 56168 Feb 22  2017 /usr/bin/sha224sum
-rwxr-xr-x 2 root root 47976 Feb 22  2017 /usr/bin/sha1sum
shasum: (does not have "-a" option)

root@dd04f504a65d:/pharos# shasum --version
sha1sum (GNU coreutils) 8.26
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Ulrich Drepper, Scott Miller, and David Madore.
root@dd04f504a65d:/pharos# shasum --help
Usage: shasum [OPTION]... [FILE]...
Print or check SHA1 (160-bit) checksums.

With no FILE, or when FILE is -, read standard input.

  -b, --binary         read in binary mode
  -c, --check          read SHA1 sums from the FILEs and check them
      --tag            create a BSD-style checksum
  -t, --text           read in text mode (default)

The following five options are useful only when verifying checksums:
      --ignore-missing  don't fail or report status for missing files
      --quiet          don't print OK for each successfully verified file
      --status         don't output anything, status code shows success
      --strict         exit non-zero for improperly formatted checksum lines
  -w, --warn           warn about improperly formatted checksum lines

      --help     display this help and exit
      --version  output version information and exit

The sums are computed as described in FIPS-180-1.  When checking, the input
should be a former output of this program.  The default mode is to print a
line with checksum, a space, a character indicating input mode ('*' for binary,
' ' for text or where binary is insignificant), and name for each FILE.

GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Report sha1sum translation bugs to <http://translationproject.org/team/>
Full documentation at: <http://www.gnu.org/software/coreutils/sha1sum>
or available locally via: info '(coreutils) sha1sum invocation'

Solution 1

Update /usr/local/share/chpharos/chpharos.sh and replace 'shasum -a' with 'sha256sum'

Solution 2

Download directly a specific version via this command:

curl -X GET -o ./pharos $(curl -X GET https://get.pharos.sh/versions/download/pharos-cluster-linux-amd64-1.3.3 -k --header "Authorization: Bearer $TOKEN")

where TOKEN is located in ~/.chpharosrc (after you successfully login)

Support FISH Shell

I try to run:

brew install kontena/chpharos/chpharos
source /usr/local/opt/chpharos/share/chpharos/chpharos.sh

and I get the following error after trying to source the file:

/usr/local/opt/chpharos/share/chpharos/chpharos.sh (line 195): Expected end of the statement, but instead found a redirection
if command -v compgen &> /dev/null; then
                       ^
from sourcing file /usr/local/opt/chpharos/share/chpharos/chpharos.sh
	called on standard input

source: Error while reading file '/usr/local/opt/chpharos/share/chpharos/chpharos.sh'

Fish Shell: https://fishshell.com/

Download/install should support multi-binary installations

Something like this should be possible:

$ pharos install 1.1.6
Installed pharos-cluster 1.1.6
Installed kubeadm 1.10.7
$ pharos use 1.1.6
$ pharos kubeadm ....

(Distributing / linking to other binaries may be problematic in license sense)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.