Skip to content

Commit 98ea736

Browse files
authored
Merge pull request #209 from stfc/chatops_deployment_haproxy_chatops
ChatOps Deployment
2 parents edf1e9e + c34959e commit 98ea736

File tree

18 files changed

+453
-0
lines changed

18 files changed

+453
-0
lines changed

.github/workflows/chatops.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
3030
- name: Check Ansible
3131
run: |
32+
pip install ansible
3233
pip install ansible-lint
3334
cd chatops_deployment
3435
ansible-lint --project-dir ansible
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
chatops_version: 7.0.0
2+
chatops_github_repos:
3+
stfc:
4+
- cloud-deployed-apps
5+
- st2-cloud-pack
6+
- cloud-grafana-dashboards
7+
- cloud-pe-jupyterhub
8+
- cloud-ops-tools
9+
- cloud-docker-images
10+
- cloud-capi-values
11+
- cloud-image-builders
12+
- cloud-docs
13+
- cloud-openstack-horizon
14+
- ansible-harbor
15+
- terraform-openstack
16+
- cloud-rundeck-jobs
17+
- openstack-guide
18+
- ansible-jupyter
19+
- SCD-Openstack-Utils
20+
- check-version-action
21+
- cloud-helm-charts
22+
- openstack-query-library
23+
chatops_gitlab_domain: gitlab.stfc.ac.uk
24+
chatops_gitlab_projects:
25+
stfc-cloud:
26+
- stfc-cloud-kayobe
27+
chatops_users: "{{ vault_chatops_users }}"
28+
chatops_slack_bot_token: "{{ vault_chatops_slack_bot_token }}"
29+
chatops_slack_signing_secret: "{{ vault_chatops_slack_signing_secret }}"
30+
chatops_scheduled_reminder_token: "{{ vault_chatops_scheduled_reminder_token }}"
31+
chatops_github_token: "{{ vault_chatops_github_token }}"
32+
chatops_gitlab_token_token: "{{ vault_chatops_gitlab_token_token }}"
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
$ANSIBLE_VAULT;1.1;AES256
2+
38663934626363663636303266323933316334363436396166393433613734306266396637386438
3+
3337323630346232373064623662613165643863343933340a643263396166336438323930326637
4+
65333434366137346636613735303832346139353838306661393738356664366464366338653366
5+
6163376461666366640a343966616566666666386361663432653336633661626364613363653030
6+
35313739303339383439393066303330613934366230323637306464326436396261323834666263
7+
39333432303733396235383237633362616663313231653861333335343063363263313837643864
8+
64643330336636343064356363613438316464353935383232626364613738393832333535646465
9+
34313465396165663362343630333233666661663639323236376362313763393663626263643537
10+
39306234343834643865396166366335336465323330326434373464656436373332366162306133
11+
37336137336662636466636635326430643565393732366437396166643331313333636166623764
12+
31373761656465646361623538623039656632636362316366343235313866333365353531643534
13+
33313634366662316562353832643466326262313935313663366662383733653330666435646132
14+
61313463633965383532386637653230623835616431356431623764643162306232663637383661
15+
36353763323464303963323635653531613031323765396165356638626132393535623037363565
16+
62613538333739326530656661386138306666653965353566383332613733373164356234636535
17+
38633332313036613436646231353537633563303434313063393965316266636139613463363834
18+
61353735396233626565636331616437663536393530646261386166616661643634323765353766
19+
64363838396237386436393865353065653035393634653235366263326537386235616434373537
20+
30343633623935323064313939393830663131613866666639356236353861633036616538333963
21+
64366630343366333966386465316334313566386564646464363236653363393230353661366163
22+
38613337633066646464643166623930373936636163326233393837323862386431666666386531
23+
34316437653230623862393062666465613136383130363465643830616134353461383134613939
24+
33346163333635623133636663333861363130373361333338346362636264386237383662346134
25+
36376530333966663530666266666563393066643638636362376362363861623332303038633830
26+
32646365383038666532353933623665633730363661356530333636663036393865616237393632
27+
36643064666665376535373536386334623764336637366562323165313038353138323034313465
28+
39376338613933336337323863616561653963623433613339353765303364626438646161396333
29+
66613266366432666265313439613032663730383131316332303764303631653733643831383062
30+
61653463636132333334333539313437383431633635353239643064363561626236336531616435
31+
63306565613231386433623939313038626333353930623565373961666130336135393964353666
32+
62393038666266393731643339663333623837363032653532313435613861323064663466663938
33+
62326433623636396465313133656561366432633638663834363539636234343338623434663831
34+
30643261356433343535353938343764323735366166383464323166346439663836663930616636
35+
64656235343062393434316562373065623466373562306462326632333830363163396639653035
36+
30393339666662363633333531643834303862633435666566653161626131366632616335646561
37+
30306436333235313061376464373930636638653965393734626261333233653765646463393664
38+
31613066653161353065626566346336353432643066336463633239383735303261333530646234
39+
36373437383361343138336139366136373463353931326662626635356531313039363837366165
40+
37336537393064363762306666386362323763336334303133386532626531393032323731653862
41+
63386634336631316164383236333638303161386236353032323366346132356439636134373866
42+
33646664346138653662323534366262333566633935623234353562366661393065636337313266
43+
65383462313832643163313866376439303864356633643964653234643062653133646461306562
44+
65663530376239633531376161393734633238363366653762653435646534303264343830356232
45+
62663162643635653732656363373434356238363430333335626166326636303464383263633230
46+
64626363633461306562396633396239306461373166626266633138613839323733653061363233
47+
34383662643366343065333735656535633739356131633066316361313434313466383162383263
48+
30633834346435363565666536643362653034643637373462643435656435653432306532313236
49+
38346633303062393833643035613037376464613366316562326265656230323366356234656266
50+
37613930356330663434356336613337623437303438646139346361623732316665333363343235
51+
37383461613032383335323734393631336131383863613539343761366566336330656533383163
52+
35343863323731366639323931313435663064633431313833333961356635326566666239363435
53+
62623039656434643065643831393831386631386136383035396161633061393066303430616662
54+
61653934313566373265323435306632653230336137396666643935613839323666633363376530
55+
35633964343964666465303161346631326461386236633239363430666139326433323635643162
56+
61623062353339613439633762333963613661663434353939313439613432393637386138663866
57+
30313733663261636333363463393662333934653566343265363736313661653561396366653539
58+
39313835616331613239383937623830666538366138373839353632373661643966653666393832
59+
35623961386334633263366664303133336662363136323461373565653939383665653464666637
60+
61626363326336663437653131666236326561336330363832626133666264353835653839653766
61+
63383939623634313763343138623065343734323537643531393565643837663633653864313464
62+
62653461306438626437666664353139366265323032373836643234626334613230643764383965
63+
65653035663364333634633638323631383039313762313866626537363530653833623266393633
64+
36643230616336653839613330316662383833383762613533343230626533633230366638323233
65+
32636636366531303463633638633534393236303563376636396434333561326163626131393239
66+
31646439616138343431386262393663616166643666623238383938666333343032363035323339
67+
61396434643038383638396333623030333465343062393261323661643335383332376230373434
68+
35633437333864663834363062363937303662373664386432623039653139396435353063363233
69+
34666139663865613732626534333831363838303361353133323831373734646263333038303766
70+
63343664646630346664363339653431306666333232346334353464396438333165633364616538
71+
32613734356438386161343664633932623634653662363639303632616133656437616338313534
72+
39666239343332613034626130323866326532633861376338616262323033396436643461353936
73+
35373234653566366261386664643931376136616565663633313533373335316330613032346565
74+
36326636346437326436653561313161653932303030666561336633346664663531396632636135
75+
63373130383264373066663163373034626236633231363364316330363138323362616332383134
76+
32666230376263386338373037366434666134343863333235313364663137376437646333393039
77+
63386638613133336330323230313931373334313565623833663433363965646430616633396432
78+
66666235346132363935303738303636623066366462303634613230343237363039633366313833
79+
32653462313835636364376231613832303234653862393131323462386435643162336462383464
80+
61626538373365323765616638336136366439313765303838383566663836633963633464663433
81+
32383631643866343263313532336133393235376663336661323863646335623834346363393733
82+
36386266613765363366316437323731303765623231376664343038623336356464353831653135
83+
32633638633663393864643730376361313965373730646562626633373533343766663865653361
84+
32333335353035343336343566346462323532313439653265316230363030643330376533613333
85+
34303963343132313564323631303361303430303333653563396130323466663361393337373631
86+
31343233363334656638353261643438346238613137643565633966303566383464643334626335
87+
66636366346132316437613938616132343762613431616633353065623161333361633535306165
88+
62353263386633623530323666346331316430353764663532376538343165623432633964663936
89+
65343835626338613333623034363132326639666332643466613362613333613930623863656232
90+
35633939313066383561646334633333323931363633353133346365656432303863333436336533
91+
6438663836366566643739333438373161343137336636346463
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
domain: "dev-cloud-chatops.nubes.rl.ac.uk"
2+
wildcard_domain: "*.dev-cloud-chatops.nubes.rl.ac.uk"

