armory / minnaker

Spinnaker on Lightweight Kubernetes (K3s)
Apache License 2.0
145 stars 53 forks source link

Unable to install using the docs #108

Open grv18 opened 2 years ago

grv18 commented 2 years ago

I am trying to install spinnaker all in one setup following the instructions. However my install script fails with the below error. When i looked further, it seems that CRDS folder doesn't exist when applying the spinnaker operator.

./scripts/install.sh -o -P $Public_IP
[INFO ] Using OSS Spinnaker
[INFO ] Using OSS Spinnaker
[INFO ] Running minnaker setup for Linux
[INFO ] Cloning repo: https://github.com/armory/spinnaker-kustomize-patches#minnaker into /home/ubuntu/spinnaker/minnaker-0.1.3/spinsvc
[WARN ] /home/ubuntu/spinnaker/minnaker-0.1.3/spinsvc exists already.  FOLDER CONTENTS WILL GET OVERWRITTEN!
[WARN ] PROCEEDING in 3 secs... (ctrl-C to cancel; use -B option to specify a different directory)
Cloning into '/home/ubuntu/spinnaker/minnaker-0.1.3/spinsvc'...
remote: Enumerating objects: 1964, done.
remote: Counting objects: 100% (650/650), done.
remote: Compressing objects: 100% (274/274), done.
remote: Total 1964 (delta 400), reused 548 (delta 356), pack-reused 1314
Receiving objects: 100% (1964/1964), 549.72 KiB | 9.82 MiB/s, done.
Resolving deltas: 100% (1116/1116), done.
[INFO ] Installing yq
[INFO ] Installing jq
[INFO ] Trying to detect endpoint
[INFO ] Using provided public IP A.B.C.D
[INFO ] Generating password [/home/ubuntu/spinnaker/minnaker-0.1.3/spinsvc/secrets/spinnaker_password]:
*****RANDOM***Paswword****
[INFO ] Updating spinsvc templates with new endpoint: A.B.C.D
[INFO ] Creating spin_endpoint helper function
#!/bin/bash
#echo "$(kubectl get spinsvc spinnaker -n spinnaker -ojsonpath='{.spec.spinnakerConfig.config.security.uiSecurity.overrideBaseUrl}')"
echo "$(yq e '.spec.spinnakerConfig.config.security.uiSecurity.overrideBaseUrl' BASE_DIR/expose/patch-urls.yml)"
[[ -f BASE_DIR/secrets/spinnaker_password ]] && echo "username: 'admin'"
[[ -f BASE_DIR/secrets/spinnaker_password ]] && echo "password: '$(cat BASE_DIR/secrets/spinnaker_password)'"
[INFO ] --- Installing K3s ---
[INFO]  Using v1.19.7+k3s1 as release
[INFO]  Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.19.7+k3s1/sha256sum-amd64.txt
[INFO]  Skipping binary downloaded, installed k3s matches hash
[INFO]  Skipping installation of SELinux RPM
[INFO]  Skipping /usr/local/bin/kubectl symlink to k3s, already exists
[INFO]  Skipping /usr/local/bin/crictl symlink to k3s, already exists
[INFO]  Skipping /usr/local/bin/ctr symlink to k3s, already exists
[INFO]  Creating killall script /usr/local/bin/k3s-killall.sh
[INFO]  Creating uninstall script /usr/local/bin/k3s-uninstall.sh
[INFO]  env: Creating environment file /etc/systemd/system/k3s.service.env
[INFO]  systemd: Creating service file /etc/systemd/system/k3s.service
[INFO]  systemd: Enabling k3s unit
Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service.
[INFO]  No change detected so skipping service start
[INFO ]  --- END K3s --- 
[INFO ] Setting Kubernetes context to Spinnaker namespace
Context "default" modified.
[INFO ] Spinnaker Operator Version: 
[INFO ] Spinnaker flavor: oss
[INFO ] Changing spinnaker flavor...Done
[INFO ] Resolved operator namespace: spinnaker-operator
[INFO ] Deploying oss operator...
[INFO ] Downloading operator from https://github.com/armory/spinnaker-operator/releases/download/v/manifests.tgz
[KUBE ] kubectl apply -f /home/ubuntu/spinnaker/minnaker-0.1.3/spinsvc/operator/deploy/crds/
[ERROR] Error executing command:
error: the path "/home/ubuntu/spinnaker/minnaker-0.1.3/spinsvc/operator/deploy/crds/" does not exist[KUBE ] kubectl apply -f https://engineering.armory.io/manifests/pacrd-1.0.1.yaml -n spinnaker
[ERROR] Error executing command:
Warning: apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
Error from server (NotFound): error when creating "https://engineering.armory.io/manifests/pacrd-1.0.1.yaml": namespaces "spinnaker" not found
Error from server (NotFound): error when creating "https://engineering.armory.io/manifests/pacrd-1.0.1.yaml": namespaces "spinnaker" not found
Error from server (NotFound): error when creating "https://engineering.armory.io/manifests/pacrd-1.0.1.yaml": namespaces "spinnaker" not found
Error from server (NotFound): error when creating "https://engineering.armory.io/manifests/pacrd-1.0.1.yaml": namespaces "spinnaker" not found
Error from server (NotFound): error when creating "https://engineering.armory.io/manifests/pacrd-1.0.1.yaml": namespaces "spinnaker" not found
ubuntu@ip-172-31-41-23:~/spinnaker/minnaker-0.1.3$ ls -lrth /home/ubuntu/spinnaker/minnaker-0.1.3/spinsvc/operator/deploy/crds
ls: cannot access '/home/ubuntu/spinnaker/minnaker-0.1.3/spinsvc/operator/deploy/crds': No such file or directory
ubuntu@ip-172-31-41-23:~/spinnaker/minnaker-0.1.3$ 
ubuntu@ip-172-31-41-23:~/spinnaker/minnaker-0.1.3$ cd /home/ubuntu/spinnaker/minnaker-0.1.3/spinsvc/operator
ubuntu@ip-172-31-41-23:~/spinnaker/minnaker-0.1.3/spinsvc/operator$ ls
halyard-local.yml  kustomization.yml  patch-config.yaml  patch-validations.yaml

