forked from trustification/trustification-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New folder organization and bombastic-api (trustification#36)
* New folder organization and bombastic-api * Cleanup * Disable tls for now * Ansible linter : follow postgresql move * Fix readme * Wrap oidc configmap per component * Add missing file and fix too many empty lines * Add envar for oidc ids and url with default empty value * update README * Fix default for varenvs; Update task fail_msg * Make compent_auth more generic * register needs hard values * Restore storage access key and secret names * Trying quotes for task name with variables * Skip list for template[name] * Add missing EOF line * cleanup
- Loading branch information
Showing
27 changed files
with
257 additions
and
224 deletions.
There are no files selected for viewing
This file contains 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 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 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,18 @@ | ||
--- | ||
- name: Create configmap auth for bombastic-api | ||
ansible.builtin.include_tasks: infra/component_auth.yml | ||
vars: | ||
component: | ||
name: "bombastic" | ||
type: "api" | ||
|
||
- name: Deploy bombastic-api | ||
ansible.builtin.include_tasks: install_manifest.yml | ||
vars: | ||
podman_spec: | ||
state: started | ||
systemd_file: bombastic-api | ||
network: "{{ tpa_single_node_podman_network }}" | ||
kube_file_content: "{{ lookup('ansible.builtin.template', 'manifests/bombastic/api/Deployment.yaml.j2') | from_yaml }}" | ||
configmap: "{{ tpa_single_node_kube_manifest_dir }}/bombastic-api-configmap.yml" | ||
configmap_changed: oidc_configmap_result.changed |
This file contains 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 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
File renamed without changes.
This file contains 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 @@ | ||
--- | ||
# Init Guac DBMS | ||
- name: Configure and initialize Guac DBMS | ||
ansible.builtin.include_tasks: guac/init.yml | ||
|
||
- name: Provision Guac collectsub | ||
ansible.builtin.include_tasks: guac/guac_collectsub.yml | ||
vars: | ||
tpa_single_node_guac_csub_tls_cert_pem: "{{ lookup('file', tpa_single_node_guac_csub_tls_cert_pem_path) }}" | ||
tpa_single_node_guac_csub_tls_cert_key: "{{ lookup('file', tpa_single_node_guac_csub_tls_cert_key_path) }}" | ||
|
||
- name: Provision Guac graphql | ||
ansible.builtin.include_tasks: guac/guac_graphql.yml | ||
vars: | ||
tpa_single_node_guac_graphql_tls_cert_pem: "{{ lookup('file', tpa_single_node_guac_graphql_tls_cert_pem_path) }}" | ||
tpa_single_node_guac_graphql_tls_cert_key: "{{ lookup('file', tpa_single_node_guac_graphql_tls_cert_key_path) }}" |
This file contains 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,13 @@ | ||
--- | ||
- name: Generate OIDC auth ConfigMap manifest for {{ component.name }}-{{ component.type }} | ||
ansible.builtin.template: | ||
src: "{{ role_path }}/templates/manifests/infra/Configmap-{{ oidc }}.yaml.j2" | ||
dest: "{{ tpa_single_node_kube_manifest_dir }}/{{ component.name }}-{{ component.type }}-configmap.yml" | ||
mode: "0600" | ||
register: oidc_configmap_result | ||
|
||
- name: Retrieve the checksum of the ConfigMap | ||
ansible.builtin.stat: | ||
path: "{{ tpa_single_node_kube_manifest_dir }}/{{ component.name }}-{{ component.type }}-configmap.yml" | ||
checksum_algorithm: sha256 | ||
register: oidc_configmap_checksum |
This file contains 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,12 @@ | ||
--- | ||
- name: Configure and deploy Postgres | ||
ansible.builtin.include_tasks: infra/postgresql.yml | ||
args: | ||
apply: | ||
become: true | ||
|
||
- name: Configure OIDC | ||
ansible.builtin.include_tasks: infra/oidc.yml | ||
|
||
- name: Configure Storage | ||
ansible.builtin.include_tasks: infra/storage.yml |
This file contains 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 @@ | ||
--- | ||
- name: Set OIDC variable | ||
ansible.builtin.set_fact: | ||
oidc: keycloak | ||
|
||
- name: Overwrite OIDC variable | ||
ansible.builtin.set_fact: | ||
oidc: cognito | ||
when: "'cognito' in (tpa_single_node_oidc_issuer_url | string | safe)" | ||
|
||
- name: Check OIDC Walker is defined | ||
ansible.builtin.assert: | ||
that: | ||
- tpa_single_node_oidc_provider_client_secret is defined | ||
- tpa_single_node_oidc_provider_client_secret != "" | ||
fail_msg: OIDC Walker Secret is not defined |
File renamed without changes.
This file contains 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,20 @@ | ||
--- | ||
- name: Check storage access and key secrets are defined | ||
ansible.builtin.assert: | ||
that: | ||
- tpa_single_node_storage_access_key is defined | ||
- tpa_single_node_storage_access_key != "" | ||
- tpa_single_node_storage_secret_key is defined | ||
- tpa_single_node_storage_secret_key != "" | ||
fail_msg: Storage Access Key and Secret is not defined | ||
|
||
- name: Generate storage secret manifest | ||
ansible.builtin.template: | ||
src: "{{ role_path }}/templates/manifests/infra/Secret-storage.yaml.j2" | ||
dest: "{{ tpa_single_node_storage_secret }}" | ||
mode: "0600" | ||
|
||
- name: Apply storage secret manifest | ||
containers.podman.podman_play: | ||
kube_file: "{{ tpa_single_node_storage_secret }}" | ||
state: started |
File renamed without changes.
This file contains 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 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 was deleted.
Oops, something went wrong.
This file contains 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,18 @@ | ||
--- | ||
- name: Create configmap auth for v11y-api | ||
ansible.builtin.include_tasks: infra/component_auth.yml | ||
vars: | ||
component: | ||
name: "v11y" | ||
type: "api" | ||
|
||
- name: Deploy v11y-api | ||
ansible.builtin.include_tasks: install_manifest.yml | ||
vars: | ||
podman_spec: | ||
state: started | ||
systemd_file: v11y-api | ||
network: "{{ tpa_single_node_podman_network }}" | ||
kube_file_content: "{{ lookup('ansible.builtin.template', 'manifests/v11y/api/Deployment.yaml.j2') | from_yaml }}" | ||
configmap: "{{ tpa_single_node_kube_manifest_dir }}/v11y-api-configmap.yml" | ||
configmap_changed: oidc_configmap_result.changed |
This file contains 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
19 changes: 0 additions & 19 deletions
19
roles/tpa_single_node/templates/manifests/bombastic/api/020-ConfigMap-auth.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.