deis/workflow-migration

Name: workflow-migration

Owner: Deis

Description: A simple k8s job to migrate workflow from helm-classic to helm

Created: 2016-11-01 17:34:40.0

Updated: 2018-03-01 17:55:02.0

Pushed: 2018-02-27 20:15:07.0

Homepage: null

Size: 38

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

| | Deis Workflow is no longer maintained.
Please read the announcement for more detail. | |—:|—| | 09/07/2017 | Deis Workflow v2.18 final release before entering maintenance mode | | 03/01/2018 | End of Workflow maintenance: critical patches no longer merged | | | Hephy is a fork of Workflow that is actively developed and accepts code contributions. |

Workflow Migration

Deis (pronounced DAY-iss) Workflow is an open source Platform as a Service (PaaS) that adds a developer-friendly layer to any Kubernetes cluster, making it easy to deploy and manage applications on your own servers.

For more information about the Deis Workflow, please visit the main project page at https://github.com/deis/workflow.

We welcome your input! If you have feedback, please submit an issue. If you'd like to participate in development, please read the “Development” section below and submit a pull request.

About

The Workflow Migration service is used to migrate from a helm-classic install of Workflow to Kubernetes Helm without destroying the existing cluster or having any downtime for the apps. It does so by first checking the current install of Workflow and creating a release artifact similar to the one Kubernetes helm creates during an install thereby making Kubernetes Helm think that the current install is actually created by it. Then Workflow can be simply upgraded whenever needed using the Kubernetes Helm charts.

Warning: Only workflow install on or after v2.6.0 can be upgraded using this migration service.

Usage

1) Check that kubernetes helm and its corresponding server component tiller are installed. Be sure that the helm version is v2.1.3 or later because earlier versions have issues that may prevent upgrading successfully.

lm version
nt: &version.Version{SemVer:"v2.1.3", GitCommit:"5cbc48fb305ca4bf68c26eb8d2a7eb363227e973", GitTreeState:"clean"}
er: &version.Version{SemVer:"v2.1.3", GitCommit:"5cbc48fb305ca4bf68c26eb8d2a7eb363227e973", GitTreeState:"clean"}

2) Fetch the registry and controller deployment objects just to make sure that the existing install state can achieved if the deis migration service fails. If you are using the off-cluster registry then there won't be any registry deployment and no need to fetch it. Deis migration service deletes the registry and controller deployment objects because of an issue in kubernetes with the patching.

bectl --namespace=deis get deployment deis-registry -o yaml > ~/active-deis-registry-deployment.yaml
bectl --namespace=deis get deployment deis-controller -o yaml > ~/active-deis-controller-deployment.yaml

3) Run the migration service to create a helm release object based on the current workflow install. If not otherwise specified, the workflow_release_name will be deis-workflow and workflow_version will be v2.7.0.

t clone https://github.com/deis/workflow-migration.git
 workflow-migration
lm install ./charts/workflow-migration/ --set workflow_release_name=<optional release name for the helm>,workflow_version=<optional current version of workflow>

or

lm repo add workflow-migration https://charts.deis.com/workflow-migration
lm install workflow-migration/workflow-migration --set workflow_release_name=<optional release name for the helm>,workflow_version=<optional current version of workflow>

4) Check that the job ran successfully. Also check that helm release is created for the current workflow install using helm list where Name will be the workflow_release_name and chart version will be the workflow_version.

bectl get jobs
                 DESIRED   SUCCESSFUL   AGE
flow-migration   1         1            48s

lm list
             REVISION     UPDATED                    STATUS       CHART
while-oran   1            Wed Nov  1 11:09:34 2016   DEPLOYED     workflow-migration-v1.0.0
-workflow    1            Tue Nov  1 11:09:54 2016   DEPLOYED     workflow-v2.7.0

5) Upgrade to a new workflow release using the kubernetes helm. All the configuration used during install of workflow will be preserved over the update. You can check the configuration before upgrading to the new release.

lm get values <workflow_release_name>  ## will print the configuration values

lm repo add deis https://charts.deis.com/workflow
lm upgrade <workflow_release_name> deis/workflow --version=<desired version>

6) Verify that all components have started and passed their readiness checks:

bectl --namespace=deis get pods
                                     READY     STATUS    RESTARTS   AGE
-builder-2448122224-3cibz            1/1       Running   0          5m
-controller-1410285775-ipc34         1/1       Running   3          5m
-database-e7c5z                      1/1       Running   0          5m
-logger-cgjup                        1/1       Running   3          5m
-logger-fluentd-45h7j                1/1       Running   0          5m
-logger-fluentd-4z7lw                1/1       Running   0          5m
-logger-fluentd-k2wsw                1/1       Running   0          5m
-logger-fluentd-skdw4                1/1       Running   0          5m
-logger-redis-8nazu                  1/1       Running   0          5m
-monitor-grafana-tm266               1/1       Running   0          5m
-monitor-influxdb-ah8io              1/1       Running   0          5m
-monitor-telegraf-51zel              1/1       Running   1          5m
-monitor-telegraf-cdasg              1/1       Running   0          5m
-monitor-telegraf-hea6x              1/1       Running   0          5m
-monitor-telegraf-r7lsg              1/1       Running   0          5m
-nsqd-3yrg2                          1/1       Running   0          5m
-registry-1814324048-yomz5           1/1       Running   0          5m
-registry-proxy-4m3o4                1/1       Running   0          5m
-registry-proxy-no3r1                1/1       Running   0          5m
-registry-proxy-ou8is                1/1       Running   0          5m
-registry-proxy-zyajl                1/1       Running   0          5m
-router-1357759721-a3ard             1/1       Running   0          5m
-workflow-manager-2654760652-kitf9   1/1       Running   0          5m

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.