chatops_deployment/ansible/group_vars/loadbalancer/vault.yml

Whitespace-only changes.

chatops_deployment/ansible/roles/chatops/files/.gitkeep

Whitespace-only changes.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
- name: Install docker
3+
become: true
4+
ansible.builtin.apt:
5+
name: docker.io
6+
update_cache: true
7+
state: latest # noqa: package-latest
8+
9+
- name: Create chatops directory
10+
become: true
11+
ansible.builtin.file:
12+
path: /etc/chatops
13+
state: directory
14+
mode: '0775'
15+
owner: ubuntu
16+
group: ubuntu
17+
recurse: true
18+
19+
- name: Copy config.yml file
20+
ansible.builtin.template:
21+
src: config.yml.j2
22+
dest: /etc/chatops/config.yml
23+
owner: ubuntu
24+
group: ubuntu
25+
mode: '0644'
26+
27+
- name: Copy secrets.yml file
28+
ansible.builtin.template:
29+
src: secrets.yml.j2
30+
dest: /etc/chatops/secrets.yml
31+
owner: ubuntu
32+
group: ubuntu
33+
mode: '0644'
34+
35+
- name: Add ubuntu to docker group
36+
become: true
37+
ansible.builtin.user:
38+
name: ubuntu
39+
groups: docker
40+
append: true
41+
42+
- name: Reset ssh connection to allow user changes to affect ansible user
43+
ansible.builtin.meta: reset_connection
44+
45+
- name: Start ChatOps container
46+
community.docker.docker_container:
47+
image: harbor.stfc.ac.uk/stfc-cloud/cloud-chatops:7.0.0
48+
name: chatops
49+
pull: always
50+
state: started
51+
ports:
52+
- "3000:3000"
53+
volumes:
54+
- /etc/chatops/config.yml:/usr/src/app/cloud_chatops/config/config.yml
55+
- /etc/chatops/secrets.yml:/usr/src/app/cloud_chatops/secrets/secrets.yml
56+
network_mode: host

chatops_deployment/ansible/roles/chatops/templates/.gitkeep

Whitespace-only changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
app:
3+
users:
4+
{{ chatops_users | to_nice_yaml | indent(4) }}
5+
6+
7+
github:
8+
enabled: true
9+
repositories:
10+
{{ chatops_github_repos | to_nice_yaml | indent(6) }}
11+
12+
gitlab:
13+
enabled: true
14+
domain: {{ chatops_gitlab_domain | to_nice_yaml }}
15+
projects:
16+
{{ chatops_gitlab_projects | to_nice_yaml | indent(6) }}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
SLACK_BOT_TOKEN: {{ chatops_slack_bot_token }}
3+
SLACK_SIGNING_SECRET: {{ chatops_slack_signing_secret }}
4+
SCHEDULED_REMINDER_TOKEN: {{ chatops_scheduled_reminder_token }}
5+
GITHUB_TOKEN: {{ chatops_github_token }}
6+
GITLAB_TOKEN: {{ chatops_gitlab_token_token }}

0 commit comments

Comments
 (0)