Giter Club home page Giter Club logo

arkade's Introduction

I create independent tools for developers

Hear a bit about my background and why I'm on this journey:

Follow my journey and support my Open Source work

As a GitHub Sponsor, you'll hear from me every week by email - covering my journey building independent software and open source projects. I share about new features, updates, events, tutorials and often share what I've learned from reading and executing every day.

My books

I've been self-publishing books for a year.

Fast track your Go journey

My best-selling book!

  • Learn unit testing and how to isolate dependencies
  • Make lovely CLIs for internal tools and open source projects
  • Monitor your services with Prometheus metrics
  • Ship your code in a container with Docker
  • Learn patterns and pitfalls for using Goroutines

Fast track your Go

๐Ÿ“š My first eBook - Serverless for Everyone Else

Learn the use-cases for serverless functions through practical exercises. You'll deploy your own self-hosted functions, write code in Node.js and using examples will start to call HTTP APIs, add npm modules and understand how to monitor your code with Grafana.

Get the eBook on its own, or upgrade to the video workshop for my expert overview.

Need to contact me?

arkade's People

Contributors

aidun avatar alexellis avatar amalkh5 avatar averagemarcus avatar cpanato avatar davidisa avatar dependabot[bot] avatar developer-guy avatar hwchiu avatar jasonprado avatar jasstkn avatar joebowbeer avatar johannestegner avatar jsiebens avatar kadern0 avatar lucasroesler avatar mrwormhole avatar nikhilsharmawe avatar nitishkumar71 avatar pierrerustorange avatar rgee0 avatar shikachuu avatar squat avatar theykk avatar tuananh avatar tuxtof avatar waterdrips avatar welteki avatar xshyamx avatar yankeexe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arkade's Issues

Build E2E Test suite

It would be useful to have an E2E test solution for:

  • Installing an app (and possibly dependency apps, like for openfaas-ingress) on k3d
  • waiting for it to finish (both using the --wait flag and with a command to verify its up)
  • Checking its configured as expected

We would want to be able to have a framework where we could add a "test manifest" like the app, any flags and overrides, and the expected conditions (possibly a kubectl command that shows that test passed?)

There are a lot of apps and configuration options now, so if we make changes to shared packages its hard to verify every app in every situation.

Expected Behaviour

Create a framework that could spin up kubernetes (k3d?), take some input like app name, flags, and then verify the installation worked and the app is configured as expected (by accepting a list of kubectl commands or something to verify?)

Current Behaviour

Manually testing apps when changes are made by the user raising the PR

Possible Solution

Create a struct to hold the info

type TestDefinition struct {
    TestName string
    AppCommand string
    Flags []string
    Overrides []string
    VerifyCommands []string
}

Then write some test runner that takes a list of these and spins up a new cluster, builds the arkade command and then verifies the install?

Context

Lots of apps, lots of moving parts. This would give us a lot more confidence in changes

Fix --kubeconfig flag priority

The kubeconfig flag on the app install command does not affect the actual kubernetes command execution. The kubernetes command is executed against the default kubeconfig file, not the one passed in via flags.

Expected Behaviour

Passing the kubeconfig flag on the app install command should use that kubeconfig file when installing the app.

Current Behaviour

The kubeconfig variable is only written out, but not utilized:
https://github.com/alexellis/k3sup/blob/master/pkg/cmd/openfaas_app.go#L42

Possible Solution

Since the kubernetes_exec.go file is also in the cmd package, it's possible for the kubectl and kubectlTask functions to look for changes on the flag to get that passed in value. Much the same as the above pasted code from one of the apps.

Steps to Reproduce (for bugs)

  1. k3sup app install openfaas --kubeconfig any/path/to/file
  2. Output will say something like: "Using kubeconfig {the path from above}"
  3. Run kubectl get pods --all-namespaces --kubeconfig /same/path/above
  4. Observe the app was not installed
  5. Run kubectl get pods --all-namespaces (without the kubeconfig)
  6. See the application was installed on the incorrect cluster

