Skip to content

Commit

Permalink
Prevent installation of apps for arm
Browse files Browse the repository at this point in the history
Certain apps cannot be installed on ARM, why? Because the
authors do not provide support.

k3sup is not about ARM, it's about being able to install any
compatible app to any compatible Kubernetes cluster, with
Intel aka PC aka "normal computers" being the default target
of most cloud software.

cc @pisymbol

Fixes: #198

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Feb 15, 2020
1 parent 180e26c commit 218958a
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 14 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@ kubectl get node

### 🎬 Install an `app` with `k3sup`

Install apps with `k3sup` `>=0.4.0` directly into any Kubernetes cluster, all you need is `kubectl` access.
Install apps with `k3sup` `>=0.4.0` directly **into any Kubernetes cluster**, all you need is `kubectl` access.

You can install [openfaas](https://github.com/openfaas/faas) for Kubernetes in a single command, it will detect whether you're using a Raspberry Pi or a regular computer.

> What does "PC" only mean? It means that you cannot install the app to a computer running an ARM processor. For instance, Istio has no support for ARM, only Intel aka PC.
```sh
# OpenFaaS - microservices and functions for Kubernetes
# PC, RPi and ARM64
Expand All @@ -150,8 +152,8 @@ k3sup app install cert-manager
# PC, RPi and ARM64
k3sup app install nginx-ingress

# docker-registry - host your own registry
k3sup app install docker-registry
# PC only
k3sup app install istio

# docker-registry-ingress - add TLS to your registry and ingress on port 443 and 80
k3sup app install docker-registry-ingress --email example@example.com --domain reg.example.com
Expand All @@ -166,10 +168,9 @@ k3sup app install APP_NAME --help
```

Apps that you can install today:
* openfaas
* `openfaas` / `openfaas-ingress`
* nginx-ingress
* cert-manager
* openfaas-ingress
* inlets-operator
* metrics-server
* tiller
Expand All @@ -181,7 +182,7 @@ Apps that you can install today:
* kubernetes-dashboard
* istio
* crossplane
* docker-registry
* `docker-registry` / `docker-registry-ingress`

Want to request an app? [Raise an issue](https://github.com/alexellis/k3sup/issues) or let me know on [Slack](https://slack.openfaas.io).

Expand Down
8 changes: 7 additions & 1 deletion cmd/apps/istio_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import (
"github.com/spf13/cobra"
)

var IntelArch = "amd64"

func MakeInstallIstio() *cobra.Command {
var istio = &cobra.Command{
Use: "istio",
Expand Down Expand Up @@ -47,6 +49,10 @@ func MakeInstallIstio() *cobra.Command {
arch := getNodeArchitecture()
fmt.Printf("Node architecture: %q\n", arch)

if arch != IntelArch {
return fmt.Errorf(`only Intel, i.e. PC architecture is supported for this app`)
}

userPath, err := config.InitUserDir()
if err != nil {
return err
Expand Down Expand Up @@ -212,4 +218,4 @@ global:

writeTo := path.Join(os.TempDir(), "istio-values.yaml")
return writeTo, ioutil.WriteFile(writeTo, []byte(out), 0600)
}
}
6 changes: 4 additions & 2 deletions cmd/apps/kafkaconnector_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ func MakeInstallKafkaConnector() *cobra.Command {

arch := getNodeArchitecture()
fmt.Printf("Node architecture: %q\n", arch)
if arch != IntelArch {
return fmt.Errorf(`only Intel, i.e. PC architecture is supported for this app`)
}

fmt.Println("Chart path: ", chartPath)

Expand Down Expand Up @@ -139,7 +142,6 @@ func MakeInstallKafkaConnector() *cobra.Command {
return command
}


const KafkaConnectorInfoMsg = `# View the connector's logs:
kubectl logs deploy/kafka-connector -n openfaas -f
Expand All @@ -151,4 +153,4 @@ kubectl logs deploy/kafka-connector -n openfaas -f
const kafkaConnectorInstallMsg = `=======================================================================
= kafka-connector has been installed. =
=======================================================================` +
"\n\n" + KafkaConnectorInfoMsg + "\n\n" + pkg.ThanksForUsing
"\n\n" + KafkaConnectorInfoMsg + "\n\n" + pkg.ThanksForUsing
2 changes: 1 addition & 1 deletion cmd/apps/kubernetes_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func kubectlTask(parts ...string) (execute.ExecResult, error) {
task := execute.ExecTask{
Command: "kubectl",
Args: parts,
StreamStdio: true,
StreamStdio: false,
}

res, err := task.Execute()
Expand Down
6 changes: 5 additions & 1 deletion cmd/apps/linkerd_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ func MakeInstallLinkerd() *cobra.Command {
kubeConfigPath, _ = command.Flags().GetString("kubeconfig")
}
fmt.Printf("Using kubeconfig: %s\n", kubeConfigPath)

arch := getNodeArchitecture()
fmt.Printf("Node architecture: %q\n", arch)
if arch != IntelArch {
return fmt.Errorf(`only Intel, i.e. PC architecture is supported for this app`)
}

userPath, err := getUserPath()
if err != nil {
Expand Down Expand Up @@ -189,4 +193,4 @@ linkerd --help`
var linkerdInstallMsg = `=======================================================================
= Linkerd has been installed. =
=======================================================================` +
"\n\n" + LinkerdInfoMsg + "\n\n" + pkg.ThanksForUsing
"\n\n" + LinkerdInfoMsg + "\n\n" + pkg.ThanksForUsing
6 changes: 3 additions & 3 deletions cmd/apps/tiller_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ func MakeInstallTiller() *cobra.Command {
arch := getNodeArchitecture()
fmt.Printf("Node architecture: %q\n", arch)

if arch != "x86_64" && arch != "amd64" {
return fmt.Errorf("This app is not known to work with the %s architecture", arch)
if arch != IntelArch {
return fmt.Errorf(`only Intel, i.e. PC architecture is supported for this app`)
}

userPath, err := getUserPath()
Expand Down Expand Up @@ -106,4 +106,4 @@ var TillerInfoMsg = `# You can now use helm with tiller from the installation di
var tillerInstallMsg = `=======================================================================
= tiller has been installed. =
=======================================================================` +
"\n\n" + TillerInfoMsg + "\n\n" + pkg.ThanksForUsing
"\n\n" + TillerInfoMsg + "\n\n" + pkg.ThanksForUsing

0 comments on commit 218958a

Please sign in to comment.