Skip to content

Commit 0838342

Browse files
authored
Merge pull request #133 from CESNET/adds_ceph_configuration
Adds Ceph and RBD configuration
2 parents 58ddcf1 + 6351674 commit 0838342

File tree

9 files changed

+400
-278
lines changed

9 files changed

+400
-278
lines changed

files/ceph/ceph.CL4.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[global]
2+
fsid = c4ad8c6f-7ef3-4b0e-873c-b16b00b5aac4
3+
mon_host = [v2:78.128.245.29:3300/0,v1:78.128.245.29:6789/0] [v2:78.128.245.30:3300/0,v1:78.128.245.30:6789/0] [v2:78.128.245.31:3300/0,v1:78.128.245.31:6789/0]
4+
auth_client_required = cephx

files/ceph/ceph.CL5.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[global]
2+
fsid = c581dace-40ff-4519-878b-c0ffeec0ffee
3+
mon_host = [v2:78.128.245.157:3300/0,v1:78.128.245.157:6789/0] [v2:78.128.245.158:3300/0,v1:78.128.245.158:6789/0] [v2:78.128.245.159:3300/0,v1:78.128.245.159:6789/0]
4+
auth_client_required = cephx

galaxy.yml

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,82 @@
1111
update_cache: yes
1212
when: ansible_os_family == 'Debian'
1313

14+
- hosts: production
15+
become: true
16+
become_user: root
17+
tasks:
18+
- name: Install production-specific dependencies
19+
package:
20+
name: ['ceph-common', 'xfsprogs']
21+
- name: Create the RBD mount directory
22+
file:
23+
path: "{{ rbd_mount_point }}"
24+
state: directory
25+
mode: '0755'
26+
- name: Copy ceph.conf
27+
ansible.builtin.copy:
28+
src: "{{ playbook_dir }}/files/ceph/ceph.{{ rbd_cluster_code }}.conf"
29+
dest: "/etc/ceph/ceph.conf"
30+
mode: '0644'
31+
- name: Copy ceph.keyring
32+
ansible.builtin.copy:
33+
content: |
34+
[client.{{ rbd_user }}]
35+
key = {{ rbd_key }}
36+
dest: "/etc/ceph/ceph.keyring"
37+
mode: '0600'
38+
- name: Copy rbdmap
39+
ansible.builtin.copy:
40+
content: |
41+
# RbdDevice Parameters
42+
#poolname/imagename id=client,keyring=/etc/ceph/ceph.client.keyring
43+
{{ rbd_pool }}/{{ rbd_image }} id={{ rbd_user }},keyring=/etc/ceph/ceph.keyring
44+
dest: "/etc/ceph/rbdmap"
45+
mode: '0644'
46+
- name: Check RBD device list output
47+
ansible.builtin.command: "rbd device list --format json"
48+
register: rbd_devices
49+
- name: Set RBD device list output as variable
50+
set_fact:
51+
rbd_dev_data: "{{ rbd_devices.stdout | from_json }}"
52+
- name: Identify RBD device name
53+
set_fact:
54+
rbd_dev_name: "{{ rbd_dev_data | selectattr('name', 'equalto', rbd_image) | map(attribute='device') | first | default('/dev/rbd0') }}"
55+
- name: Check if RBD device exists
56+
stat:
57+
path: "{{ rbd_dev_name }}"
58+
register: rbd_dev
59+
- name: Restart rbdmap.service
60+
ansible.builtin.systemd:
61+
state: restarted
62+
name: rbdmap
63+
when: "not rbd_dev.stat.exists"
64+
- name: Check again if RBD device exists
65+
stat:
66+
path: "{{ rbd_dev_name }}"
67+
register: rbd_dev
68+
when: "not rbd_dev.stat.exists"
69+
- name: Create file system on RBD
70+
community.general.filesystem:
71+
fstype: xfs
72+
dev: "{{ rbd_dev_name }}"
73+
opts: -K
74+
state: present
75+
- name: Mount up RBD
76+
ansible.posix.mount:
77+
src: "{{ rbd_dev_name }}"
78+
path: "{{ rbd_mount_point }}"
79+
fstype: xfs
80+
opts: rw,_netdev
81+
state: mounted
82+
- name: Create galaxy mutable data directory
83+
file:
84+
owner: "{{ galaxy_user_name }}"
85+
group: "{{ galaxy_user_group_name }}"
86+
path: "{{ galaxy_mutable_data_dir }}"
87+
state: directory
88+
mode: '0755'
89+
1490
- hosts: dbservers
1591
become: true
1692
become_user: root
@@ -51,7 +127,7 @@
51127
when: admin_ssh_keys
52128
- name: Install Dependencies
53129
package:
54-
name: ['acl', 'bzip2', 'git', 'make', 'tar', 'python3-bioblend', 'python3-venv', 'python3-setuptools', 'python3-pip', 'python3-psycopg2', 'rsync', 'python3-docker', 'python3-passlib', 'nginx-full', 'logrotate', 'proftpd-mod-ldap', 'ceph-common', 'squashfs-tools', 'krb5-user'] # krb5-user is neccessary only if you need to mount NFS storage
130+
name: ['acl', 'bzip2', 'git', 'make', 'tar', 'python3-bioblend', 'python3-venv', 'python3-setuptools', 'python3-pip', 'python3-psycopg2', 'rsync', 'python3-docker', 'python3-passlib', 'nginx-full', 'logrotate', 'proftpd-mod-ldap', 'squashfs-tools', 'krb5-user'] # krb5-user is neccessary only if you need to mount NFS storage
55131
- name: Install RHEL/CentOS/Rocky specific dependencies
56132
package:
57133
name: ['tmpwatch']

