QuickStart Examples

Overview

Although there is no clear-cut migration path for v2 quickstart to v3
quickstart, the following quickstarts are currently available in v3. If you have
an application with a database, rather than using oc new-app to create your
application, then oc new-app again to start a separate database service and
linking the two with common environment variables, you can use one of the
following to instantiate the linked application and database at once, from your
GitHub repository containing your source code. You can list all available
templates with oc get templates -n openshift:

Workflow

Run a git clone of one of the above template URLs locally. Add and commit your
application source code and push a GitHub repository, then start a v3 quickstart
application from one of the templates listed above:

Create a GitHub repository for your application.

Clone a quickstart template and add your GitHub repository as a remote:

You should now have 2 pods running, a web framework pod, and a database pod. The
web framework pod environment should match the database pod environment. You can
list the environment variables with oc set env pod/<pod_name> --list:

DATABASE_NAME is now <DB_SERVICE>_DATABASE

DATABASE_USER is now <DB_SERVICE>_USER

DATABASE_PASSWORD is now <DB_SERVICE>_PASSWORD

DATABASE_ADMIN_PASSWORD is now MONGODB_ADMIN_PASSWORD (only applicable for MongoDB)

If no SOURCE_REPOSITORY_URL is specified, the template will use the template
URL (https://github.com/openshift/<quickstart>-ex) listed above as the
source repository, and a hello-welcome application will be started.

If you are migrating a database, export databases to a dump file and restore the
database in the new v3 database pod. Refer to the steps outlined in
Database
Applications, skipping the oc new-app step as the database pod is already up
and running.