This repository was archived by the owner on Jul 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Issue #5 documented app migration workflow #604
Open
thatdocslady
wants to merge
1
commit into
projectatomic:master
Choose a base branch
from
thatdocslady:issue-5
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| = Migrating your application between OpenShift environments | ||
|
|
||
| :toc: | ||
| :toc-placement!: | ||
|
|
||
| This section describes the process of migrating your application between environments. | ||
|
|
||
| ''' | ||
| toc::[] | ||
| ''' | ||
|
|
||
| == When to migrate the application | ||
|
|
||
| At some point you might need to transfer your application to a different environment. | ||
| For example, in case you want to move from your development environment to a production | ||
| environment, or if you want to make the application available to other developers. | ||
|
|
||
| While you use ADB to develop your application, you define various configuration settings | ||
| that support your application code. When you want to migrate your application, you export | ||
| these settings to a configuration file and deploy it together with the code in the | ||
| new environment. | ||
|
|
||
| This configuration-driven approach allows you to manage each service of your application | ||
| according to its configurations and share these configurations across environments. | ||
|
|
||
| In OpenShift this type of migration is called Application Promotion. For general information about this process, | ||
| see the https://docs.openshift.org/latest/dev_guide/application_lifecycle/promoting_applications.html[Promoting Applications Across Environments] | ||
|
|
||
|
|
||
| == Exporting the application assets from the local environment | ||
|
|
||
| In addition to migrating your application code, you need to export the configuration | ||
| settings to a JSON file. These configuration settings represent metadata of the service, | ||
| such as repository URL, route, build-config, networking, and so on. | ||
|
|
||
| To export the configuration, run the following command for each container or | ||
| service in your application: | ||
|
|
||
| ---- | ||
| oc export is,bc,dc,svc,route -o json > <service-name>.json | ||
| ---- | ||
|
|
||
| The following configuration objects are exported to the configuration file: | ||
|
|
||
| //TODO: Add descriptions of each parameter | ||
|
|
||
| * ImageStream (is) | ||
| * BuildConfig (bc) | ||
| * DeploymentConfig (dc) | ||
| * Service (svc) | ||
| * Route (route) | ||
|
|
||
| //TODO: Need info about the other elements of the JSON file, example https://github.com/jbossdemocentral/coolstore-microservice/blob/master/openshift-templates/sso-service.json | ||
|
|
||
| After you create the configuration file, review the file and make sure that | ||
| any environment-specific settings are represented by variables. | ||
|
|
||
| //TODO: Need example of env-specific variables | ||
|
|
||
| == Preparing the application assets for deployment | ||
|
|
||
| Before you can deploy the application in the new environment, you need to create a | ||
| source-controlled repository with all the application assets. | ||
|
|
||
| Depending on your organizational requirements, you can set up the application containers | ||
| in a single repository or multiple repositories. | ||
|
|
||
| === Single-repository application | ||
|
|
||
| If your application contains one or few services and you want to minimize the number | ||
| of repositories to manage, you can set up the application in a single repository with | ||
| each container or service in a sub-directory. | ||
|
|
||
| You can view the https://github.com/jbossdemocentral/coolstore-microservice[coolstore-microservice] | ||
| application for an example of a single-repository approach. Each service is managed in | ||
| a sub-directory, and the configuration files are stored in a dedicated https://github.com/jbossdemocentral/coolstore-microservice/tree/master/openshift-templates[templates] | ||
| directory. | ||
|
|
||
| === Multi-repository application | ||
|
|
||
| If your application includes many containers or services and you want to | ||
| maximize flexibility in managing them, you can create a repository for each service | ||
| and a parent repository that contains the overall setup of the application. | ||
|
|
||
| You can view the https://github.com/redhat-helloworld-msa[helloworld-msa] application for | ||
| an example of the multi-repository approach. Each service is managed in a separate | ||
| repository along with its configuration file, and the https://github.com/redhat-helloworld-msa/helloworld-msa[helloworld-msa] | ||
| repository contains the global configuration and documentation files. | ||
|
|
||
| == Deploying the application to the new environment | ||
|
|
||
| When you are ready to deploy the application, you need to bootstrap the environment to the | ||
| repository that you created and test the build. You might also need to push or pull the | ||
| image to the new registry. | ||
|
|
||
| //TODO: Need recommended command/examples of this step | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 @thatdocslady, liked the concept of
//TODOfor commenting in asciidoc, great for peer and Tech reviews and for getting inputs from SMEs. I was missing this from Google docs/Word.Btw ran into this page while working on another issue: https://docs.openshift.org/latest/architecture/core_concepts/index.html maybe this could give more information about these elements/ maybe we can link to that doc. HTH.