Context

I have several k8s cluster set up in various environments for testing. Swapping the config files, or env var is annoying, and really time consuming if I forget before I run the install command.

Your Environment

  • What OS or type or VM are you using? Where is it hosted?
    Linux/ARM
    Desktop (microk8s), GCP, DigitalOcean, Raspberry Pi 3+
  • Operating System and version (e.g. Linux, Windows, MacOS):
    Linux

Print the helm release name, when available

Hey Alex, I believe the tool would be better if it told the user the release it created.

For example at the end of the install, print out something like

<installed_app.name> installed with release name: <installed_app.release>
Happy helming!

PostgreSQL install fails on arm nodes

Trying to install PostgreSQL on a Raspberry Pi cluster doesn't work.

Expected Behaviour

Using a working image or throwing an error to prevent creation of esources in the cluster.

Current Behaviour

It uses the image x86-64:
docker.io/bitnami/postgresql:11.7.0-debian-10-r9

Possible Solution

PostgreSQL ARM images do exist, but they will require some configuration and testing. Until then, an error message should be fine.

Steps to Reproduce (for bugs)

./arkade install postgresql
kubectl get pods
NAME                       READY   STATUS             RESTARTS   AGE
postgresql-postgresql-0    0/1     CrashLoopBackOff   4          3m46s

[Feature Request] Add Jenkins App

@alexellis want to have Jenkins as app in Arkade

Expected Behaviour

Jenkins should be installed to the cluster and should be able to run jobs. In addition it would be nice, if Jenkins could spawn containers as worker nodes.

Possible Solution

  • Jenkins should be install via the https://github.com/helm/charts/tree/master/stable/jenkins helm chart.
  • Jenkins should run in its own namespace
  • There should be proper resource limits for doing a maven build
  • Jenkins should be reachable via LoadBalancer and with admin credentials
  • The Kubernetes integration should be able to deploy applications and manifests to any namespace of the cluster

Error when charts folder already exists (regression)

If you install an app twice arakde will fail.

Expected Behaviour

Arkade should install the app with new parameteres or set the default values.

Current Behaviour

Using kubeconfig: /home/markus/.config/k3d/k3s-default/kubeconfig.yaml
Using helm3
Client: x86_64, Linux
2020/03/11 11:38:35 User dir established as: /home/markus/.arkade/
"jetstack" has been added to your repositories
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "jetstack" chart repository
...Successfully got an update from the "bitnami-redis" chart repository
...Successfully got an update from the "bitnami" chart repository
Update Complete. โŽˆ Happy Helming!โŽˆ 
[Warning] unable to create namespace cert-manager, may already exist: Error from server (AlreadyExists): namespaces "cert-manager" already exists
Error: failed to untar: a file or directory with the name /tmp/charts/cert-manager already exists
Error: exit code 1

Possible Solution

Cleanup the /tmp/charts directory after installation.

Steps to Reproduce (for bugs)

  1. arkade install cert-manager
  2. arkade install cert-manager

Context

Your Environment

  • What arkade version is this?
master branch

Error installing metrics-server

Expected Behaviour

running arkade install metrics-server to install metrics server.

Current Behaviour

arkade install metrics-server
Using kubeconfig: /home/nima/.kube/config
Node architecture: "amd64"
Using helm3
Client: "x86_64", "Linux"
2020/03/21 11:13:30 User dir established as: /home/nima/.arkade/
Error: no repositories found. You must add one before updating
Error: exit code 1

Possible Solution

I believe this is an issue with the help version, not sure though.

Steps to Reproduce (for bugs)

  1. k3sup install to install a k3sup server.
  2. arkade install metrics-server

Context

Trying to install metrics-server.

  • What Kubernetes distribution are you using?
kubectl version
# output:
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-11T18:14:22Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2+k3s1", GitCommit:"cdab19b09a84389ffbf57bebd33871c60b1d6b28", GitTreeState:"clean", BuildDate:"2020-01-27T18:09:26Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}
  • Operating System and version (e.g. Linux, Windows, MacOS):
