Skip to content

Commit

Permalink
added instructions for the applier
Browse files Browse the repository at this point in the history
  • Loading branch information
raffaelespazzoli committed Jul 30, 2018
1 parent c033dd5 commit 3e6e4de
Showing 1 changed file with 34 additions and 19 deletions.
53 changes: 34 additions & 19 deletions cucumber-selenium-grid/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A Sample OpenShift Pipeline for a Spring Boot Application
# A Sample OpenShift Pipeline for running integration tests

This example demonstrates how to implement a full end-to-end Jenkins Pipeline for a Java application in OpenShift Container Platform.
On top of the features showed in the [basic spring boot example](https://github.com/redhat-cop/container-pipelines/tree/master/basic-spring-boot), this example shows
Expand All @@ -24,6 +24,39 @@ the main components are:

The following breaks down the architecture of the pipeline deployed, as well as walks through the manual deployment steps

## Deployment tl;dr
```
oc process -f applier/projects/projects.yml | oc apply -f -
oc process openshift//jenkins-ephemeral | oc apply -f- -n todomvc-build
oc env dc/jenkins JENKINS_JAVA_OVERRIDES=-Dhudson.model.DirectoryBrowserSupport.CSP='' INSTALL_PLUGINS=ansicolor:0.5.2 -n todomvc-build
oc new-build --strategy docker --name jenkins-slave-nodejs8 --context-dir cucumber-selenium-grid/nodejs-slave https://github.com/raffaelespazzoli/container-pipelines#selenium -n todomvc-build
oc process -f applier/templates/deployment.yml --param-file=applier/params/deployment-dev | oc apply -f-
oc process -f applier/templates/deployment.yml --param-file=applier/params/deployment-stage | oc apply -f-
oc process -f applier/templates/deployment.yml --param-file=applier/params/deployment-prod | oc apply -f-
oc adm policy add-scc-to-user anyuid -z zalenium -n todomvc-stage
oc process -f applier/templates/selenium-grid.yaml NAMESPACE=todomvc-stage | oc apply -f -
oc process -f applier/templates/build.yml --param-file applier/params/build-dev | oc apply -f-
```
to clean up
```
oc delete project todomvc-build todomvc-dev todomvc-prod todomvc-stage
```

## Automated Quickstart

This quickstart can be deployed quickly using Ansible. Here are the steps.

1. Clone [this repo](https://github.com/redhat-cop/container-pipelines) and the [openshift-applier](https://github.com/redhat-cop/openshift-applier) repo.
2. Log into an OpenShift cluster, then run the following command.
```
$ oc login
$ ansible-playbook -i ./applier/inventory/ /path/to/openshift-applier/playbooks/openshift-cluster-seed.yml
```

At this point you should have 4 projects deployed (`basic-spring-boot-build`, `basic-spring-boot-dev`, `basic-spring-boot-stage`, and `basic-spring-boot-prod`) with our [Spring Rest](https://github.com/redhat-cop/spring-rest) demo application deployed to all 3.

## Project Structure

### OpenShift Templates

The components of this pipeline are divided into two templates.
Expand Down Expand Up @@ -66,24 +99,6 @@ This pipeline defaults to use our [Spring Boot Demo App](https://github.com/redh

## Manual Deployment Instructions

### tl;dr
```
oc process -f applier/projects/projects.yml | oc apply -f -
oc process openshift//jenkins-ephemeral | oc apply -f- -n todomvc-build
oc env dc/jenkins JENKINS_JAVA_OVERRIDES=-Dhudson.model.DirectoryBrowserSupport.CSP='' INSTALL_PLUGINS=ansicolor:0.5.2 -n todomvc-build
oc new-build --strategy docker --name jenkins-slave-nodejs8 --context-dir cucumber-selenium-grid/nodejs-slave https://github.com/raffaelespazzoli/container-pipelines#selenium -n todomvc-build
oc process -f applier/templates/deployment.yml --param-file=applier/params/deployment-dev | oc apply -f-
oc process -f applier/templates/deployment.yml --param-file=applier/params/deployment-stage | oc apply -f-
oc process -f applier/templates/deployment.yml --param-file=applier/params/deployment-prod | oc apply -f-
oc adm policy add-scc-to-user anyuid -z zalenium -n todomvc-stage
oc process -f applier/templates/selenium-grid.yaml NAMESPACE=todomvc-stage | oc apply -f -
oc process -f applier/templates/build.yml --param-file applier/params/build-dev | oc apply -f-
```
to clean up
```
oc delete project todomvc-build todomvc-dev todomvc-prod todomvc-stage
```

### 1. Create Lifecycle Stages

For the purposes of this demo, we are going to create three stages for our application to be promoted through.
Expand Down

0 comments on commit 3e6e4de

Please sign in to comment.