Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development: Rename broker to registry in firewall #118

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,9 @@
roles:
- role: ls1intum.artemis.broker

- role: ls1intum.artemis.proxy
vars:
proxy_forward_ssh: false
proxy_generate_dh_param: "{{ broker.proxy.generate_dh_param }}"
servers:
- name: "_"
ssl_certificate_path: "{{ broker.proxy.ssl_certificate_path }}"
ssl_certificate_key_path: "{{ broker.proxy.ssl_certificate_key_path }}"
default_server: true
proxy_target_port: 8761

- role: ls1intum.artemis.firewall
tags: firewall
vars:
firewall_hostgroup: broker
# Management Networks - used to allow SSH / HTTP access to Hosts and services
management_network_ipv4: "{{ firewall_management_network_ipv4 }}"
management_network_ipv6: "{{ firewall_management_network_ipv6 }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- role: ls1intum.artemis.firewall
tags: firewall
vars:
firewall_hostgroup: broker
firewall_hostgroup: registry
# Management Networks - used to allow SSH / HTTP access to Hosts and services
management_network_ipv4: "{{ firewall_management_network_ipv4 }}"
management_network_ipv6: "{{ firewall_management_network_ipv6 }}"
Expand Down
6 changes: 3 additions & 3 deletions roles/firewall/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ monitoring_host_ipv6: "2a09:80c0:89:1::32"
You have to configure a special varaible to select the firewall rule set which is applied:

```
firewall_hostgroup: # Can be 'broker', 'nodes', 'proxy' or left blank for default rules
firewall_hostgroup: # Can be 'registry', 'nodes', 'proxy' or left blank for default rules
```

## Example usage:

Example playbook for a broker:
Example playbook for a registry:

```
- role: ls1intum.artemis.firewall
tags: firewall
vars:
firewall_hostgroup: broker
firewall_hostgroup: registry
```
2 changes: 1 addition & 1 deletion roles/firewall/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
wireguard_port: 51820

firewall_hostgroup: # Can be 'broker', 'nodes', 'proxy' or left blank for default rules
firewall_hostgroup: # Can be 'registry', 'nodes', 'proxy' or left blank for default rules

# Management Networks - used to allow SSH / HTTP access to Hosts and services
management_network_ipv4: "172.24.152.0/24"
Expand Down
9 changes: 9 additions & 0 deletions roles/firewall/tasks/deprecations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- name: Display deprecation notice
debug:
msg: "DEPRECATION NOTICE: Please use 'firewall_hostgroup: registry' instead of 'firewall_hostgroup: broker'."
when: firewall_hostgroup == 'broker'

- name: Set default values for deprecated variables
set_fact:
firewall_hostgroup: "registry"
when: firewall_hostgroup == 'broker'
2 changes: 2 additions & 0 deletions roles/firewall/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- include_tasks: deprecations.yml

- name: Install iptables-persistent
become: true
apt:
Expand Down
Loading