uname -a
Linux savi-ds 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
  • What arkade version is this?
arkade version
Version: 0.2.0
Git Commit: f2af156fadc052c641aaddaa1282f825f6474de0

[Bug] wait flag on install commands is missing

Every app can implement a --wait flag. The flag is provided by cmd/install.go. The definition of the flag is missing.

Expected Behaviour

Every sub command of install should have the ability to use the --wait flag

Current Behaviour

The commands fail with an error if you provide the flag.

Possible Solution

Provide something similar to this in the install command:

command.PersistentFlags().Bool("wait", false, "Wait for the commands to finish")

Steps to Reproduce (for bugs)

  1. git checkout master
  2. go build
  3. ./arkade install openness --wait

Context

Your Environment

not needed

Add Info message to Grafana-App

Add Info message to Grafana-App

Expected Behaviour

arkade info grafana

Possible Solution

Split Install and Info-Message of the app.

basic auth does not get disabled after enabling it first for openfaas app

Expected Behaviour

We want to disable basic-auth on openfaas when installing it using k3sup. So any request to URL /system/functions can be sent without basic Authorization header.

Current Behaviour

k3sup install is not disabling basic-auth for openfaas app, even after passing the argument to do disable it. It throws error invalid credentials.

Possible Solution

Steps to Reproduce (for bugs)

  1. Download k3sup bash script sudo curl -sLS https://get.k3sup.dev | sh
  2. Install k3sup sudo install k3sup /usr/local/bin/
  3. Run k3sup k3sup install --local --ip 127.0.01 --user ubuntu
  4. Install openfaas application k3sup app install openfaas will install openfaas with basic auth enabled
  5. Again install openfaas application k3sup app install openfaas --basic-auth=false which should disable basic auth
  6. send curl request shown below, which gives error invalid credentials
curl -X POST \
  http://127.0.0.1:31112/system/functions \
  -d '{
    "service": "test-sleep",
    "image": "functions/alpine:latest",
    "network": "func_functions",
    "envProcess": "sleep 5"
}'

Context

Your Environment

  • What Kubernetes distribution are you using (for k3sup app)?
kubectl version

Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2", GitCommit:"59603c6e503c87169aea6106f57b9f242f64df89", GitTreeState:"clean", BuildDate:"2020-01-18T23:30:10Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}

Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2+k3s1", GitCommit:"cdab19b09a84389ffbf57bebd33871c60b1d6b28", GitTreeState:"clean", BuildDate:"2020-01-27T18:09:26Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}

  • What OS or type or VM are you using for your cluster? Where is it hosted? (for k3sup install/join):

  • Operating System and version (e.g. Linux, Windows, MacOS):

uname -a

cat /etc/os-release

Linux ubuntu-02-feb 4.15.0-76-generic alexellis/k3sup#86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

[Feature Request] verify command for each app

It might be useful to have a command that verifies that an app was installed correctly? like looking at the deployments/CRDs and making sure they have started?

Plus we could then setup a load of tests in CI for each app that uses the verify command?

Metrics server uses amd64 image on arm nodes

Expected Behaviour

Check node architecture and use appropriate image. Following images available:

  • metrics-server
  • metrics-server-amd64
  • metrics-server-arm
  • metrics-server-arm64

Current Behaviour

Normal   Pulled     19s (x2 over 37s)  kubelet, master    Container image "gcr.io/google_containers/metrics-server-amd64:v0.3.6" already present on machine
  Normal   Created    19s (x3 over 38s)  kubelet, master    Created container metrics-server
  Normal   Started    19s (x3 over 38s)  kubelet, master    Started container metrics-server
  Warning  BackOff    2s (x6 over 36s)   kubelet, master    Back-off restarting failed container

Possible Solution

Check node architecture and use right image.

Steps to Reproduce (for bugs)

  1. ./arkade install metrics-server --namespace kube-system --helm3
