Skip to content

Commit 4afbdd0

Browse files
committed
feat: Phase 4 Lab 05 — Advanced Integration (WireMock ecosystem mocks)
- docker-compose.integration.yml: full integration stack with WireMock - test-lab-XX-05.sh: WireMock stub registration + integration tests - ci.yml: lab-05-smoke job with integration stack wait steps - WireMock simulates ecosystem API (Graylog/Mattermost/Odoo/Zammad/Zabbix) - Ports, volumes, env vars, container-to-mock connectivity verified
1 parent 9a57f7c commit 4afbdd0

3 files changed

Lines changed: 435 additions & 27 deletions

File tree

.github/workflows/ci.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,4 +232,44 @@ run: bash tests/labs/test-lab-15-01.sh
232232

233233
- name: Cleanup
234234
if: always()
235-
run: docker compose -f docker/docker-compose.sso.yml down -v
235+
run: docker compose -f docker/docker-compose.sso.yml down -v
236+
237+
lab-05-smoke:
238+
name: Lab 15-05 -- Taiga Advanced Integration (Mattermost Webhook)
239+
runs-on: ubuntu-latest
240+
needs: validate
241+
continue-on-error: true
242+
steps:
243+
- uses: actions/checkout@v4
244+
245+
- name: Install tools
246+
run: sudo apt-get install -y curl postgresql-client netcat-openbsd ldap-utils
247+
248+
- name: Validate integration compose
249+
run: docker compose -f docker/docker-compose.integration.yml config -q && echo "Integration compose valid"
250+
251+
- name: Start integration stack
252+
run: docker compose -f docker/docker-compose.integration.yml up -d
253+
254+
- name: Wait for WireMock
255+
run: timeout 90 bash -c 'until curl -sf http://localhost:8761/__admin/health; do sleep 5; done'
256+
257+
- name: Wait for PostgreSQL
258+
run: timeout 120 bash -c 'until docker exec taiga-i05-db pg_isready -U taiga > /dev/null 2>&1; do sleep 5; done'
259+
260+
- name: Wait for Keycloak
261+
run: timeout 300 bash -c 'until curl -sf http://localhost:8540/realms/master; do sleep 10; done'
262+
263+
- name: Wait for Taiga Back
264+
run: timeout 300 bash -c 'until curl -sf http://localhost:8041/api/v1/ | grep -q version; do sleep 15; done'
265+
266+
- name: Run Lab 15-05 test script
267+
run: bash tests/labs/test-lab-15-05.sh --no-cleanup
268+
269+
- name: Collect logs on failure
270+
if: failure()
271+
run: docker compose -f docker/docker-compose.integration.yml logs
272+
273+
- name: Cleanup
274+
if: always()
275+
run: docker compose -f docker/docker-compose.integration.yml down -v
Lines changed: 237 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,245 @@
1-
# Lab 05 — Advanced Integration: taiga with full IT-Stack ecosystem
2-
---
1+
# =============================================================================
2+
# IT-Stack: Taiga — Lab 05: Advanced Integration
3+
# Module 15 · Phase 4 · Lab 05
4+
# =============================================================================
5+
# Services: PostgreSQL · Redis · OpenLDAP · Keycloak · WireMock (Mattermost-mock)
6+
# Mailhog · Taiga Backend · Taiga Frontend
7+
# Ports: Frontend:8440 Backend:8041 WireMock:8761 KC:8540 LDAP:3885 MH:8740
8+
# Credentials:
9+
# DB: taiga / TaigaLab05!
10+
# Keycloak: admin / Admin05!
11+
# LDAP: cn=admin,dc=lab,dc=local / LdapLab05!
12+
# What's new vs Lab 04:
13+
# + WireMock 3.x simulates Mattermost API (webhooks, DMs)
14+
# + Taiga back configured with MATTERMOST_URL for project notifications
15+
# + Integration tested: Taiga → Mattermost webhook (project events)
16+
# =============================================================================
17+
18+
name: it-stack-taiga-lab05
19+
320
services:
4-
taiga:
21+
22+
# ── PostgreSQL ─────────────────────────────────────────────────────────────
23+
taiga-i05-db:
24+
image: postgres:15-alpine
25+
container_name: taiga-i05-db
26+
restart: unless-stopped
27+
environment:
28+
POSTGRES_DB: taiga
29+
POSTGRES_USER: taiga
30+
POSTGRES_PASSWORD: TaigaLab05!
31+
volumes:
32+
- taiga-i05-db-data:/var/lib/postgresql/data
33+
healthcheck:
34+
test: ["CMD-SHELL", "pg_isready -U taiga"]
35+
interval: 10s
36+
timeout: 5s
37+
retries: 15
38+
networks:
39+
- taiga-i05-net
40+
deploy:
41+
resources:
42+
limits:
43+
memory: 512M
44+
cpus: "0.5"
45+
46+
# ── Redis ──────────────────────────────────────────────────────────────────
47+
taiga-i05-redis:
48+
image: redis:7-alpine
49+
container_name: taiga-i05-redis
50+
restart: unless-stopped
51+
command: redis-server --maxmemory 256mb --maxmemory-policy allkeys-lru
52+
healthcheck:
53+
test: ["CMD", "redis-cli", "ping"]
54+
interval: 10s
55+
timeout: 5s
56+
retries: 10
57+
networks:
58+
- taiga-i05-net
59+
deploy:
60+
resources:
61+
limits:
62+
memory: 256M
63+
cpus: "0.25"
64+
65+
# ── OpenLDAP ───────────────────────────────────────────────────────────────
66+
taiga-i05-ldap:
67+
image: osixia/openldap:1.5.0
68+
container_name: taiga-i05-ldap
69+
restart: unless-stopped
70+
environment:
71+
LDAP_ORGANISATION: "IT-Stack Lab"
72+
LDAP_DOMAIN: lab.local
73+
LDAP_ADMIN_PASSWORD: LdapLab05!
74+
LDAP_CONFIG_PASSWORD: ConfigLab05!
75+
LDAP_BASE_DN: dc=lab,dc=local
76+
LDAP_READONLY_USER: "true"
77+
LDAP_READONLY_USER_USERNAME: readonly
78+
LDAP_READONLY_USER_PASSWORD: ReadOnly05!
79+
ports:
80+
- "3885:389"
81+
volumes:
82+
- taiga-i05-ldap-data:/var/lib/ldap
83+
- taiga-i05-ldap-config:/etc/ldap/slapd.d
84+
healthcheck:
85+
test: ["CMD-SHELL", "ldapsearch -x -H ldap://localhost -b dc=lab,dc=local -D cn=admin,dc=lab,dc=local -w LdapLab05! cn=admin > /dev/null 2>&1 || exit 1"]
86+
interval: 10s
87+
timeout: 5s
88+
retries: 15
89+
networks:
90+
- taiga-i05-net
91+
deploy:
92+
resources:
93+
limits:
94+
memory: 256M
95+
cpus: "0.25"
96+
97+
# ── Keycloak ───────────────────────────────────────────────────────────────
98+
taiga-i05-kc:
99+
image: quay.io/keycloak/keycloak:24.0.3
100+
container_name: taiga-i05-kc
101+
restart: unless-stopped
102+
command: start-dev
103+
environment:
104+
KEYCLOAK_ADMIN: admin
105+
KEYCLOAK_ADMIN_PASSWORD: Admin05!
106+
KC_HEALTH_ENABLED: "true"
107+
KC_DB: dev-file
108+
KC_HOSTNAME_STRICT: "false"
109+
KC_HOSTNAME_STRICT_HTTPS: "false"
110+
KC_HTTP_ENABLED: "true"
111+
ports:
112+
- "8540:8080"
113+
healthcheck:
114+
test: ["CMD-SHELL", "curl -sf http://localhost:8080/realms/master || exit 1"]
115+
interval: 15s
116+
timeout: 10s
117+
retries: 20
118+
start_period: 30s
119+
networks:
120+
- taiga-i05-net
121+
deploy:
122+
resources:
123+
limits:
124+
memory: 1G
125+
cpus: "1.0"
126+
127+
# ── WireMock — Mattermost API mock ─────────────────────────────────────────
128+
taiga-i05-mock:
129+
image: wiremock/wiremock:3.3.1
130+
container_name: taiga-i05-mock
131+
restart: unless-stopped
132+
command: >
133+
--port=8080
134+
--verbose
135+
--global-response-templating
136+
ports:
137+
- "8761:8080"
138+
healthcheck:
139+
test: ["CMD-SHELL", "curl -sf http://localhost:8080/__admin/health || exit 1"]
140+
interval: 10s
141+
timeout: 5s
142+
retries: 10
143+
networks:
144+
- taiga-i05-net
145+
deploy:
146+
resources:
147+
limits:
148+
memory: 256M
149+
cpus: "0.25"
150+
151+
# ── Mailhog ────────────────────────────────────────────────────────────────
152+
taiga-i05-mail:
153+
image: mailhog/mailhog:latest
154+
container_name: taiga-i05-mail
155+
restart: unless-stopped
156+
ports:
157+
- "8740:8025"
158+
networks:
159+
- taiga-i05-net
160+
deploy:
161+
resources:
162+
limits:
163+
memory: 128M
164+
cpus: "0.1"
165+
166+
# ── Taiga Backend ──────────────────────────────────────────────────────────
167+
taiga-i05-back:
168+
image: taigaio/taiga-back:latest
169+
container_name: taiga-i05-back
170+
restart: unless-stopped
171+
depends_on:
172+
taiga-i05-db:
173+
condition: service_healthy
174+
taiga-i05-redis:
175+
condition: service_healthy
176+
taiga-i05-ldap:
177+
condition: service_healthy
178+
taiga-i05-mock:
179+
condition: service_healthy
180+
ports:
181+
- "8041:8000"
182+
environment:
183+
DJANGO_DB_HOST: taiga-i05-db
184+
DJANGO_DB_NAME: taiga
185+
DJANGO_DB_USER: taiga
186+
DJANGO_DB_PASSWORD: TaigaLab05!
187+
DJANGO_SECRET_KEY: taiga-lab05-secret-key-integration
188+
DJANGO_ALLOWED_HOSTS: "*"
189+
CELERY_BROKER_URL: redis://taiga-i05-redis:6379/0
190+
EMAIL_HOST: taiga-i05-mail
191+
EMAIL_PORT: "1025"
192+
KEYCLOAK_URL: http://taiga-i05-kc:8080
193+
KEYCLOAK_REALM: it-stack
194+
KEYCLOAK_CLIENT_ID: taiga
195+
KEYCLOAK_CLIENT_SECRET: TaigaKCSecret05!
196+
LDAP_SERVER: taiga-i05-ldap
197+
LDAP_PORT: "389"
198+
LDAP_BASE_DN: dc=lab,dc=local
199+
LDAP_BIND_DN: cn=admin,dc=lab,dc=local
200+
LDAP_BIND_PASSWORD: LdapLab05!
201+
# Mattermost integration (via WireMock)
202+
MATTERMOST_URL: http://taiga-i05-mock:8080
203+
MATTERMOST_CHANNEL: it-stack-projects
204+
MATTERMOST_WEBHOOK_TOKEN: lab-mm-token-05
205+
networks:
206+
- taiga-i05-net
207+
deploy:
208+
resources:
209+
limits:
210+
memory: 512M
211+
cpus: "0.5"
212+
213+
# ── Taiga Frontend ─────────────────────────────────────────────────────────
214+
taiga-i05-front:
5215
image: taigaio/taiga-front:latest
6-
container_name: it-stack-taiga
216+
container_name: taiga-i05-front
7217
restart: unless-stopped
218+
depends_on:
219+
- taiga-i05-back
8220
ports:
9-
- "80:$firstPort"
221+
- "8440:80"
10222
environment:
11-
- IT_STACK_ENV=lab-05-integration
12-
- KEYCLOAK_URL=
13-
- DB_HOST=
14-
- REDIS_HOST=
15-
- SMTP_HOST=
16-
- GRAYLOG_HOST=
17-
extra_hosts:
18-
- "lab-id1:10.0.50.11"
19-
- "lab-db1:10.0.50.12"
20-
- "lab-proxy1:10.0.50.15"
21-
networks:
22-
- it-stack-net
223+
TAIGA_URL: http://taiga-i05-back:8000
224+
TAIGA_WEBSOCKETS_URL: ws://taiga-i05-back:8000
225+
networks:
226+
- taiga-i05-net
227+
deploy:
228+
resources:
229+
limits:
230+
memory: 256M
231+
cpus: "0.5"
23232

233+
# ── Networks ───────────────────────────────────────────────────────────────────
24234
networks:
25-
it-stack-net:
235+
taiga-i05-net:
236+
name: taiga-i05-net
26237
driver: bridge
238+
239+
# ── Volumes ────────────────────────────────────────────────────────────────────
240+
volumes:
241+
taiga-i05-db-data:
242+
taiga-i05-redis-data:
243+
taiga-i05-ldap-data:
244+
taiga-i05-ldap-config:
245+
taiga-i05-back-data:

0 commit comments

Comments
 (0)