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 configs for executive collector
  • Loading branch information
etsauer committed Dec 6, 2018
commit ae1bcd15321211c833d1016db18b005e406da842
24 changes: 22 additions & 2 deletions hygieia/.applier/group_vars/seed-hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,21 @@ openshift_cluster_content:
- all
- object: Deployments
content:
- name: MongoDB
- name: Hygieia DB
template: "openshift//mongodb-persistent"
params_from_vars:
MONGODB_DATABASE: hygieiadb
DATABASE_SERVICE_NAME: mongo-hygieia
action: create
namespace: "{{ k8s_namespace }}"
tags:
- unpriv
- all
- name: Executive DB
template: "openshift//mongodb-persistent"
params_from_vars:
MONGODB_DATABASE: execdb
DATABASE_SERVICE_NAME: mongo-exec
action: create
namespace: "{{ k8s_namespace }}"
tags:
Expand All @@ -118,6 +131,7 @@ openshift_cluster_content:
params_from_vars:
COMPONENT: api
JAR_NAME: api
DATABASE_SERVICE_NAME: mongo-hygieia
namespace: "{{ k8s_namespace }}"
tags:
- unpriv
Expand All @@ -127,6 +141,7 @@ openshift_cluster_content:
params_from_vars:
COMPONENT: api-audit
JAR_NAME: apiaudit
DATABASE_SERVICE_NAME: mongo-hygieia
namespace: "{{ k8s_namespace }}"
tags:
- unpriv
Expand All @@ -148,6 +163,7 @@ openshift_cluster_content:
NAMESPACE: "{{ k8s_namespace }}"
JENKINS_NAMESPACE: "{{ jenkins_namespace }}"
OPENSHIFT_DEFAULT_SUBDOMAIN: "{{ openshift_default_subdomain }}"
DATABASE_SERVICE_NAME: mongo-hygieia
tags:
- unpriv
- all
Expand All @@ -157,6 +173,7 @@ openshift_cluster_content:
params_from_vars:
NAMESPACE: "{{ k8s_namespace }}"
GITHUB_PERSONAL_ACCESS_TOKEN: "{{ github_personal_access_token }}"
DATABASE_SERVICE_NAME: mongo-hygieia
tags:
- unpriv
- all
Expand All @@ -165,16 +182,19 @@ openshift_cluster_content:
params_from_vars:
COMPONENT: exec-api
JAR_NAME: exec-api
DATABASE_SERVICE_NAME: mongo-exec
namespace: "{{ k8s_namespace }}"
tags:
- unpriv
- all
- name: Executive Collector
template: "{{ inventory_dir }}/../.openshift/templates/deployment-java-component.yml"
template: "{{ inventory_dir }}/../.openshift/templates/deployment-exec-collector.yml"
params_from_vars:
COMPONENT: exec-analysis
JAR_NAME: exec-analysis
JAR_VERSION: -1.0.0-SNAPSHOT
DATABASE_SERVICE_NAME: mongo-exec
OTHER_DATABASE_SERVICE_NAME: mongo-hygieia
namespace: "{{ k8s_namespace }}"
tags:
- unpriv
Expand Down
121 changes: 121 additions & 0 deletions hygieia/.openshift/templates/deployment-exec-collector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
apiVersion: v1
kind: Template
metadata:
creationTimestamp: null
name: deployment-${COMPONENT}
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
creationTimestamp: null
generation: 1
labels:
app: ${COMPONENT}
name: ${COMPONENT}
spec:
replicas: 1
selector:
deploymentconfig: ${COMPONENT}
strategy:
activeDeadlineSeconds: 21600
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
creationTimestamp: null
labels:
app: ${COMPONENT}
deploymentconfig: ${COMPONENT}
spec:
containers:
- env:
- name: JAVA_APP_JAR
value: ${JAR_NAME}${JAR_VERSION}.jar
- name: DBHOST
value: ${DATABASE_SERVICE_NAME}
- name: DBNAME
valueFrom:
secretKeyRef:
name: ${DATABASE_SERVICE_NAME}
key: database-name
- name: DBUSERNAME
valueFrom:
secretKeyRef:
name: ${DATABASE_SERVICE_NAME}
key: database-user
- name: DBPASSWORD
valueFrom:
secretKeyRef:
name: ${DATABASE_SERVICE_NAME}
key: database-password
- name: PORTFOLIO_CRON
value: 0 * * * * *
- name: PORTFOLIO_READURIDATABASE
value: ${OTHER_DATABASE_SERVICE_NAME}
- name: PORTFOLIO_READDATABASE
valueFrom:
secretKeyRef:
name: ${OTHER_DATABASE_SERVICE_NAME}
key: database-name
- name: PORTFOLIO_READURIUSERNAME
valueFrom:
secretKeyRef:
name: ${OTHER_DATABASE_SERVICE_NAME}
key: database-user
- name: PORTFOLIO_READURIPASSWORD
valueFrom:
secretKeyRef:
name: ${OTHER_DATABASE_SERVICE_NAME}
key: database-password
image: ${COMPONENT}:latest
imagePullPolicy: Always
name: ${COMPONENT}
ports:
- containerPort: 8080
protocol: TCP
- containerPort: 8443
protocol: TCP
- containerPort: 8778
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
test: false
triggers:
- imageChangeParams:
automatic: true
containerNames:
- ${COMPONENT}
from:
kind: ImageStreamTag
name: ${COMPONENT}:latest
type: ImageChange
- type: ConfigChange
- apiVersion: v1
kind: Service
metadata:
name: ${COMPONENT}-service
spec:
selector:
app: ${COMPONENT}
ports:
- protocol: TCP
port: 8080
targetPort: 8080
parameters:
- name: COMPONENT
- name: JAR_NAME
- name: JAR_VERSION
- name: DATABASE_SERVICE_NAME
- name: OTHER_DATABASE_SERVICE_NAME
11 changes: 6 additions & 5 deletions hygieia/.openshift/templates/deployment-java-component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,24 @@ objects:
- name: JAVA_APP_JAR
value: ${JAR_NAME}${JAR_VERSION}.jar
- name: DBHOST
value: mongodb
value: ${DATABASE_SERVICE_NAME}
- name: DBNAME
valueFrom:
secretKeyRef:
name: mongodb
name: ${DATABASE_SERVICE_NAME}
key: database-name
- name: DBUSERNAME
valueFrom:
secretKeyRef:
name: mongodb
name: ${DATABASE_SERVICE_NAME}
key: database-user
- name: DBPASSWORD
valueFrom:
secretKeyRef:
name: mongodb
name: ${DATABASE_SERVICE_NAME}
key: database-password
- name: PORTFOLIO_CRON
value: 0 0/30 * * * *
value: 0 * * * * *
image: ${COMPONENT}:latest
imagePullPolicy: Always
name: ${COMPONENT}
Expand Down Expand Up @@ -100,3 +100,4 @@ parameters:
- name: COMPONENT
- name: JAR_NAME
- name: JAR_VERSION
- name: DATABASE_SERVICE_NAME
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ objects:
valueFrom:
secretKeyRef:
key: database-name
name: mongodb
name: ${DATABASE_SERVICE_NAME}
- name: DBPASSWORD
valueFrom:
secretKeyRef:
key: database-password
name: mongodb
name: ${DATABASE_SERVICE_NAME}
- name: DBHOST
value: mongodb.${NAMESPACE}.svc
value: ${DATABASE_SERVICE_NAME}.${NAMESPACE}.svc
- name: GITHUB_CRON
value: 5 * * * * *
- name: GITHUB_HOST
Expand All @@ -61,7 +61,7 @@ objects:
valueFrom:
secretKeyRef:
key: database-user
name: mongodb
name: ${DATABASE_SERVICE_NAME}
- name: LOGGING_LEVEL_ROOT
value: DEBUG
image: capitalone/hygieia-github-scm-collector:latest
Expand All @@ -84,3 +84,4 @@ objects:
parameters:
- name: NAMESPACE
- name: GITHUB_PERSONAL_ACCESS_TOKEN
- name: DATABASE_SERVICE_NAME
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ objects:
valueFrom:
secretKeyRef:
key: database-name
name: mongodb
name: ${DATABASE_SERVICE_NAME}
- name: DBPASSWORD
valueFrom:
secretKeyRef:
key: database-password
name: mongodb
name: ${DATABASE_SERVICE_NAME}
- name: DBHOST
value: mongodb.${NAMESPACE}.svc
value: ${DATABASE_SERVICE_NAME}.${NAMESPACE}.svc
- name: JENKINS_CRON
value: '5 * * * * *'
- name: JENKINS_SERVERS
Expand All @@ -61,7 +61,7 @@ objects:
valueFrom:
secretKeyRef:
key: database-user
name: mongodb
name: ${DATABASE_SERVICE_NAME}
- name: LOGGING_LEVEL_ROOT
value: INFO
- name: JENKINS_CLIENT_SECRET
Expand Down Expand Up @@ -99,3 +99,4 @@ parameters:
- name: NAMESPACE
- name: JENKINS_NAMESPACE
- name: OPENSHIFT_DEFAULT_SUBDOMAIN
- name: DATABASE_SERVICE_NAME