kubectl get pods -n kube-system 
NAME                                      READY   STATUS             RESTARTS   AGE
metrics-server-85774544d5-nn876           0/1     CrashLoopBackOff   6          8m42s

Add --helm3 flag to chart app

Description

Add --helm3 flag to chart app

The arkade install chart command should have helm3 support and use it by default.

Add app for Tekton

Tekton pipelines is a rapidly-growing pipelines service for Kubernetes. It would be a great addition!

Expected Behaviour

n/a

It should install Tekton pipelines and dashboard on the Kubernetes cluster.

Current Behaviour

n/a

Same as above.

Possible Solution

I have made a PR, but I am required to have an issue as well. Alex and I spoke on Twitter, so I made a PR.

Steps to Reproduce (for bugs)

Context

Jekins-X is the first of many enterprise applications to use Tekton. It's heavily supported and had big interest at KubeCon 2019. I think it would be a great addition.

Your Environment

  • What Kubernetes distribution are you using?
kubectl version

v1.17

  • Operating System and version (e.g. Linux, Windows, MacOS):
uname -a

cat /etc/os-release

Ubuntu 18.04 LTS.

  • What arkade version is this?
arkade version

Version: 0.1.11
Git Commit: 1d497d6

Support custom namespaces on app install

Currently 'k3sup app install' command installs everything in the 'default' namespace.

It would be really nice if there was an option '-n,--namespace' that would propagate its value to the actual install command (e.g. helm) so an admin can choose what namespace an app gets installed in.

Download for Windows lacks instructions or usable script

Since Arkade provides a prebuilt binary for Windows, it should be easy to find and download.

The script at https://get-arkade.dev/ (or https://github.com/alexellis/arkade/blob/master/get.sh) is a bash script and will not run on Windows.

Either the main README should include instructions to manually download the right windows binary, or it should include instructions similar to the one to get the linux distribution, but pointing to a windows cmd or PowerShell script instead of a bash script. Maybe something like
curl -sLS https://dl.get-arkade.dev/windows | cmd.exe or
curl -sLS https://dl.get-arkade.dev/windows | powershell

See also openfaas/workshop#174

ark alias conflicts with Ark, the KDE archiving tool

Expected Behaviour

When arkade is installed, my os basic tools should keep working... ;)

Current Behaviour

When arkade is installed, it creates a symlink /usr/local/bin/ark that override the ark utility ( located in /usr/bin/ark) which is used to handle all archive file on KDE desktops (tar, bz, etc.). All gui-based operations on these files are then broken (from the file manager, etc.).

Possible Solution

Avoid creating that alias by default, use a command line argument to create it only when explicitly requested.

[Feature] Download common tools

Download common tools

Expected Behaviour

Download tools like kubectl, kubectx, k9, faas-cli and so forth.

Current Behaviour

helm 2 / 3 and Linkerd are downloaded into ~/.arkade when certain apps are installed.

Possible Solution

Take the approach from the faas-cli -> https://github.com/openfaas/faas-cli/blob/30b7cec9634c708679cf5b4d2884cf597b431401/commands/cloud.go#L155

Steps to Reproduce (for bugs)

Probably something like get should be used instead of install so that there is a separation of concerns between apps and tools.

arkade get kubectx

# Seems a bit long to type
arkade download kubectl

Allow a license file for inlets operator

Expected Behaviour

Provide a license key file location ad a command line flag, the contents of this file should be used as the license.

Current Behaviour

You have to provide a license as a string, which gets printed to the console by arkade

Possible Solution

add a new flag for --license-file which reads the file.

[Feature] Add apps from Weaveworks

Description

I'd like to see the following, if it makes sense on a case-by-case basis:

Anything else from the Weave team?

Minio app - generated secret key might fail to be parsed

If the user doesn't provide --secret-key, one will be generated. With current setup, some special characters might end up in the key and this will fail later on as it won't be parsed properly:

Expected Behaviour

Not failing on parsing the secret-key

Current Behaviour

