Skip to content

Commit

Permalink
added better openshift instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Turner committed Jun 7, 2017
1 parent 6339e9a commit 83cb0b5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions openshift/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
# Deploy to OpenShift
# OpenShift

## Runtime Setup
TBD
## Build Setup

## Deployment
TBD
Build using the stock NodeJS 4.x image on OpenShift. Simply `Add to Project` and point it
to the latest release version number NOT the head of master. For example, `Source ref: v4`.

## Deployment Setup
After some experimenting the optimal deployment profile for this service is:

```
2 pods or autoscaler 2-4 pods set to 70% CPU trigger
CPU Request: 5 millicores
CPU Limit: 1 core
Memory Request: 100 MiB
Memory Limit: 1 GiB (although we never hit this limit in our testing)
```

### Change Propagation
To promote runtime image from one environment to another, for example from *dev* to *test*, run
Expand All @@ -14,7 +24,5 @@ oc tag <yourprojectname-tools>/mygovbc-captcha-service:latest <yourprojectname-t
```
The above command will deploy the latest/dev runtime image to *test* env. The purpose of tagging runtime image of *test* env in both \<yourprojectname-test\>/mygovbc-captcha-service:latest and \<yourprojectname-tools\>/mygovbc-captcha-service:test is to use \<yourprojectname-tools\>/mygovbc-captcha-service:test as backup such that in case the image stream \<yourprojectname-test\>/mygovbc-captcha-service, which is used by *test* runtime pods, is deleted inadvertently, it can be recovered from \<yourprojectname-tools\>/mygovbc-captcha-service:test.

The command can be setup as a Jenkins task to faciliate using Jenkins to orchestrate deployment of entire application.
The command can be setup as a Jenkins task to facilitate using Jenkins to orchestrate deployment of entire application.

## Tips
To find source code commit point of a runtime instance on OpenShift, open a terminal on one of the running pods and run command `git rev-parse HEAD` in cwd.
Binary file removed openshift/templates/deploy.config.yaml
Binary file not shown.

0 comments on commit 83cb0b5

Please sign in to comment.