Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment of Hygieia to OpenShift #135

Merged
merged 36 commits into from
Dec 20, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
776bdb4
Initial commit, with project setup and role assignments
etsauer Oct 24, 2018
5b720d4
Adding some of the builds/deplos to applier
etsauer Oct 26, 2018
38cbaf3
Update task list
etsauer Oct 26, 2018
3b045fd
Add Tom George to the list of admins in rbac
tomgeorge Oct 26, 2018
2e7aa6a
Scoping everythign to hygieia namespace
etsauer Oct 31, 2018
dd8d431
Docing and cleanup
etsauer Oct 31, 2018
46feb00
Fixing database wiring
etsauer Oct 31, 2018
783d950
Checking off mongo automation
etsauer Oct 31, 2018
250bcf2
Merge branch 'hygieia' of https://github.com/etsauer/containers-quick…
tomgeorge Nov 1, 2018
d126793
Add image stream, build config, deployment, service, and routes for UI
tomgeorge Nov 1, 2018
4749e2a
Add a Jenkins instance, start to create a Jenkins collector
tomgeorge Nov 1, 2018
53dbb5f
got it to spin up perfectly on a regression project
tomgeorge Nov 2, 2018
e4f8349
Consolidate UI images into one template, rename run-ui to ui
tomgeorge Nov 5, 2018
f130982
Merge branch 'add-ui-templates' of github.com:tomgeorge/containers-qu…
tomgeorge Nov 5, 2018
876fced
Merge pull request #3 from tomgeorge/add-ui-templates
etsauer Nov 6, 2018
6d9f798
Merge pull request #4 from tomgeorge/add-jenkins-collector
etsauer Nov 6, 2018
0188f6d
Add github collector. Not immediately obvious why I need to pass the…
tomgeorge Nov 6, 2018
62b2162
Pass in the personal access token instead of hard coding it in the de…
tomgeorge Nov 6, 2018
82fc937
Refactoring some of the templates
etsauer Nov 6, 2018
7507325
Merge pull request #5 from tomgeorge/add-github-collector
etsauer Nov 6, 2018
3f0a135
some cleanup
tomgeorge Nov 6, 2018
6f21711
Add image stream, builder image, modify builder image to use openshif…
tomgeorge Nov 7, 2018
f0d1f3b
Checking a box
etsauer Nov 8, 2018
5444061
testing OAuth2 call
tomgeorge Nov 8, 2018
677366b
connect to a Jenkins that is secured with OAuth/Login with OpenShift
tomgeorge Nov 9, 2018
d780136
remove secret values
tomgeorge Nov 9, 2018
7fed214
Merge pull request #6 from tomgeorge/connect-to-oauth-secured-jenkins
etsauer Nov 29, 2018
d592810
Refactoring and adding some executive dashboard components
etsauer Dec 3, 2018
d0739c7
Adding executive UI
etsauer Dec 4, 2018
d16f976
Merge branch 'hygieia' of https://github.com/etsauer/containers-quick…
pcarney8 Dec 5, 2018
ae1bcd1
Adding configs for executive collector
etsauer Dec 6, 2018
4202d16
Merge branch 'master' into hygieia
etsauer Dec 6, 2018
783e714
Fixing exec dashboard configs
etsauer Dec 7, 2018
5643ef9
Merge branch 'hygieia' of https://github.com/etsauer/containers-quick…
pcarney8 Dec 7, 2018
b02b921
kickoff jenkins s2i when hygieia-plugin build is complete, delete jen…
pcarney8 Dec 7, 2018
7fa51df
Merge pull request #8 from pcarney8/etsauer-hygieia
etsauer Dec 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding executive UI
  • Loading branch information
