-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for distributed architecture #2
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
Merged
steven-schattenberg-itential
merged 8 commits into
itential:main
from
kvelarde-itential:feature/distributed_architecture
Sep 5, 2025
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0bc66a1
Rename server role to gateway
kvelarde-itential a68214f
Add server and runner systemd service scripts
kvelarde-itential c00333e
Re-work handlers
kvelarde-itential 6ca046a
Streamline service assert
kvelarde-itential ff8cb94
Use common vars in server/runner
kvelarde-itential cfe95ae
Fix firewalld configuration
kvelarde-itential c7d356f
Standardize client cert dir var
kvelarde-itential 9c7ffcd
Add changes from PR review
kvelarde-itential File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| - name: Install and configure IAG5 runners | ||
| hosts: iag5_runners | ||
| become: true | ||
| roles: | ||
| # Perform a base installation of IAG5 runner | ||
| - role: itential.iag5.gateway | ||
| vars: | ||
| gateway_application_mode: runner |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| collections: [] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| # application variables | ||
| gateway_application_cluster_id: cluster_1 | ||
| gateway_application_ca_certificate_file: "{{ gateway_cert_dir }}/ca.pem" | ||
| gateway_application_working_dir: "{{ gateway_data_dir }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| # connect variables | ||
| gateway_connect_enabled: true | ||
| gateway_connect_certificate_file: "{{ gateway_cert_dir }}/gw-manager.pem" | ||
| gateway_connect_private_key_file: "{{ gateway_cert_dir }}/gw-manager-key.pem" | ||
| gateway_connect_insecure_tls: false | ||
| gateway_connect_server_ha_enabled: false | ||
| gateway_connect_server_ha_is_primary: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| # features variables | ||
| gateway_features_ansible_enabled: true | ||
| gateway_features_hostkeys_enabled: true | ||
| gateway_features_opentofu_enabled: true | ||
| gateway_features_python_enabled: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| # server user/group | ||
| gateway_user: itential | ||
| gateway_group: itential | ||
|
|
||
| gateway_config_dir: /etc/gateway | ||
| gateway_cert_dir: /etc/ssl/gateway | ||
|
|
||
| gateway_upload_certs: false | ||
| gateway_use_selfsigned_certs: false | ||
| # TODO: Document these in the README | ||
| # gateway_application_local_ca_certificate_file: ./itential_certs/server.csr | ||
| # gateway_connect_local_certificate_file: ./itential_certs/server.crt | ||
| # gateway_connect_local_private_key_file: ./itential_certs/server.key | ||
| # gateway_server_certificate_file: ./itential_certs/server.crt | ||
| # gateway_server_local_private_key_file: ./itential_certs/server.key | ||
|
|
||
| # python installation | ||
| gateway_python_packages: | ||
| - python3.12 | ||
| - python3.12-pip | ||
| gateway_python_executable: /usr/bin/python3.12 | ||
| gateway_pip_executable: /usr/bin/pip3.12 | ||
| gateway_local_bin_dir: "/home/{{ gateway_user }}/.local/bin" | ||
steven-schattenberg-itential marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # opentofu installation | ||
| gateway_opentofu_packages: | ||
| - tofu | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| # log variables | ||
| gateway_log_console_json: false | ||
| gateway_log_file_enabled: true | ||
| gateway_log_file_json: false | ||
| gateway_log_level: INFO | ||
| gateway_log_server_dir: /var/log/gateway | ||
| gateway_log_timestamp_timezone: utc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| # registry variables | ||
| gateway_registry_default_overridable: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| # runner variables | ||
| gateway_runner_listen_address: "{{ gateway_listen_address }}" | ||
| gateway_runner_port: "{{ gateway_port }}" | ||
| gateway_runner_announcement_address: | ||
steven-schattenberg-itential marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| gateway_runner_runtime_data_dir: "{{ gateway_data_dir }}" | ||
| gateway_runner_use_tls: "{{ gateway_use_tls }}" | ||
| gateway_runner_certificate_file: "{{ gateway_cert_dir }}/server.pem" | ||
| gateway_runner_private_key_file: "{{ gateway_cert_dir }}/server-key.pem" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| # secrets variables | ||
| gateway_secrets_encrypt_key_dir: "{{ gateway_data_dir }}/keys" | ||
| gateway_secrets_encrypt_key_file: "{{ gateway_secrets_encrypt_key_dir }}/encryption-key" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| # server variables | ||
| # TODO: Discuss with gateway team. The docs specify 127.0.0.1. But the client cannot connect | ||
| # unless server is listening on all interfaces, not just localhost. | ||
| gateway_server_listen_address: "{{ gateway_listen_address }}" | ||
| gateway_server_port: "{{ gateway_port }}" | ||
| gateway_server_runtime_data_dir: "{{ gateway_data_dir }}" | ||
| gateway_server_distributed_execution: false | ||
| gateway_server_api_key_expiration: 1440 | ||
| gateway_server_use_tls: "{{ gateway_use_tls }}" | ||
| gateway_server_certificate_file: "{{ gateway_cert_dir }}/server.pem" | ||
| gateway_server_private_key_file: "{{ gateway_cert_dir }}/server-key.pem" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| gateway_data_dir: /var/lib/gateway | ||
| gateway_listen_address: 0.0.0.0 | ||
| gateway_port: 50051 | ||
| gateway_use_tls: true | ||
| gateway_requirements_file: requirements.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| # store variables | ||
| gateway_store_backend: local | ||
| gateway_store_etcd_ca_certificate_file: | ||
| gateway_store_etcd_certificate_file: | ||
| gateway_store_etcd_client_cert_auth: false | ||
| gateway_store_etcd_hosts: localhost:2379 | ||
| gateway_store_etcd_private_key_file: | ||
| gateway_store_etcd_use_tls: true | ||
| gateway_store_dynamodb_table_name: itential.gateway5.store | ||
| gateway_store_dynamodb_aws_access_key_id: | ||
| gateway_store_dynamodb_aws_secret_access_key: | ||
| gateway_store_dynamodb_aws_session_token: | ||
| gateway_store_dynamodb_aws_region: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| # terminal variables | ||
| gateway_terminal_no_color: false | ||
| gateway_terminal_timestamp_timezone: utc |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| - name: Gather service facts | ||
| ansible.builtin.service_facts: | ||
|
|
||
| - name: Open Gateway server port on FirewallD Public Zone | ||
| ansible.posix.firewalld: | ||
| port: "{{ gateway_server_port }}/tcp" | ||
| permanent: true | ||
| state: enabled | ||
| zone: public | ||
| immediate: true | ||
| when: | ||
| - gateway_application_mode == 'server' | ||
| - ansible_facts.services["firewalld.service"] is defined | ||
| - ansible_facts.services["firewalld.service"].state == "running" | ||
| - ansible_facts.services["firewalld.service"].status == "enabled" | ||
|
|
||
| - name: Open Gateway runner port on FirewallD Public Zone | ||
| ansible.posix.firewalld: | ||
| port: "{{ gateway_runner_port }}/tcp" | ||
| permanent: true | ||
| state: enabled | ||
| zone: public | ||
| immediate: true | ||
| when: | ||
| - gateway_application_mode == 'runner' | ||
| - ansible_facts.services["firewalld.service"] is defined | ||
| - ansible_facts.services["firewalld.service"].state == "running" | ||
| - ansible_facts.services["firewalld.service"].status == "enabled" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Copyright (c) 2025, Itential, Inc | ||
| # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
| --- | ||
| - name: Create the gateway server configuration file | ||
| ansible.builtin.template: | ||
| src: "server.conf.j2" | ||
| dest: "{{ gateway_config_dir }}/gateway.conf" | ||
| mode: "0600" | ||
| owner: "{{ gateway_user }}" | ||
| group: "{{ gateway_group }}" | ||
| lstrip_blocks: true | ||
| backup: true | ||
| when: gateway_application_mode == 'server' | ||
|
|
||
| - name: Create the gateway runner configuration file | ||
| ansible.builtin.template: | ||
| src: "runner.conf.j2" | ||
| dest: "{{ gateway_config_dir }}/gateway.conf" | ||
| mode: "0600" | ||
| owner: "{{ gateway_user }}" | ||
| group: "{{ gateway_group }}" | ||
| lstrip_blocks: true | ||
| backup: true | ||
| when: gateway_application_mode == 'runner' | ||
|
|
||
| - name: Create the gateway systemd file | ||
| ansible.builtin.template: | ||
| src: iagctl.service.j2 | ||
| dest: /usr/lib/systemd/system/iagctl.service | ||
| owner: root | ||
| group: root | ||
| mode: "0644" | ||
|
|
||
| - name: Create the gateway encryption key file | ||
| ansible.builtin.copy: | ||
| content: "{{ gateway_secrets_encrypt_key }}" | ||
| dest: "{{ gateway_secrets_encrypt_key_file }}" | ||
| mode: "0600" | ||
| owner: "{{ gateway_user }}" | ||
| group: "{{ gateway_group }}" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.