diff --git a/roles/openstack/defaults/main.yml b/roles/openstack/defaults/main.yml index 4cd71fb..563befe 100644 --- a/roles/openstack/defaults/main.yml +++ b/roles/openstack/defaults/main.yml @@ -15,3 +15,7 @@ dns_nameservers: openstack_router_name: "yaptide_router" openstack_external_network_name: "external-10-192" openstack_security_group_name: "yaptide_secgr" +openstack_floating_ip_address: "" + +openstack_delete_network_on_teardown: true +openstack_delete_router_on_teardown: true diff --git a/roles/openstack/tasks/clean.yml b/roles/openstack/tasks/clean.yml index 8972a5c..cd99ea0 100644 --- a/roles/openstack/tasks/clean.yml +++ b/roles/openstack/tasks/clean.yml @@ -16,9 +16,11 @@ openstack.cloud.router: state: absent name: "{{ openstack_router_name }}" + when: openstack_delete_router_on_teardown # https://docs.ansible.com/ansible/latest/collections/openstack/cloud/network_module.html - name: Delete the network openstack.cloud.network: state: absent name: "{{ openstack_network_name }}" + when: openstack_delete_network_on_teardown diff --git a/roles/openstack/tasks/deploy.yml b/roles/openstack/tasks/deploy.yml index 280935d..4747ba2 100644 --- a/roles/openstack/tasks/deploy.yml +++ b/roles/openstack/tasks/deploy.yml @@ -74,6 +74,7 @@ server: "{{ openstack_instance_hostname }}" network: "{{ openstack_external_network_name }}" nat_destination: "{{ openstack_network_name }}" + floating_ip_address: "{{ openstack_floating_ip_address | default(omit) }}" reuse: true wait: true register: openstack_floating_ip_facts diff --git a/yap_dev_vars.yml b/yap_dev_vars.yml index f1d3e44..d1c8e97 100644 --- a/yap_dev_vars.yml +++ b/yap_dev_vars.yml @@ -2,12 +2,14 @@ # openstack settings openstack_instance_hostname: 'yap-dev' -openstack_network_name: 'yap-dev-network' +openstack_network_name: 'yaptide-network' openstack_subnet_name: 'yap-dev-subnet' openstack_subnet_cidr: '10.0.0.0/24' openstack_gateway_ip: '10.0.0.1' -openstack_router_name: 'yap-dev-router' +openstack_router_name: 'yaptide-router' openstack_security_group_name: 'yap-dev-secgr' +openstack_delete_network_on_teardown: false +openstack_delete_router_on_teardown: false # where to deploy variable_host: 'yap-dev' diff --git a/yaptide_vars.yml b/yaptide_vars.yml new file mode 100644 index 0000000..d7fccf5 --- /dev/null +++ b/yaptide_vars.yml @@ -0,0 +1,43 @@ +--- + +# openstack settings +openstack_instance_hostname: 'yaptide' +openstack_network_name: 'yaptide-network' +openstack_subnet_name: 'yaptide-subnet' +openstack_subnet_cidr: '20.0.0.0/24' +openstack_gateway_ip: '20.0.0.1' +openstack_router_name: 'yaptide-router' +openstack_security_group_name: 'yaptide-secgr' +openstack_delete_network_on_teardown: false +openstack_delete_router_on_teardown: false + +# where to deploy +variable_host: 'yaptide' + +# general settings +frontend_backend_hostname: 'yaptide.c3.plgrid.pl' +frontend_backend_url: 'https://yaptide.c3.plgrid.pl:8443' +frontend_ui_hostname: 'yaptide.c3.plgrid.pl' +frontend_ui_url: 'https://yaptide.c3.plgrid.pl' + +# SSL certificates +frontend_ssl_crt: 'yap_dev.c3.plgrid.pl.crt' +frontend_ssl_key: 'yap_dev.c3.plgrid.pl.key' +backend_ssl_crt: 'yap_dev.c3.plgrid.pl.crt' +backend_ssl_key: 'yap_dev.c3.plgrid.pl.key' + +# backend cluster settings +backend_cluster: 'ares.cyfronet.pl' +backend_cert_auth_url: 'https://ccm-dev.kdm.cyfronet.pl/key' +backend_backend_external_url: 'https://yaptide.c3.plgrid.pl:8443' + +# keycloak settings +frontend_keycloak_base_url: 'https://sso.pre.plgrid.pl' +frontend_keycloak_realm: 'PLGrid' +frontend_keycloak_client_id: 'yaptide-staging' +backend_keycloak_base_url: 'https://sso.pre.plgrid.pl' +backend_keycloak_realm: 'PLGrid' + +# github repo settings +frontend_repo_version: '1280-unhandled-keycloak-log-in-failure' +backend_repo_version: '394-deploy-fluka-binary-to-backend-from-s3-object'