etsauer committed Dec 4, 2018
commit d0739c7708c9bcd93f360dd27375a7133c72fc0b
26 changes: 26 additions & 0 deletions hygieia/.applier/group_vars/seed-hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ openshift_cluster_content:
- all
- name: UI Builder and Runtime Images
template: "{{ inventory_dir }}/../.openshift/templates/build-ui.yml"
params_from_vars:
COMPONENT: ui
namespace: "{{ k8s_namespace }}"
tags:
- unpriv
Expand Down Expand Up @@ -84,6 +86,17 @@ openshift_cluster_content:
tags:
- unpriv
- all
- name: Executive UI
template: "{{ inventory_dir }}/../.openshift/templates/build-exec-ui.yml"
params_from_vars:
COMPONENT: exec-ui
SOURCE_CODE_URL: https://github.com/Hygieia/ExecDashboard.git
SOURCE_CODE_REF: master
SOURCE_CODE_CONTEXT: /exec-ui
namespace: "{{ k8s_namespace }}"
tags:
- unpriv
- all
- object: Deployments
content:
- name: MongoDB
Expand Down Expand Up @@ -123,6 +136,7 @@ openshift_cluster_content:
namespace: "{{ k8s_namespace }}"
params_from_vars:
NAMESPACE: "{{ k8s_namespace}}"
COMPONENT: ui
OPENSHIFT_DEFAULT_SUBDOMAIN: "{{ openshift_default_subdomain }}"
tags:
- unpriv
Expand Down Expand Up @@ -165,3 +179,15 @@ openshift_cluster_content:
tags:
- unpriv
- all
- name: Executive UI
template: "{{ inventory_dir }}/../.openshift/templates/deployment-ui.yml"
namespace: "{{ k8s_namespace }}"
params_from_vars:
NAMESPACE: "{{ k8s_namespace}}"
COMPONENT: exec-ui
OPENSHIFT_DEFAULT_SUBDOMAIN: "{{ openshift_default_subdomain }}"
HOST: executive
API_HOST: exec-ui
tags:
- unpriv
- all
120 changes: 120 additions & 0 deletions hygieia/.openshift/templates/build-exec-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
apiVersion: v1
kind: Template
metadata:
creationTimestamp: null
name: build-${COMPONENT}
objects:
- apiVersion: v1
kind: ImageStream
metadata:
annotations:
creationTimestamp: null
generation: 1
labels:
app: ${COMPONENT}
name: build-${COMPONENT}
- apiVersion: v1
kind: BuildConfig
metadata:
creationTimestamp: null
labels:
app: ${COMPONENT}
name: build-${COMPONENT}
spec:
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: build-${COMPONENT}:latest
postCommit: {}
resources: {}
runPolicy: Serial
source:
contextDir: ${SOURCE_CODE_CONTEXT}
git:
ref: ${SOURCE_CODE_REF}
uri: ${SOURCE_CODE_URL}
type: Git
strategy:
sourceStrategy:
from:
kind: ImageStreamTag
name: nodejs:8
namespace: openshift
type: Source
triggers:
- imageChange: {}
type: ImageChange
- type: ConfigChange
- generic:
secret: 019d3db99764e75e
type: Generic
- github:
secret: dca9639337f3d252
type: GitHub
status:
lastVersion: 0
- apiVersion: v1
kind: ImageStream
metadata:
annotations:
labels:
app: ${COMPONENT}
name: ${COMPONENT}
spec:
lookupPolicy:
local: false
- apiVersion: v1
kind: BuildConfig
metadata:
creationTimestamp: null
labels:
app: ${COMPONENT}
name: ${COMPONENT}
spec:
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: ${COMPONENT}:latest
postCommit: {}
resources: {}
runPolicy: Serial
source:
images:
- as: null
from:
kind: ImageStreamTag
name: build-${COMPONENT}:latest
paths:
- destinationDir: .
sourcePath: /opt/app-root/src/dist/.
type: Image
strategy:
sourceStrategy:
from:
kind: ImageStreamTag
name: nginx:latest
namespace: openshift
type: Source
successfulBuildsHistoryLimit: 5
triggers:
- imageChange: {}
type: ImageChange
- type: ConfigChange
- generic:
secret: 767b7d2dbfffde5d
type: Generic
- github:
secret: 1ba0322210651c63
type: GitHub
status:
lastVersion: 0
parameters:
- name: COMPONENT
- name: SOURCE_CODE_URL
value: https://github.com/tomgeorge/Hygieia
- name: SOURCE_CODE_REF
value: override-default-nginx-conf
- name: SOURCE_CODE_CONTEXT
value: /UI
51 changes: 23 additions & 28 deletions hygieia/.openshift/templates/build-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Template
metadata:
creationTimestamp: null
name: build-ui
name: build-${COMPONENT}
objects:
- apiVersion: v1
kind: ImageStream
Expand All @@ -11,42 +11,29 @@ objects:
creationTimestamp: null
generation: 1
labels:
build: build-ui
name: build-ui
spec:
lookupPolicy:
local: false
tags:
- annotations: null
from:
kind: DockerImage
name: docker-registry.default.svc:5000/hygieia/build-ui:latest
generation: null
importPolicy: {}
name: latest
referencePolicy:
type: ""
app: ${COMPONENT}
name: build-${COMPONENT}
- apiVersion: v1
kind: BuildConfig
metadata:
creationTimestamp: null
labels:
app: ui
name: build-ui
app: ${COMPONENT}
name: build-${COMPONENT}
spec:
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: build-ui:latest
name: build-${COMPONENT}:latest
postCommit: {}
resources: {}
runPolicy: Serial
source:
contextDir: /UI
contextDir: ${SOURCE_CODE_CONTEXT}
git:
ref: override-default-nginx-conf
uri: https://github.com/tomgeorge/Hygieia
ref: ${SOURCE_CODE_REF}
uri: ${SOURCE_CODE_URL}
type: Git
strategy:
sourceStrategy:
Expand All @@ -72,8 +59,8 @@ objects:
metadata:
annotations:
labels:
build: ui
name: ui
app: ${COMPONENT}
name: ${COMPONENT}
spec:
lookupPolicy:
local: false
Expand All @@ -82,14 +69,14 @@ objects:
metadata:
creationTimestamp: null
labels:
app: ui
name: ui
app: ${COMPONENT}
name: ${COMPONENT}
spec:
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: ui:latest
name: ${COMPONENT}:latest
postCommit: {}
resources: {}
runPolicy: Serial
Expand All @@ -98,7 +85,7 @@ objects:
- as: null
from:
kind: ImageStreamTag
name: build-ui:latest
name: build-${COMPONENT}:latest
paths:
- destinationDir: .
sourcePath: /opt/app-root/src/dist/.
Expand Down Expand Up @@ -127,3 +114,11 @@ objects:
type: GitHub
status:
lastVersion: 0
parameters:
- name: COMPONENT
- name: SOURCE_CODE_URL
value: https://github.com/tomgeorge/Hygieia
- name: SOURCE_CODE_REF
value: override-default-nginx-conf
- name: SOURCE_CODE_CONTEXT
value: /UI
2 changes: 2 additions & 0 deletions hygieia/.openshift/templates/deployment-java-component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ objects:
secretKeyRef:
name: mongodb
key: database-password
- name: PORTFOLIO_CRON
value: 0 0/30 * * * *
image: ${COMPONENT}:latest
imagePullPolicy: Always
name: ${COMPONENT}
Expand Down
35 changes: 20 additions & 15 deletions hygieia/.openshift/templates/deployment-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ objects:
creationTimestamp: null
generation: 1
labels:
app: ui
name: ui
app: ${COMPONENT}
name: ${COMPONENT}
spec:
replicas: 1
selector:
deploymentconfig: ui
deploymentconfig: ${COMPONENT}
strategy:
activeDeadlineSeconds: 21600
resources: {}
Expand All @@ -30,18 +30,18 @@ objects:
metadata:
creationTimestamp: null
labels:
app: ui
deploymentconfig: ui
app: ${COMPONENT}
deploymentconfig: ${COMPONENT}
spec:
containers:
- env:
- name: API_PORT
value: "8080"
- name: API_HOST
value: api-service.${NAMESPACE}.svc
image: ui:latest
value: ${API_HOST}.${NAMESPACE}.svc
image: ${COMPONENT}:latest
imagePullPolicy: Always
name: ui
name: ${COMPONENT}
ports:
- containerPort: 8080
protocol: TCP
Expand All @@ -58,32 +58,37 @@ objects:
- imageChangeParams:
automatic: true
containerNames:
- ui
- ${COMPONENT}
from:
kind: ImageStreamTag
name: ui:latest
name: ${COMPONENT}:latest
type: ImageChange
- type: ConfigChange
- apiVersion: v1
kind: Route
metadata:
name: ui-route
name: ${COMPONENT}-route
spec:
host: hygieia.${NAMESPACE}.${OPENSHIFT_DEFAULT_SUBDOMAIN}
host: ${HOST}.${NAMESPACE}.${OPENSHIFT_DEFAULT_SUBDOMAIN}
to:
kind: Service
name: ui-service
name: ${COMPONENT}-service
- apiVersion: v1
kind: Service
metadata:
name: ui-service
name: ${COMPONENT}-service
spec:
selector:
app: ui
app: ${COMPONENT}
ports:
- protocol: TCP
port: 8080
targetPort: 8080
parameters:
- name: NAMESPACE
- name: OPENSHIFT_DEFAULT_SUBDOMAIN
- name: COMPONENT
- name: HOST
value: hygieia
- name: API_HOST
value: api-service