What am i missing here? Or is this documentation too old to be ignored.

grv18 commented 2 years ago

Intentionally redacted the Public IP and password from the above O/p

jwillmer commented 2 years ago

Same for me.

BoyanStoyanovich commented 2 years ago

Same issue encountered today.

kbatalin commented 1 year ago

There is an error here: https://github.com/armory/spinnaker-kustomize-patches/blob/minnaker/deploy.sh#L90 Right now, you can specify the version directly, eg: SPIN_OP_VERSION=1.2.5 ./scripts/install.sh -o -P $PRIVATE_IP

Use the needed version instead of 1.2.5


An idea on how to fix Replace

aleon1220 commented 1 year ago

./scripts/install.sh -o -P $PRIVATE_IP

I did by using version 1.2.5 and it should work but i get

[INFO ] Cloning repo: https://github.com/armory/spinnaker-kustomize-patches#minnaker into /home/testadmin/minnaker-0.1.3/spinsvc
[WARN ] /home/testadmin/minnaker-0.1.3/spinsvc exists already.  FOLDER CONTENTS WILL GET OVERWRITTEN!
[WARN ] PROCEEDING in 3 secs... (ctrl-C to cancel; use -B option to specify a different directory)
Cloning into '/home/testadmin/minnaker-0.1.3/spinsvc'...
remote: Enumerating objects: 2429, done.
remote: Counting objects: 100% (605/605), done.
remote: Compressing objects: 100% (224/224), done.
remote: Total 2429 (delta 454), reused 409 (delta 377), pack-reused 1824
Receiving objects: 100% (2429/2429), 599.07 KiB | 8.44 MiB/s, done.
Resolving deltas: 100% (1432/1432), done.
Every 2.0s: kubectl get pods,spinsvc -n spinnaker                                                                                                                                 hostname: Tue Jun 20 08:32:28 2023

