Skip to content

Instantly share code, notes, and snippets.

@BruceZu
Last active December 30, 2016 18:34
Show Gist options
  • Select an option

  • Save BruceZu/bf31f57422fbfa4a0fb2f647a1e8b4f2 to your computer and use it in GitHub Desktop.

Select an option

Save BruceZu/bf31f57422fbfa4a0fb2f647a1e8b4f2 to your computer and use it in GitHub Desktop.

1 Deploying Spinnaker http://www.spinnaker.io/v1.0/docs/creating-a-spinnaker-instance#section-kubernetes Your choice of where to run Spinnaker does not affect your choice of deployment targets, but some of the hosted turn-key solutions are preconfigured to deploy to a limited set of platforms. This can be circumvented by reading how to configure your target deployment environment.

2 configure

3 test it by creating a sample bake and deploy pipeline.

@BruceZu
Copy link
Author

BruceZu commented Dec 29, 2016

1 Configuring Kubernetes
Issue: Did not find the configure file ~/.kube/config

INSTALLATION TARGETS : Kubernetes
Follow the steps

A > Run Spinnaker on Kubernetes but deploy to another platform: Read how to configure it first.
Once your cluster is running, you need to get its authentication details in your local kubeconfig file. Most hosted providers will generate this file for you as a part of the setup process, and place it in ~/.kube/config or /srv/kubernetes/kubeconfig.json on the master node. You can verify that these credentials are working by running kubectl get namespaces.

But it does exist

[root@k8s-09 .kube]# find / -name ".kube"
/home/rzhen/.kube
/root/.kube
[root@k8s-09 .kube]# ls /home/rzhen/.kube/
schema
[root@k8s-09 .kube]# ls /root/.kube/
schema

It is created by kube-up.sh which is not found too

[root@k8s-09 ~]# find / -name kube-up.sh
[root@k8s-09 ~]#

Spinnaker assume
If you'd like to have Spinnaker deploy to and manage applications on Kubernetes, first follow the Kubernetes getting started for setting up a cluster.
I go though the referenced doc and did not find related files like /etc/kubernetes/config and /etc/yum.repos.d/virt7-docker-common-release.repo

B > Assume using Spinnaker installation to manage and deploy other applications to that same Kubernetes cluster.
Make sure you have a running Kubernetes cluster, which is explained in more detail here. The key takeaway is having a kubeconfig file sitting in ~/.kube/config that can authenticate with the cluster you want to deploy Spinnaker to. Once that is all squared away, make sure that running $ kubectl config current-context refers to the cluster you want to have Spinnaker running in. (You may need to update kubectl for the previous command to work).

Either way require the .kube/config

create a default-context according to Link

  kubectl config set-cluster  default-cluster --server=http://localhost:8080
  kubectl config set-context default-context --cluster=default-cluster --user=root

But I do not switch to it. still stay in current-context which is ""

[root@k8s-09 .kube]# pwd
/root/.kube
[root@k8s-09 .kube]# cat config
apiVersion: v1
clusters:
- cluster:
    server: http://localhost:8080
  name: default-cluster
contexts:
- context:
    cluster: default-cluster
    user: root
  name: default-context
current-context: ""
kind: Config
preferences: {}
users: []
  • Configuring your Docker registry
    GCR need pay
    This can be update later if we really need it

  • Configuring Pipeline Storage"
    We have no GCS and AWS credential
    This is related to front50
    # If using storage bucket persistence (gcs or s3), specify the bucket here
    # disable cassandra and enable the storage service below.
    This can be update later if we really need it
    3 where to run

[root@k8s-09 ~]# pwd
/root
[root@k8s-09 ~]# mkdir spinnaker
[root@k8s-09 ~]# cd spinnaker/
[root@k8s-09 spinnaker]# git clone https://github.com/spinnaker/spinnaker.git
Cloning into 'spinnaker'...
< ....>
[root@k8s-09 spinnaker]# cd spinnaker/experimental/kubernetes/simple/
[root@k8s-09 simple]# bash scripts/startup-all.sh
 

Run into issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment