Skip to content

Commit

Permalink
updated readme and templates to use the manager-app image
Browse files Browse the repository at this point in the history
  • Loading branch information
ruromero committed Jan 16, 2018
1 parent 42bf4d0 commit 8ef7361
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 73 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This laboratory is intended to be deployed using [minishift](https://github.com/
* Create a new project `break-fix`
* Create a service account with cluster-admin role
* Deploy the `manager-app` application (see [manager-app](#manager-app)) that will use the previously created service account
* Deploy the `demo-app` (as much as needed) on the `myproject` namespace
* Deploy the `demoapp` on the `demo` namespace (project)

## Getting started
1. Install the latest version of [minishift](https://github.com/minishift/minishift)
Expand Down Expand Up @@ -45,7 +45,7 @@ This laboratory is intended to be deployed using [minishift](https://github.com/
2. Download the add-on and install it

```
$ wget https://github.com/ruromero/devconf/releases/download/v0.1/bf-addons.tar.gz
$ wget https://github.com/ruromero/devconf/releases/download/v1.0/bf-addons.tar.gz
$ tar -xf bf-addons.tar.gz
$ ./minishift addons install bf-addons
Addon 'bf-devconf' installed
Expand Down Expand Up @@ -93,4 +93,4 @@ Each level will break the `demoapp` or some element that will prevent it from be
### The Docker images
The Docker images are also published in Docker Hub
* [ruromero/nodejs-6-oc](https://hub.docker.com/r/ruromero/nodejs-6-oc/): An extension of the base s2i image for nodejs which installs the `oc` client.
* [ruromero/devconf-minion](https://hub.docker.com/r/ruromero/devconf-minion/): A simple image extending [alpine](https://hub.docker.com/_/alpine/) that installs python and executes a simple script that creates an HTTP server to expose a json file which is processed upon deployment.
* [ruromero/manager-app](https://hub.docker.com/r/ruromero/manager-app/): An image extending [ruromero/nodejs-6-oc](https://hub.docker.com/r/ruromero/nodejs-6-oc/) that downloads and builds the source code.
1 change: 0 additions & 1 deletion bf-addons/bf-devconf.addon
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Description: Application to be used in the Break & Fix at Devconf 2018

oc adm new-project break-fix --display-name="Break & Fix"
oc import-image ruromero/nodejs-6-oc --confirm -n openshift
oc new-app -f manager-app-template.yaml -n break-fix
oc adm policy add-cluster-role-to-user cluster-admin -z manager-app -n break-fix
oc adm new-project demo --display-name="Demoapp project"
Expand Down
77 changes: 8 additions & 69 deletions bf-addons/manager-app-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ objects:
kind: ServiceAccount
metadata:
name: ${APP_NAME}
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: ${APP_NAME}
name: ${APP_NAME}
- apiVersion: v1
kind: Service
metadata:
Expand All @@ -38,36 +32,6 @@ objects:
to:
kind: Service
name: ${APP_NAME}
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
app: ${APP_NAME}
name: ${APP_NAME}
spec:
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: ${APP_NAME}:latest
postCommit: {}
resources: {}
runPolicy: Serial
source:
contextDir: ${APP_NAME}
git:
uri: https://github.com/ruromero/devconf
type: Git
strategy:
sourceStrategy:
from:
kind: DockerImage
name: ruromero/nodejs-6-oc:latest
type: Source
triggers:
- type: ConfigChange
- imageChange:
type: ImageChange
- apiVersion: v1
kind: DeploymentConfig
metadata:
Expand All @@ -90,44 +54,14 @@ objects:
containers:
- env:
- name: SCOREBOARD_HOST
value: ${APP_NAME}-scoreboard
value: ${SCOREBOARD_HOST}
- name: SCOREBOARD_PORT
value: ${SCOREBOARD_PORT}
name: ${APP_NAME}
image: ' '
image: ruromero/manager-app:latest
serviceAccountName: ${APP_NAME}
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- ${APP_NAME}
from:
kind: ImageStreamTag
name: ${APP_NAME}:latest
type: ImageChange
- apiVersion: v1
kind: Service
metadata:
labels:
app: ${APP_NAME}
name: ${APP_NAME}-scoreboard
spec:
ports:
- name: scoreboard
port: 3000
targetPort: 3000
selector: {}
- apiVersion: v1
kind: Endpoints
metadata:
name: ${APP_NAME}-scoreboard
subsets:
- addresses:
- ip: ${SCOREBOARD_HOST}
ports:
- name: scoreboard
port: 3000
parameters:
- description: Break & Fix Application name
displayName: Application name
Expand All @@ -138,4 +72,9 @@ parameters:
displayName: Scoreboard APP host
name: SCOREBOARD_HOST
required: true
value: 1.1.1.1
value: 35.204.123.207
- description: Scoreboard application port
displayName: Scoreboard APP port
name: SCOREBOARD_PORT
required: true
value: "8080"
Binary file added extras/hall_of_fame.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8ef7361

Please sign in to comment.