/patchapp

Primary LanguageJavaScript

AutoPatch

Patching tool to assist with exclude maintenance.

Basic Setup

To use a VM, follow the setup instructions from this workshop

Authentication

oc login <openshift-cluster-ip>
oc config view

Create a project

Create a project to house this application:

oc new-project <project-name>

Create an application using this repository.

oc new-app openshift/python-33-centos7:latest~https://github.com/hzgraham/patchapp.git

Then, check the results:

oc get builds -w

Builds

Docker image builds can be initiated by navigating to the "Builds" tab in the V3 web console. Click on the Start Build button for each service.

You can also initiate the builds from the command line:

oc start-build patchapp

Watch the progress:

oc get pods -w

Routing

In order to view the patchapp, you’ll need to expose your service by setting up a Route. The optional --hostname flag allows you to create a custom route to an existing service:

oc expose se/patchapp --hostname=<your-patchapp-hostname>

Make sure this route is addressable from wherever you are running your browser (an /etc/hosts entry in your client may be required).

Excluding the --hostname flag should generate a default route that automatically takes advantage of your cluster’s wildcard DNS (if available):

oc expose se/patchapp

Now, try listing your existing routes:

oc get route

Local Development

Pre-Requisutes

  • python3

  • python3-devel

  • python-virtualenv

Run patchapp locally

The 'run' Makefile target will install application dependencies within a python virtual environment and then run the application.

make run

Cleanup

You can clear out everything in your existing project by running the following:

oc delete all --all
Tip
Be careful to verify that you’re logged into the correct server and project before running this command!