11version : " 3.8"
2-
32services :
43 go-app :
54 build :
@@ -9,13 +8,22 @@ services:
98 ports :
109 - " 8080:8080"
1110 volumes :
12- - ./config.yaml:/app/config.yaml # mount config from host
13- - ./.env:/app/.env # mount env file from host
11+ - ./config.yaml:/app/config.yaml
12+ - ./.env:/app/.env
13+ - beegfs-mount:/mnt/beegfs-test:rshared
1414 depends_on :
1515 - openldap
1616 - redis
17+ - beegfs-client
1718 networks :
1819 - backend
20+ privileged : true
21+ devices :
22+ - /dev/fuse:/dev/fuse
23+ cap_add :
24+ - SYS_ADMIN
25+ security_opt :
26+ - apparmor:unconfined
1927
2028 openldap :
2129 image : osixia/openldap:latest
@@ -24,9 +32,16 @@ services:
2432 LDAP_ORGANISATION : " My Org"
2533 LDAP_DOMAIN : " myorg.local"
2634 LDAP_ADMIN_PASSWORD : " admin"
35+ LDAP_BACKEND : " mdb"
36+ LDAP_TLS : " false"
37+ LDAP_CONFIG_PASSWORD : " config"
2738 ports :
2839 - " 389:389"
2940 - " 636:636"
41+ volumes :
42+ - ldap-data:/var/lib/ldap
43+ - ldap-config:/etc/ldap/slapd.d
44+ - ./ldap-init:/container/service/slapd/assets/config/bootstrap/ldif/custom:ro
3045 networks :
3146 - backend
3247
@@ -51,6 +66,114 @@ services:
5166 networks :
5267 - backend
5368
69+ # BeeGFS Management Service
70+ beegfs-mgmt :
71+ image : beegfs/beegfs-mgmt:latest
72+ container_name : beegfs-mgmt
73+ hostname : beegfs-mgmt
74+ ports :
75+ - " 8008:8008"
76+ volumes :
77+ - beegfs-mgmt-data:/opt/beegfs/mgmt
78+ - ./beegfs-config:/etc/beegfs:ro
79+ networks :
80+ - backend
81+ command : >
82+ sh -c "
83+ /opt/beegfs/sbin/beegfs-setup-mgmt -p /opt/beegfs/mgmt -s 1 -S mgmt &&
84+ /opt/beegfs/sbin/beegfs-mgmtd
85+ "
86+
87+ # BeeGFS Metadata Service
88+ beegfs-meta :
89+ image : beegfs/beegfs-meta:latest
90+ container_name : beegfs-meta
91+ hostname : beegfs-meta
92+ volumes :
93+ - beegfs-meta-data:/opt/beegfs/meta
94+ - ./beegfs-config:/etc/beegfs:ro
95+ networks :
96+ - backend
97+ depends_on :
98+ - beegfs-mgmt
99+ command : >
100+ sh -c "
101+ sleep 5 &&
102+ /opt/beegfs/sbin/beegfs-setup-meta -p /opt/beegfs/meta -s 1 -S meta -m beegfs-mgmt &&
103+ /opt/beegfs/sbin/beegfs-meta
104+ "
105+
106+ # BeeGFS Storage Service
107+ beegfs-storage :
108+ image : beegfs/beegfs-storage:latest
109+ container_name : beegfs-storage
110+ hostname : beegfs-storage
111+ volumes :
112+ - beegfs-storage-data:/opt/beegfs/storage
113+ - ./beegfs-config:/etc/beegfs:ro
114+ networks :
115+ - backend
116+ depends_on :
117+ - beegfs-mgmt
118+ - beegfs-meta
119+ command : >
120+ sh -c "
121+ sleep 10 &&
122+ /opt/beegfs/sbin/beegfs-setup-storage -p /opt/beegfs/storage -s 1 -S storage -m beegfs-mgmt &&
123+ /opt/beegfs/sbin/beegfs-storage
124+ "
125+
126+ # BeeGFS Client with LDAP integration
127+ beegfs-client :
128+ build :
129+ context : .
130+ dockerfile : Dockerfile.beegfs-client
131+ container_name : beegfs-client
132+ hostname : beegfs-client
133+ privileged : true
134+ devices :
135+ - /dev/fuse:/dev/fuse
136+ cap_add :
137+ - SYS_ADMIN
138+ - DAC_OVERRIDE
139+ security_opt :
140+ - apparmor:unconfined
141+ volumes :
142+ - beegfs-mount:/mnt/beegfs:rshared
143+ - ./beegfs-config:/etc/beegfs:ro
144+ - ./nsswitch.conf:/etc/nsswitch.conf:ro
145+ - ./ldap.conf:/etc/ldap/ldap.conf:ro
146+ networks :
147+ - backend
148+ depends_on :
149+ - beegfs-mgmt
150+ - beegfs-meta
151+ - beegfs-storage
152+ - openldap
153+ command : >
154+ sh -c "
155+ echo 'Waiting for BeeGFS services...' &&
156+ sleep 15 &&
157+ echo 'Setting up BeeGFS client...' &&
158+ /opt/beegfs/sbin/beegfs-setup-client -m beegfs-mgmt &&
159+ echo 'Starting BeeGFS client...' &&
160+ /opt/beegfs/sbin/beegfs-helperd &&
161+ /opt/beegfs/sbin/beegfs-client nonDaemonized
162+ "
163+
54164networks :
55165 backend :
56166 driver : bridge
167+
168+ volumes :
169+ beegfs-mgmt-data :
170+ beegfs-meta-data :
171+ beegfs-storage-data :
172+ beegfs-mount :
173+ driver : local
174+ driver_opts :
175+ type : none
176+ o : bind
177+ device : /tmp/beegfs-mount
178+ ldap-data :
179+ ldap-config :
0 commit comments