NAME                                            READY   STATUS             RESTARTS   AGE
pod/redis-cf4c79fc5-mrvrb                       1/1     Running            0          5m38s
pod/pacrd-controller-manager-64759b7f7d-8b7mz   2/2     Running            0          5m37s
pod/opa-deployment-78648c74b9-9cn2l             2/2     Running            0          5m38s
pod/mysql-0                                     1/1     Running            0          5m38s
pod/minio-0                                     0/1     CrashLoopBackOff   5          5m38s

NAME                                      VERSION   LASTCONFIGURED   STATUS   SERVICES   URL
spinnakerservice.spinnaker.io/spinnaker

Some minio issue

testadmin@hostname:~/minnaker-0.1.3$ kubectl -n spinnaker get all -o wide
NAME                                            READY   STATUS             RESTARTS   AGE   IP           NODE       NOMINATED NODE   READINESS GATES
pod/redis-cf4c79fc5-mrvrb                       1/1     Running            0          27m   10.42.0.10   hostname   <none>           <none>
pod/pacrd-controller-manager-64759b7f7d-8b7mz   2/2     Running            0          27m   10.42.0.13   hostname   <none>           <none>
pod/opa-deployment-78648c74b9-9cn2l             2/2     Running            0          27m   10.42.0.9    hostname   <none>           <none>
pod/mysql-0                                     1/1     Running            0          27m   10.42.0.14   hostname   <none>           <none>
pod/minio-0                                     0/1     CrashLoopBackOff   2          34s   10.42.0.16   hostname   <none>           <none>

NAME                                               TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE   SELECTOR
service/minio                                      ClusterIP   10.43.32.28     <none>        9000/TCP   27m   app=minio
service/mysql                                      ClusterIP   10.43.186.157   <none>        3306/TCP   27m   app=mysql
service/opa                                        ClusterIP   10.43.238.66    <none>        8181/TCP   27m   app=opa
service/redis                                      ClusterIP   10.43.120.25    <none>        6379/TCP   27m   app=redis,cluster=redis
service/pacrd-controller-manager-metrics-service   ClusterIP   10.43.236.5     <none>        8443/TCP   27m   control-plane=controller-manager

NAME                                       READY   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS                IMAGES                                                         SELECTOR
deployment.apps/redis                      1/1     1            1           27m   redis                     docker.io/redis:latest                                         app=redis,cluster=redis
deployment.apps/pacrd-controller-manager   1/1     1            1           27m   kube-rbac-proxy,manager   gcr.io/kubebuilder/kube-rbac-proxy:v0.4.1,armory/pacrd:1.0.1   control-plane=controller-manager
deployment.apps/opa-deployment             1/1     1            1           27m   opa,kube-mgmt             openpolicyagent/opa:0.13.1,openpolicyagent/kube-mgmt:0.9       app=opa

NAME                                                  DESIRED   CURRENT   READY   AGE   CONTAINERS                IMAGES                                                         SELECTOR
replicaset.apps/redis-cf4c79fc5                       1         1         1       27m   redis                     docker.io/redis:latest                                         app=redis,cluster=redis,pod-template-hash=cf4c79fc5
replicaset.apps/pacrd-controller-manager-64759b7f7d   1         1         1       27m   kube-rbac-proxy,manager   gcr.io/kubebuilder/kube-rbac-proxy:v0.4.1,armory/pacrd:1.0.1   control-plane=controller-manager,pod-template-hash=64759b7f7d
replicaset.apps/opa-deployment-78648c74b9             1         1         1       27m   opa,kube-mgmt             openpolicyagent/opa:0.13.1,openpolicyagent/kube-mgmt:0.9       app=opa,pod-template-hash=78648c74b9

NAME                     READY   AGE   CONTAINERS   IMAGES
statefulset.apps/mysql   1/1     27m   mysql        mysql:5.7
statefulset.apps/minio   0/1     27m   minio        minio/minio
testadmin@hostname:~/minnaker-0.1.3$ kubectl -n spinnaker logs -f minio-0 
/bin/sh: /usr/bin/minio: No such file or directory