From fbc39f64e0f7c09558a5ce421719b63217c77d7b Mon Sep 17 00:00:00 2001 From: wutianwei Date: Wed, 28 Nov 2018 19:12:02 -0800 Subject: Upgrade spinnaker to suppport helm deploy JIRA: CLOVER-99 1. Upgrade the spinnaker to 1.10.5 from 1.7.0 2. Enable the artifact featuer and add s3 artifact 3. Add the user guide to deploy helm charts. Change-Id: Ic44a88525cc609f3a24d3873b796f064436a57bf Signed-off-by: wutianwei --- .../spinnaker/install/quick-install-spinnaker.yml | 16 +++++- docs/release/configguide/imgs/spinnaker-bake.png | Bin 0 -> 61742 bytes docs/release/configguide/imgs/spinnaker-deploy.png | Bin 0 -> 62381 bytes .../imgs/spinnaker-expected-artifacts.png | Bin 0 -> 37564 bytes .../imgs/spinnaker-produces-artifact.png | Bin 0 -> 17589 bytes .../release/configguide/spinnaker_config_guide.rst | 63 +++++++++++++++++++++ 6 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 docs/release/configguide/imgs/spinnaker-bake.png create mode 100644 docs/release/configguide/imgs/spinnaker-deploy.png create mode 100644 docs/release/configguide/imgs/spinnaker-expected-artifacts.png create mode 100644 docs/release/configguide/imgs/spinnaker-produces-artifact.png diff --git a/clover/spinnaker/install/quick-install-spinnaker.yml b/clover/spinnaker/install/quick-install-spinnaker.yml index 31a2b27..2b19037 100644 --- a/clover/spinnaker/install/quick-install-spinnaker.yml +++ b/clover/spinnaker/install/quick-install-spinnaker.yml @@ -68,6 +68,9 @@ spec: - name: halconfig mountPath: /home/spinnaker/staging/.hal/default/service-settings/fiat.yml subPath: fiat.yml + - name: halconfig + mountPath: /home/spinnaker/staging/.hal/default/service-settings/clouddriver.yml + subPath: clouddriver.yml - name: halconfig mountPath: /home/spinnaker/staging/.hal/default/profiles/front50-local.yml subPath: front50-local.yml @@ -112,11 +115,15 @@ data: host: 0.0.0.0 env: API_HOST: http://spin-gate.spinnaker:8084/ + clouddriver.yml: | + env: + AWS_ACCESS_KEY_ID: dont-use-this + AWS_SECRET_ACCESS_KEY: for-production config: | currentDeployment: default deploymentConfigurations: - name: default - version: 1.7.0 + version: 1.10.5 providers: appengine: enabled: false @@ -211,6 +218,7 @@ data: chaos: false entityTags: false jobs: false + artifacts: true metricStores: datadog: enabled: false @@ -273,6 +281,12 @@ data: http: enabled: false accounts: [] + s3: + enabled: true + accounts: + - name: s3-account + apiEndpoint: http://minio-service.spinnaker:9000 + apiRegion: clover pubsub: google: enabled: false diff --git a/docs/release/configguide/imgs/spinnaker-bake.png b/docs/release/configguide/imgs/spinnaker-bake.png new file mode 100644 index 0000000..86e853a Binary files /dev/null and b/docs/release/configguide/imgs/spinnaker-bake.png differ diff --git a/docs/release/configguide/imgs/spinnaker-deploy.png b/docs/release/configguide/imgs/spinnaker-deploy.png new file mode 100644 index 0000000..44b4e92 Binary files /dev/null and b/docs/release/configguide/imgs/spinnaker-deploy.png differ diff --git a/docs/release/configguide/imgs/spinnaker-expected-artifacts.png b/docs/release/configguide/imgs/spinnaker-expected-artifacts.png new file mode 100644 index 0000000..f8204f7 Binary files /dev/null and b/docs/release/configguide/imgs/spinnaker-expected-artifacts.png differ diff --git a/docs/release/configguide/imgs/spinnaker-produces-artifact.png b/docs/release/configguide/imgs/spinnaker-produces-artifact.png new file mode 100644 index 0000000..ba6ab65 Binary files /dev/null and b/docs/release/configguide/imgs/spinnaker-produces-artifact.png differ diff --git a/docs/release/configguide/spinnaker_config_guide.rst b/docs/release/configguide/spinnaker_config_guide.rst index 433ca3d..a1508f2 100644 --- a/docs/release/configguide/spinnaker_config_guide.rst +++ b/docs/release/configguide/spinnaker_config_guide.rst @@ -238,3 +238,66 @@ Deleting the kubernetes provider in spinnaker: .. code-block:: bash $ cloverctl delete provider kubernetes -n my-kubernetes + +Deploy Helm Charts +================== + +Currently, spinnaker support to deploy applications with the helm chart. More information please refer to `Deploy Helm Charts `_. + +Upload helm charts to artifacts +------------------------------- + +Before doing this, please package the helm chart first. how to package the chart, refer to `helm documentation `_. + +.. code-block:: bash + + $ wget https://dl.minio.io/client/mc/release/linux-amd64/mc + $ chmod +x mc + $ ./mc config host add my_minio http://{minio-service-ip}:9000 dont-use-this for-production S3v4 + $ ./mc mb my_minio/s3-account + $ ./mc cp test-0.1.0.tgz my_minio/s3-account/test-0.1.0.tgz + +**NOTE:** the minio-service-ip is 10.233.21.175 in this example + +Configure Pipeline +------------------ + +This pipeline include three stages,configuration, bake and deploy. + +Configuration stage +::::::::::::::::::: + +We can configure Automated triggers and expected artifacts in this stage. +We just declare expected artifacts and trigger the pipeline manually. + +.. image:: imgs/spinnaker-expected-artifacts.png + :align: center + :scale: 100% + +**NOTE:** We need to enable "Use Default Artifact", when we need trigger the pipeline manually + +Bake Manifest stage +::::::::::::::::::: + +For example, we have a test "Bake(Manifest)" stage below + +.. image:: imgs/spinnaker-bake.png + :align: center + :scale: 100% + +Spinnaker has automatically created an embedded/base64 artifact that is bound when the stage completes, representing the fully baked manifest set to be deployed downstream. + +.. image:: imgs/spinnaker-produces-artifact.png + :align: center + :scale: 100% + +Deploy Manifest stage +::::::::::::::::::::: + +After the chart was baked by helm, we can configure a "Deploy(Manifest)" stage to deploy the manifest produced by previous stage as shown below. + +.. image:: imgs/spinnaker-deploy.png + :align: center + :scale: 100% + +Once this pipeline runs completely, you can see every resource in your Helm chart get deployed. -- cgit 1.2.3-korg