./arkade install minio
Using kubeconfig: /home/kaderno/.kube/config
Client: x86_64, Linux
2020/03/09 20:37:39 User dir established as: /home/kaderno/.arkade/
Hang tight while we grab the latest from your chart repositories...
...Skip local chart repository
...Successfully got an update from the "stable" chart repository
Update Complete.
Access Key not provided, one will be generated for you
Secret Key not provided, one will be generated for you
Error: failed parsing --set data: key "?wD-QGQpEq8V6O1FT" has no value
Error: exit code 1, stderr: Error: failed parsing --set data: key "?wD-QGQpEq8V6O1FT" has no value
21:04

Possible Solution

I think the easiest and fastest solution is to disable the special characters on the generate.Password function call.

Steps to Reproduce (for bugs)

  1. run ./arkade install minio a few times until the key contains a special character like ','

Changing the function to: password.Generate(40, 10, 0, false, true) will solve the problem.

PR: Update kubernetes dashboard & fix account creation

Kubernetes Dashboard is outdated (current version is 2.0.0-rc2). Also the script fails creating an admin user.

Expected Behaviour

$> k3sup app install kubernetes-dashboard

Current Behaviour

Kubernetes Dashboard 2.0.0-beta6 is installed (an outdated version)

Also current code the admin account & ClusterRoleBinding are failing with these errors:

...
service/dashboard-metrics-scraper unchanged
deployment.apps/dashboard-metrics-scraper configured
error: must specify one of -f and -k
error: must specify one of -f and -k
=======================================================================
= Kubernetes Dashboard has been installed.                                        =
=======================================================================
...

If you try to use the token gotten from the outputs from the installation you cannot see anything in the dashboard, having unauthorized errors all the time.

Possible Solution

I'm gonna create a pull request in order to:

  • Update the kubernetes-dashboard url
  • Remove the automatic creation of the admin user
  • Update the script output to instruct the user how to create an admin user

Steps to Reproduce (for bugs)

  1. Install k3sup
  2. Install kubernetes-dashboard using "k3sup app install kubernetes-dashboard"

Context

Cannot use the installed kubernetes-dashboard , that's all.

Your Environment

  • What Kubernetes distribution are you using (for k3sup app)?
kubectl version
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2", GitCommit:"59603c6e503c87169aea6106f57b9f242f64df89", GitTreeState:"clean", BuildDate:"2020-01-21T22:17:28Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2+k3s1", GitCommit:"cdab19b09a84389ffbf57bebd33Kubernetes Dashboard 2.0.0-beta6 is installed (an outdated version)

871c60b1d6b28", GitTreeState:"clean", BuildDate:"2020-01-27T18:09:26Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}
  • What OS or type or VM are you using for your cluster? Where is it hosted? (for k3sup install/join):

k3sup install & join on a pair of Ubuntu Server 19.10 fresh nodes

  • Operating System and version (e.g. Linux, Windows, MacOS):
uname -a

Linux mypc 5.3.0-26-generic alexellis/k3sup#28-Ubuntu SMP Wed Dec 18 05:37:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/os-release
NAME="Ubuntu"
VERSION="19.10 (Eoan Ermine)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 19.10"
VERSION_ID="19.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=eoan
UBUNTU_CODENAME=eoan

Prevent installation of minio on armhf

Description

Prevent installation of minio on armhf since no images are available at this time upstream.

Solution

Check the way we do this for the Istio app.

"arkade install" fails on Win (Git Bash) due to helm download URL guess?

Hello, I am using arkade on Win10 in Git Bash installed via "choco install git"

WHAT FAILS
arkade install fails because trying to get helm from
https://get.helm.sh/helm-v3.1.1-mingw64_nt-10.0-18362-amd64.tar.gz

REPLICATION

$ uname -a
MINGW64_NT-10.0-18362 username-7480 3.0.7-338.x86_64 2019-11-21 23:07 UTC x86_64 Msys