group_vars/production.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
rbd_mount_point: /data
2+
rbd_cluster_code: CL4
Lines changed: 91 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,92 @@
11
$ANSIBLE_VAULT;1.1;AES256
2-
38386532303663366434323261356363373537366134386465336230393534333234373464386535
3-
3563646162346634656430313934306264633964633633630a396131306231353961386333326264
4-
62303762623564636537363030363663613462623930366466636463356361363666336634303539
5-
3435656334646366380a363261396430643764363134643563613036366463646566366538326530
6-
61633963613136303739666239633631616162343932393366633838336532636338613136333430
7-
65343938633830306162623536633834646164303833666632333937656131643933346239646464
8-
31633730336265646163363830653231633362333766656236363333323637383632656633303633
9-
30643137376139623537373235373130316436373566633439303766646366333864653766653530
10-
66656261613939613435653236643063323335626634636364333566346434623137383363313363
11-
63376533353262313439326536623739373862663732396161343834663632353032633435613332
12-
34653565653334646431346235343334366331623436633065636431643232326166383334333763
13-
33653761393766333538393162363631326331306434336461336137663738376235613636313532
14-
66343264613930623562636337336638663638623131376265313566613233396361383439323762
15-
63616231393439643161616536346335346337353064323864396431653639353237613232616664
16-
36373032386461353636323136366135343834613834636333633937353561393464633734653333
17-
61326333373039356564653530323435666564363262613532396330336530306366306132353165
18-
30393931303865616534366635643262646431353961353361386263393034666161376137666531
19-
64306463393831656137306638343066323532376539353438643239396237653666343964353064
20-
32393138616665376238326231356436316437633266643261613639386639346135383462313539
21-
66613230383935393461613235303265376136376532396130613939303537316532376138363739
22-
36353033383431653139616436396561393434316632333363333233316638356233616437373265
23-
64343136336663373065653562333838646562633364393935323165376131356139343230653166
24-
62393464616561633865646464306661303064373466323966663637386133656663303765343962
25-
34363736383765386662326165386263306134623534613634376531663233386633633636373238
26-
32656164323831643966326330396135333037613633623462633639386331346434646436343033
27-
34353263373462376435343062373262383839303332656634363837363461633338653738303332
28-
62356634363964633435306433633466316333663262333934316133383333353632646163326234
29-
34613431623138333562653863383264336239346133613433646165393635373439306338666363
30-
33363932636332303730346466323932323864356437356464353562316339303965623036333838
31-
62383865323537623135383037626637383961653166616139643438656239396437666236346332
32-
39323065623136643735333964373432396332376536643365643838303032373432656636393135
33-
65386439643164653533313866373239303630316264613835323762326430613335373563303837
34-
39386433633332656631363538383232326539343730656538333135343738366261353134323766
35-
61323233636362356461626465353636353064326539346564613837353061326631393632633763
36-
32636532323339616531656464613532663532313736313261316564653361616664353566396136
37-
64373036323364633732373138633836333532363038323639393232333362623133323666666134
38-
64333362366238666362386434336136326634633330393065353738646132663861323866303763
39-
62363237663633643431343062366430363233653137616138653833363861666365363232336339
40-
30386639353833613430373233636635323364363136373434393561643437653461306431656234
41-
65646632356162346134653333643862313035306235396462306534356665333936666237346539
42-
38316534313062343562363664303432343433333038383230666664656665346531653937323339
43-
64386265633438653364663565353066393334656230316438306330383033306634383962316261
44-
32326535396664653930363330656466336666663339386162346439643436303264353334623730
45-
31303161323234393538376462613961373265363362356563646238653263366464323262623137
46-
37373135376631393962353661613366333962636462656436386234613635363033616132666266
47-
30653438633039376362356262303063353463343930386531396437383638313061616232306238
48-
38346530366561636661376439643231616637313235343838393761336536316633303065643762
49-
32303835316536643239386365663466613562323437643932633330646565646164663337646632
50-
33613136653063363734346433306266313333353662663063643439356236646265636134353665
51-
64326435663832383739303361386662646466666235323435353833346462363965646132306235
52-
31663431316338636466616530636134363234313731353737363031666538323731646335613263
53-
62393564613139323164306331393336663037343666666361383966373563663731393162373335
54-
62373131303164376563666661626633363666313364633031336339323438363266393136636632
55-
39646666626162363730386239613238376164636131656263323036363564653339313734643935
56-
38633137306533326565383663326332343766636463353935613266366430353036323231663531
57-
32306432343565653763663335633730363233393565646530333966663465653464396537623332
58-
35326366323230323635613837373961343633646162343839373534653934663862646163303035
59-
30316631306636613436386236343531363038316333396364386138666237363934363963323736
60-
62396364303831643232383762376664633861653130333534386338396534313835303063303234
61-
35623561646339303266373734393962316334633666386265643866643530303961326436633064
62-
39613264666164653364363761306430623838323830613034396662626232313662656365616131
63-
64376262623663633866633035646337336539333039393438613033336563333063373964333866
64-
64346262376330623733333637323038623832666636306338356361663933313632623035303432
65-
30623431386330363266306139323063303261353533653234636465633339313036613362633866
66-
35366532313134356262613133373765326636656464373239663634366232633330613335343366
67-
66306533313565386636326533663765656135316163313336323362626166383936633632383266
68-
32633630323731663839646366636437643830316638643031613138303530336161376236393438
69-
63353635313631373964326230363834643435313835643465643137376335363263653163663237
70-
31376137633539373639363032623866363161356436663466333931623338316239373430363466
71-
38633938643537663631313961666537633761663065663361386536626165313763623164623466
72-
63613461383633633830613938303336666231316132376539336638643932633839333561306465
73-
35656630336330323830353239326337333836613766663231646534383737653132363337356263
74-
66373432373933666133366533396435656364303333643830373965383032323738666462383138
75-
61346461326339636431646631646136323836653332653432653264653237383464333061356435
76-
64393734646531316363633963383566303762653532616130616435333232313066303564633336
77-
39646637653261353230343637613438663437633663663835336330366435616562643165663838
78-
66383137383331396638623630373138356666636534313765366537326135633138
2+
63316332316330343761326332353837393835646364653563663863313465613539363563636336
3+
6362333761303631313137353736396165326463613038650a663462326333333034303436303638
4+
31333661646466373431396665366662666634646137376366353335336139356436313835356439
5+
3937346633336236650a386134626662343736373339313963613330656536386432343439353432
6+
64353161366233623866626363303331333035363263306466663663363162316634623035636530
7+
36363365323036646130303237303831373832333166613132393438643139643565653062383766
8+
32623839333339636135646164643539613866626339323162653232383666346466306662393464
9+
62316266323737383334373836333334376132313466343738333866373132386162636231623137
10+
37373665303863353432383233333033646539393532383664623434326662643833373362646661
11+
63616137303637313134313532633534616164323261363336303232633234373832633031313239
12+
38636362386438323964343732326631353233356338343832373564306364323962366562353032
13+
62306330323062373431643634356431376363383862333432646261663363633162306431396266
14+
32656630343139366139613032383561653266393337643463363063636539643361306564636135
15+
64663733383939656634336336336262393832383732333261373833353430663862626136643337
16+
39363665303435643236316466653264376466363166303238323261333661393534363035333365
17+
64346135323135626236373934326237613134373032643736323865666563326439373935663938
18+
35303666376266373266663763613064356630653038343632303666353062363164313366336361
19+
34623437353264353639313330646239313665333533303933396662656638313338353234333730
20+
39353735303839363364643139643365646639626435646136353639616535666234333034626336
21+
37366262373730336632313561636232643536636434393263376339663233393237623835613531
22+
66646633643338616664653463653338613063363432343465383032306138643031323535386631
23+
30316564376134306663646436343866353231393764653933346338393563336534303034396463
24+
65363830333337663638373964383832646233313431316630343962363363333663326537323632
25+
32306162353433393231616131316361303034656131376539313532626261666131376633656263
26+
39366263316432373730623465393637626239653637396466643231666434663264393839363835
27+
34623134613937666563636536633264356234346130376339326133353038646361353330633333
28+
35383965636131303062363564316232316631643462346164373065356239306336623565623965
29+
38386136393266626534613832383132373161623163383133653337386235646364313065626539
30+
65303862376135646635383338613636303461366233663662323433323432623339376438396331
31+
31376230633138373366613664373139373036613633663939333533613134656661613361666235
32+
33666136343935633936376433376264373935343535303537386535636531306431363132343565
33+
62626134613061393736356639313565326236643064383162356432353331346132376434383564
34+
33303737616430346633366137643932653064326139363236346663363938383936353931366534
35+
38333438326633623263663236626663356539363738653833663566623533663537623865663665
36+
66653765616431316130346132626532643339393566646266316464376134356530633966616335
37+
65656264353038303466613535353636333264386264383232613361636166393138353766323064
38+
64633863333539366130346134323234623064326135386537663164363131616230326531316265
39+
63316139666634383837383465356666393038373664303831383365356537353762376262353938
40+
37623836373235383339326133313330333530616434623539316462646239343361656634336331
41+
33353666316637353363306536653833626363623035393865306436666331623663303734383036
42+
34363563636336323335383339616632346634616163343430366435633530646632333661656530
43+
34366430336531636561356434333732336662323831653163613338623134333130383731653535
44+
36326434653832636163363063306365663834343462646666643835303136646138646234343161
45+
37656235653966326536306437313739336631363666343938316131373231663033353836336563
46+
65343136663339646361633639393435343530663132323937356564323762346563373138353732
47+
33373631653635363836326333373966396537656532366136373836646631363466633634333938
48+
64663938313365373838336535306339343265616531306535336664343033386239303739393631
49+
31393361363039386137326664643132356234393938366363323137666261386330346432366232
50+
62386530653036623033653561326330636462383766383664363865653036366263313665333633
51+
65383965373962396533373632386336613565313965623235633533366633353866386364623564
52+
30333635393934653963306164343332323835313931333365626663653834323638636433633634
53+
36616161396638333139646237646436666432643831653238346431623964333761646563626364
54+
35326433383138623433376333356439383531396134643538346661326233646363353066333631
55+
30646232616366323530326263353234366130636464663135646630346136613931353932313738
56+
62333436313266643833643066353761653738376465326434643338343532393166356237666330
57+
38363761356231326165346162333565393330623734326135626435646363346265383139353162
58+
66343566313462383162396133313765626632666162313433313762353066636134333531376338
59+
66613639303239343630336562343763393039353362353633386563616130393532386235376331
60+
62316661366135353334646262396239386632303361363539626564663466336464323162663134
61+
36636366613566326161353263646364666432626232653761636634396463306236373662323531
62+
37303735396661663233626437653462666463386662336638383061613233623638366639646134
63+
62383937623737303431353839396237343236376136666132333330313834326434353565363331
64+
30663536663635663438373231323633333661323233353339653836323637303264356532386235
65+
66366437643665663262306237636439646637396539386363393062323433646164396366313661
66+
39306537396463313231393963343836346435306561393661633436313038313630373834656530
67+
33306633363531376366366630633030356634373836343038653237353337353766333631663662
68+
66373132383163356366653033323535393763623638363339366662613535336437316138656165
69+
66393934333737336464383932663464396265663365626430663536663064643330373031656262
70+
34383664623263373333336534386366666339323539613963613933393363393237613832336638
71+
30383534646339353037353436393938613565623731353934666238363836373736356561663362
72+
31356332613433383831643865353362663133383665633038656338633434643063636636626233
73+
35333336663538626564303137626363373262316532616530313061396336663338316331323431
74+
62653966666562653639313830626665613964326562353037633832363066323636346134646437
75+
65653735386433383561353763323734383538316538346663663261643964626637656531626235
76+
30396430316164353935373737626233393930383965323363613532366439613132633131313735
77+
66653733646136373335316532376435376538633936326262643162633662383064396163326537
78+
39323163373536343065633562363364656662666633333736373862663730386464643937333064
79+
65346337663130623565626333633038663338386364663965633261303563316134346363636333
80+
62383137326632663766393034366362326561323164353230356239323264373465376332666562
81+
36353333623130633062323336623634643938313630363732633162396134316231633733386131
82+
65653761363437623235333661336331383632396637643538396261386666316265643065313166
83+
61356364323237356137613633626364383162313161623134383362373432613661323532393233
84+
37316263323332636538373066316463353139643436646236626531323233366262393762313563
85+
37313561303665353238633161303965346232383365653462313831616664303232653039326338
86+
38323234383061653932343034306237666337616564373764383739636236393136613438386562
87+
35393464313161363631393262306534626463303437333662366665336662336363343637626431
88+
36336432626666396164396439396235316266663535636531636363333639616537353431626136
89+
66346462333465633134616661636465636361653964616135333762376431643164633334393763
90+
62356330646532633462353935313563386366623333373765373763363830613336653839366331
91+
30316462353939346263613735643062323832613864393065303039373766336134663533356536
92+
303631636165336366653330663232646163

host_vars/galaxy-umsa.grid.cesnet.cz/vars.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# where to put most of the data; we use RBD or NBD volumes
2-
galaxy_mutable_data_dir: /rbd/galaxy-umsa_data
2+
rbd_mount_point: /rbd
3+
galaxy_mutable_data_dir: "{{ rbd_mount_point }}/galaxy-umsa_data"
34
galaxy_mutable_config_dir: "{{ galaxy_root }}/var/config"
45
galaxy_gravity_state_dir: "{{ galaxy_root }}/var/gravity"
56
galaxy_tool_dependency_dir: "{{ galaxy_root }}/var/dependencies"

0 commit comments

Comments
 (0)