Skip to content

Commit aac424d

Browse files
pablomhclaude
andcommitted
Simplify network topology: replace foreman-db, foreman-cache, foreman-app with foreman-internal
All backend services (PostgreSQL, Redis, Candlepin, Pulp, Foreman, Dynflow) now share a single isolated internal network. This addresses the feedback in PR theforeman#403: - ehelms: start with a single network model to reduce complexity - ekohl: merge foreman-db and foreman-cache since all services need both foreman-proxy-net is kept separate as it serves a distinct purpose (Foreman Proxy <-> Foreman communication). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7800f9d commit aac424d

6 files changed

Lines changed: 11 additions & 26 deletions

File tree

src/playbooks/deploy/deploy.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,9 @@
2424
certificate_checks_ca: "{{ ca_certificate }}"
2525
- role: deploy_network
2626
vars:
27-
deploy_network_name: foreman-db
27+
deploy_network_name: foreman-internal
2828
deploy_network_internal: true
2929
deploy_network_isolate: true
30-
- role: deploy_network
31-
vars:
32-
deploy_network_name: foreman-cache
33-
deploy_network_internal: true
34-
deploy_network_isolate: true
35-
- role: deploy_network
36-
vars:
37-
deploy_network_name: foreman-app
3830
- role: deploy_network
3931
vars:
4032
deploy_network_name: foreman-proxy-net

src/roles/candlepin/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ candlepin_ciphers:
1515
candlepin_container_image: quay.io/foreman/candlepin
1616
candlepin_container_tag: "4.4.14"
1717
candlepin_registry_auth_file: /etc/foreman/registry-auth.json
18-
candlepin_networks: "{{ (['foreman-db'] if database_mode == 'internal' else []) + ['foreman-app'] }}"
18+
candlepin_networks: foreman-internal
1919

2020
candlepin_database_host: postgresql
2121
candlepin_database_port: 5432

src/roles/foreman/tasks/main.yaml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@
9393
state: quadlet
9494
sdnotify: true
9595
network:
96-
- foreman-db
97-
- foreman-cache
98-
- foreman-app
96+
- foreman-internal
9997
- foreman-proxy-net
10098
ports:
10199
- "127.0.0.1:3000:3000"
@@ -132,9 +130,7 @@
132130
state: quadlet
133131
sdnotify: true
134132
network:
135-
- foreman-db
136-
- foreman-cache
137-
- foreman-app
133+
- foreman-internal
138134
hostname: "{{ ansible_facts['fqdn'] }}"
139135
volume:
140136
- 'foreman-data-run:/var/run/foreman:z'
@@ -186,9 +182,7 @@
186182
image: "{{ foreman_container_image }}:{{ foreman_container_tag }}"
187183
sdnotify: false
188184
network:
189-
- foreman-db
190-
- foreman-cache
191-
- foreman-app
185+
- foreman-internal
192186
hostname: "{{ ansible_facts['fqdn'] }}"
193187
command: "foreman-rake {{ item.rake }}"
194188
volume:
@@ -238,7 +232,7 @@
238232
- bin/rails db:migrate && bin/rails db:seed
239233
detach: false
240234
rm: true
241-
network: "{{ ['foreman-db'] if database_mode == 'internal' else ['foreman-app'] }}"
235+
network: foreman-internal
242236
env:
243237
FOREMAN_ENABLED_PLUGINS: "{{ foreman_plugins | join(' ') }}"
244238
secrets:

src/roles/postgresql/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ postgresql_container_image: quay.io/sclorg/postgresql-13-c9s
33
postgresql_container_tag: "latest"
44
postgresql_registry_auth_file: /etc/foreman/registry-auth.json
55
postgresql_container_name: postgresql
6-
postgresql_network: foreman-db
6+
postgresql_network: foreman-internal
77
postgresql_socket_dir: /var/run/postgresql
88
postgresql_restart_policy: always
99

src/roles/pulp/defaults/main.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,13 @@ pulp_database_user: pulp
3636
pulp_database_host: postgresql
3737
pulp_redis_url: "redis://redis:6379/8"
3838
pulp_networks:
39-
- foreman-db
40-
- foreman-cache
41-
- foreman-app
39+
- foreman-internal
4240
pulp_api_ports:
4341
- "127.0.0.1:24817:24817"
4442
pulp_content_ports:
4543
- "127.0.0.1:24816:24816"
46-
pulp_migration_networks: "{{ ['foreman-db'] if database_mode == 'internal' else ['foreman-app'] }}"
44+
pulp_migration_networks:
45+
- foreman-internal
4746
pulp_database_port: 5432
4847
pulp_database_ssl_mode: disabled
4948
pulp_database_ssl_ca: None

src/roles/redis/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
redis_container_image: quay.io/sclorg/redis-6-c9s
33
redis_container_tag: "latest"
44
redis_registry_auth_file: /etc/foreman/registry-auth.json
5-
redis_network: foreman-cache
5+
redis_network: foreman-internal

0 commit comments

Comments
 (0)