$ arkade install mongodb
Using kubeconfig: C:\Users\username/.kube/config
Node architecture: "amd64"
Client: "x86_64", "MINGW64_NT-10.0-18362"
2020/04/13 10:16:15 User dir established as: C:\Users\username/.arkade/
https://get.helm.sh/helm-v3.1.1-mingw64_nt-10.0-18362-amd64.tar.gz
2020/04/13 10:16:16 error extracting tarball into C:\Users\username/.arkade/bin/helm3 after 0 files, 0 dirs, 0s: requires gzip-compressed body: gzip: invalid header
Error: unable to add repo exec: "C:\\Users\\username/.arkade/bin/helm3/helm": file does not exist

Am I using wrong distro of Git Bash or startegy to guess helm download URL is not complete? (uname -a abobe)

Thank you

[Feature request] Helm Install without streaming stdout to console

Some helm charts have a really nice output. You have to copy that output to your info message, to make the install and info command work. If you use the install command you get the output two times.

Expected Behaviour

It should be possible to control the output of the helm charts, to make the cli expirience nicer.

Current Behaviour

Possible Solution

Add a option for supressing the output.

Mongodb and PostgreSQL install fails on arm nodes

Trying to install mongodb or PostgreSQL on a Raspberry Pi cluster doesn't work.

Expected Behaviour

Using a working image or throwing an error to prevent creation of all resources in the cluster.

Current Behaviour

It uses the image x86-64:
docker.io/bitnami/mongodb:4.2.4-debian-10-r0
docker.io/bitnami/postgresql:11.7.0-debian-10-r9

Possible Solution

MongoDB and PostgreSQL ARM images do exist, but I assume they will require some configuration and testing. Until then, an error message should be fine.

Steps to Reproduce (for bugs)

arkade install mongodb
 kubectl get pods
NAME                       READY   STATUS   RESTARTS   AGE
mongodb-58bc75c45c-j9vlw   0/1     Error    7          12m
postgresql-postgresql-0    0/1     CrashLoopBackOff   4          3m46s

Install postgresql using arkade

I am trying to install PostgreSQL on my mac using arkade.

Expected Behaviour

arkade install postgresql 
PostgreSQL has been installed. 

Current Behaviour

arkade install postgresql                                                              
Using kubeconfig: /Users/rengonca/.kube/config
Node architecture: ""
Error: only Intel, i.e. PC architecture is supported for this app

Possible Solution

No sure

Steps to Reproduce (for bugs)

1. $ sudo su - 
2. # curl -sLS https://dl.get-arkade.dev | sudo sh
3. # arkade install postgresql

Context

I am trying to install PostSQL

Your Environment

  • What Kubernetes distribution are you using?
~ kubectl version

Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:16:51Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?
  • Operating System and version (e.g. Linux, Windows, MacOS):
~ uname -a
Darwin RENGONCA-M-PP9J 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64

~ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.4
BuildVersion:	19E266
  • What arkade version is this?
~ arkade version
            _             _
  __ _ _ __| | ____ _  __| | ___
 / _` | '__| |/ / _` |/ _` |/ _ \
| (_| | |  |   < (_| | (_| |  __/
 \__,_|_|  |_|\_\__,_|\__,_|\___|

Get Kubernetes apps the easy way

Version: 0.2.2
Git Commit: 9063b6eb16deae5978805f71b0e749828c815490

[Feature Request] Add MetalLB

If running on a set of Raspberry Pis or anywhere that does not provide a loadbalancer, we have to fall back to using host ports for Kubernetes. MetalLB solves this issue by providing a bare metal load balancer implementation, and it works quite nicely I would say. I currently use it on all my clusters without any issues, and it would be great to see it added to Arkade.

The issue I see though, is that they have stopped publishing helm charts and moved to only manifests/kustomize as their officially supported deployment methods.

Please let me know if I can help in any way.

get.sh not creating Alias

The alias should be created by get.sh

There is a naming issue, it was called ALIAS but the script was looking for ALIAS_NAME

PR Incoming

Remove duplication via Go chaining/structs/WithOptions()

Description

There are opportunities to remove duplication between each app through the use of method chaining / fluent APIs and the use of structs or WithOptions().

Chaining:

app := arkade.App{}

app.SetArch("x86_64")
.SetRepo("https://x.com/etc")
.SetNamespace("default")
.SetKubeconfig(kubeconfigPath)

err, helpMessage:= app.Install()

Structs could reduce custom variables and flags parsing:

type App struct {
  ChartRepo string
  ChartName string
}

WithOptions:

containerd has a non-fluent API that is not chained, but passed in via a series of extra args:

chart.Install(arkade.WithArch("x86_64"), arkade.WithOverride("basic-auth", "true"))

At some later point, a manifest file, or a series of manifests could populate this information from an external source, to remove hard-coded paths/variables/flags from the codebase.

[Feature] Add App type to arkade

Add an type App to arkade, to unify the way commands such as install and update interact with apps.

Expected Behaviour

I would suggest an interface in pkg/app:

type App interface {
  Install()
  Verify()
  Info()
}

In addition to this a Helm3-Implementation in pkg/app wich will cover the most apps:

type Helm3App struct {
.... all values needed to install a normal chart
}

In pkg/apps/ I would place a <app-name>.go file which has a Make<app-name>App function. This function should return the static app.

This way you can test the creation of each command with unit tests, this makes it much simpler to make global changes.

In cmd/apps are the final commands and the dynamic parts of the apps should be set.

Current Behaviour

Every command follows ( or not ) a convention. There is no > one way to do it <.

Context

I try to make it easier to implement and test new commands.

Install PostgreSQL on arm64 device

I was trying to run your todo app tutorial on a Pinebook Pro (aarch64, arm64 device) but unfortunately the official postgresql helm chart only supports pc architecture.

Expected Behaviour

PostgreSQL Arm64 is used

Current Behaviour

Arkade exits with an error

Possible Solution

On https://hub.docker.com/r/arm64v8/postgres there seems to exist an arm64 postgresql version - this would be great if it would be supported somehow (new helm chart using this repo)

Steps to Reproduce (for bugs)

  1. Use arm64 device
  2. arkade install postgresql
Node architecture: "arm64"
Error: only Intel, i.e. PC architecture is supported for this app

Context

Doing the Todo App Golang tutorial with k3d on a Pinebook Pro

Your Environment

k3d

kubectl version 1.17
  • Operating System and version (e.g. Linux, Windows, MacOS):
Linux pine 5.6.0-0.42-MANJARO-ARM #1 SMP Sat Mar 14 21:19:14 CET 2020 aarch64 GNU/Linux

NAME="Manjaro-ARM"
ID=manjaro-arm
PRETTY_NAME="Manjaro ARM"
ANSI_COLOR="1;32"
HOME_URL="https://www.manjaro.org/"
SUPPORT_URL="https://forum.manjaro.org/c/manjaro-arm/"

  • What arkade version is this?
0.2.2

Istio installs unsupported version

Expected Behaviour

Applications should install supported versions

Current Behaviour

https://github.com/alexellis/arkade/blob/master/cmd/apps/istio_app.go#L77 and unsupported version of Istio is installed: https://istio.io/news/support/announcing-1.3-eol-final/

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • What Kubernetes distribution are you using?
kubectl version
  • Operating System and version (e.g. Linux, Windows, MacOS):
uname -a

cat /etc/os-release
  • What arkade version is this?
arkade version

Error installing istio app

Hi,
I was attempting to follow Alex's istio blog post, but i'm having issues installing istio.

Current Behaviour

$ arkade install istio --init=true
Using kubeconfig: /Users/user/.kube/config
Node architecture: "amd64"
Client: "x86_64", "Darwin"
2020/04/13 12:39:27 User dir established as: /Users/user/.arkade/
"istio" has been added to your repositories
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "istio" chart repository
...Successfully got an update from the "istio.io" chart repository
...Successfully got an update from the "openfaas" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. โŽˆ Happy Helming!โŽˆ
VALUES
Command: /Users/user/.arkade/bin/helm3/helm [upgrade --install istio-init istio/istio-init --namespace istio-system --wait]
Release "istio-init" does not exist. Installing it now.
NAME: istio-init
LAST DEPLOYED: Mon Apr 13 12:39:31 2020
NAMESPACE: istio-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
VALUES /var/folders/9x/llt3nz1s4bxc5t577hs4_jk57pfg8f/T/istio-values.yaml
Command: /Users/user/.arkade/bin/helm3/helm [upgrade --install istio istio/istio --namespace istio-system --values /var/folders/9x/llt3nz1s4bxc5t577hs4_jk57pfg8f/T/istio-values.yaml]
Release "istio" does not exist. Installing it now.
Error: unable to build kubernetes objects from release manifest: [unable to recognize "": no matches for kind "DestinationRule" in version "networking.istio.io/v1alpha3", unable to recognize "": no matches for kind "attributemanifest" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "handler" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "instance" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "rule" in version "config.istio.io/v1alpha2"]
Error: unable to istio install chart with helm exit code 1, stderr: Error: unable to build kubernetes objects from release manifest: [unable to recognize "": no matches for kind "DestinationRule" in version "networking.istio.io/v1alpha3", unable to recognize "": no matches for kind "attributemanifest" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "handler" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "instance" in version "config.istio.io/v1alpha2", unable to recognize "": no matches for kind "rule" in version "config.istio.io/v1alpha2"]

Steps to Reproduce (for bugs)

  1. kind create cluster
  2. arkade install istio --init=true

arkade.log

Context

Your Environment

  • What Kubernetes distribution are you using?
$ kind version
kind v0.7.0 go1.14 darwin/amd64

$ kubectl get node -o wide
NAME                 STATUS   ROLES    AGE     VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE       KERNEL-VERSION     CONTAINER-RUNTIME
kind-control-plane   Ready    master   8m38s   v1.17.0   172.17.0.2    <none>        Ubuntu 19.10   4.19.76-linuxkit   containerd://1.3.2

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.1", GitCommit:"7879fc12a63337efff607952a323df90cdc7a335", GitTreeState:"clean", BuildDate:"2020-04-10T21:53:51Z", GoVersion:"go1.14.2", Compiler:"gc", Platform:"darwin/amd64"}
Error from server (InternalError): an error on the server ("") has prevented the request from succeeding
  • Operating System and version (e.g. Linux, Windows, MacOS):
$ uname -a
Darwin AR0FVFZX0GEL415 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.4
BuildVersion:	19E266
  • What arkade version is this?
$ arkade version
Version: 0.2.6
Git Commit: 0f49b2b67bb6c7067b4eda6b99cf2fdef93cb54c

add --helm3 to the minio app

Expected Behaviour

we should be able to use helm3 for minio and make it default

Current Behaviour

helm2

Possible Solution

add helm3 using the same pattern as other apps

[Feature] Move lib code from cmd/app/kubernets_exec.go to pkg

Currently app code and lib code is scattered in cmd/apps/kubernetes_exec.go and pkg. This is a bit misleading and should be changed.

Expected Behaviour

All shared code should be placed under pkg.

Current Behaviour

The functions will not be private, they will be public.

Possible Solution

I suggest to move the helm related code to pkg/helm and the Kubernetes related code to pkg/kubernetes.

Based on this there are three possible ways:

  1. keep the old functions in cmd/apps/kubernetes_exec.go as stubs and call from there the new functions.
import "pkg/kubernetes"
func kubectl(....) error {
   return kubernetes.Kubectl(...)
}
  1. keep the old functions in cmd/apps/kubernetes_exec.go and create new ones under pkg/kubernetesand pkg/helm

  2. move complete to the new structure and modify all apps at once.

I would suggest the third solution.

Steps to Reproduce (for bugs)

Context

I try to split the command from the packages to provide a cleaner codebase for further improvments.

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.