11# Upgrading Workflow
22
3- To upgrade to a newer version of Workflow, run the following:
4-
5- ```
6- $ helmc uninstall workflow-beta4 -n deis
7- $ helmc fetch deis/workflow-rc1
8- $ helmc generate -x manifests workflow-rc1
9- $ cp `helmc home`/workspace/charts/workflow-beta4/manifests/deis-database-secret-creds.yaml \
10- `helmc home`/workspace/charts/workflow-rc1/manifests/
11- $ helmc install workflow-rc1
12- ```
3+ Deis Workflow releases may be upgraded in-place with minimal downtime. This upgrade process requires:
134
14- Make sure to copy the existing ` deis-database-secret-creds.yaml ` manifest into the new chart
15- location * after* ` helmc generate ` to keep database credentials intact.
5+ * Helm Classic, version [ 0.8.0 or newer] ( https://github.com/helm/helm-classic/releases/tag/0.8.0 )
6+ * Configured Off-Cluster Storage
7+ * A copy of the database and builder secrets from your running cluster
8+ * Workflow manifests annotated with ` helm-keep: true ` (rc1 or later)
169
1710## Off-Cluster Storage Required
1811
1912A Workflow upgrade requires using off-cluster object storage, since the default
20- in-cluster storage is ephemeral. Upgrading Workflow with the in-cluster default
21- of [ Minio] [ ] will result in data loss.
13+ in-cluster storage is ephemeral. ** Upgrading Workflow with the in-cluster default
14+ of [ Minio] [ ] will result in data loss.**
2215
2316See [ Configuring Object Storage] [ ] to learn how to store your Workflow data off-cluster.
2417
25- ## Keeping Essential Pieces
18+ ## Keeping Essential Components
2619
2720!!! note
2821 "Keeper" upgrade behavior requires Helm Classic 0.8.0 or newer and the workflow-rc1
2922 or workflow-dev chart.
3023
31- Helm Classic recognizes when a manifest inside a chart is marked as a "keeper" and will leave
32- it alone during ` helmc uninstall ` .
24+ Helm Classic recognizes when a manifest inside a chart is marked as a "keeper"
25+ and will not uninstall the annotated resource during ` helmc uninstall ` .
3326
34- The Workflow Chart marks the "deis" Kubernetes ` Namespace ` and the ` Service ` for the registry
35- and for the router as keepers. This keeps the external ` LoadBalancer ` intact so that routing
36- and DNS are preserved while reinstalling Workflow.
27+ The Workflow Chart marks the "deis" Kubernetes ` Namespace ` and the ` Service `
28+ for the registry and router as keepers. This leaves the external ` LoadBalancer `
29+ intact so routing and DNS are preserved while reinstalling Workflow.
3730
3831To remove Workflow completely from a Kubernetes cluster, run the following:
3932
@@ -45,6 +38,61 @@ $ kubectl delete ns deis # Be sure you want to delete the
4538
4639See the Helm Classic documentation for more detail about [ keeper manifests] .
4740
41+ ## Process
42+
43+ To verify that the namespace, router and registry are marked as "keepers" run the following kubectl command for each component:
44+
45+ ```
46+ $ kubectl --namespace=deis get service deis-router \
47+ --output=go-template='{{ index .metadata.annotations "helm-keep" | println }}'
48+ true
49+ ```
50+
51+ Manifests that are annotated correctly should return the value "true". To add a missing annotation, use ` kubectl annotate ` :
52+
53+ ```
54+ $ kubectl --namespace=deis annotate namespace deis helm-keep=true
55+ namespace "deis" annotated
56+ ```
57+
58+ To upgrade to a newer version of Workflow, run the following:
59+
60+ ```
61+ # update the charts repo
62+ $ helmc update
63+
64+ # fetch your current database credentials
65+ $ kubectl --namespace=deis get secret database-creds -o yaml > ~/active-deis-database-secret-creds.yaml
66+ # fetch the ssh key for the builder component
67+ $ kubectl --namespace=deis get secret builder-ssh-private-keys -o yaml > ~/active-deis-builder-secret-ssh-private-keys.yaml
68+
69+ # fetch new chart
70+ $ helmc fetch deis/workflow-rc1
71+
72+ # update your off-cluster storage configuration
73+ $ $EDITOR $(helmc home)/workspace/charts/workflow-beta4/tpl/generate_params.toml
74+
75+ # generate new templates
76+ $ helmc generate -x manifests workflow-rc1
77+
78+ # copy your active database secrets into the helmc workspace
79+ $ cp ~/active-deis-database-secret-creds.yaml \
80+ $(helmc home)/workspace/charts/workflow-rc1-manifests/deis-database-secret-creds.yaml
81+
82+ # copy your active builder ssh keys into the helmc workspace
83+ $ cp ~/active-deis-builder-secret-ssh-private-keys.yaml \
84+ $(helmc home)/workspace/charts/workflow-rc1/manifests/deis-builder-secret-ssh-private-keys.yaml
85+
86+ # uninstall workflow
87+ $ helmc uninstall workflow-beta4 -n deis
88+
89+ # install workflow rc1
90+ $ helmc install workflow-rc1
91+ ```
92+
93+ Make sure to copy the existing ` deis-database-secret-creds.yaml ` manifest into the new chart
94+ location * after* ` helmc generate ` to keep database credentials intact.
95+
4896[ configuring object storage ] : ../installing-workflow/configuring-object-storage.md
4997[ keeper manifests ] : http://helm-classic.readthedocs.io/en/latest/awesome/#keeper-manifests
5098[ minio ] : https://github.com/deis/minio
0 commit comments