-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #395 from tapis-project/dev
Dev
- Loading branch information
Showing
9 changed files
with
120 additions
and
41 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
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 |
---|---|---|
@@ -1,22 +1,58 @@ | ||
--- | ||
|
||
- name: Set default values for vars | ||
# Ensure global vars are defined and checked | ||
|
||
- name: Test that important variables are present and not empty | ||
assert: | ||
that: | ||
- tapisdir != '' | ||
- tapisdatadir != '' | ||
- components_to_deploy != '' | ||
- global_service_tenant_id != '' | ||
- global_devtenant_id != '' | ||
- global_service_domain != '' | ||
- global_primary_site_admin_tenant_base_url != '' | ||
- global_service_url != '' | ||
- global_devtenant_url != '' | ||
- global_vault_url != '' | ||
|
||
- name: If associate site (site_type 2), check a few variables | ||
assert: | ||
that: | ||
- global_service_tenant_id != 'admin' | ||
- global_devtenant_id != 'dev' | ||
- global_tapis_domain != '{{ global_service_domain }}' | ||
when: | ||
- site_type == 2 | ||
|
||
- name: Print important vars | ||
ansible.builtin.debug: | ||
var: "{{ item }}" | ||
with_items: | ||
- tapisdir | ||
- tapisdatadir | ||
- components_to_deploy | ||
- global_service_tenant_id | ||
- global_devtenant_id | ||
- global_service_domain | ||
- global_primary_site_admin_tenant_base_url | ||
- global_service_url | ||
- global_devtenant_url | ||
- global_vault_url | ||
|
||
|
||
# Use set_fact on global vars so the following roles can use them | ||
|
||
- name: Set global vars | ||
ansible.builtin.set_fact: | ||
global_service_tenant_id: '{{ global_service_tenant_id | default(global_service_tenant_id_default) }}' | ||
tapisdir: '{{ tapisdir | default(tapisdir_default) }}' | ||
tapisdatadir: '{{ tapisdatadir | default(tapisdatadir_default) }}' | ||
global_vault_url: '{{ global_vault_url | default(global_vault_url_default) }}' | ||
#global_service_url: '{{ global_service_url | default(global_service_url_default) }}' | ||
tapisdir: '{{ tapisdir }}' | ||
tapisdatadir: '{{ tapisdatadir }}' | ||
components_to_deploy: '{{ components_to_deploy }}' | ||
global_service_tenant_id: '{{ global_service_tenant_id }}' | ||
global_devtenant_id: '{{ global_devtenant_id }}' | ||
global_service_domain: '{{ global_service_domain }}' | ||
global_primary_site_admin_tenant_base_url: '{{ global_primary_site_admin_tenant_base_url }}' | ||
global_service_url: '{{ global_service_url }}' | ||
components_to_deploy: '{{ components_to_deploy | default(components_to_deploy_default) }}' | ||
#global_devtenant_url: '{{ global_devtenant_url | default(global_devtenant_url_default) }}' | ||
global_devtenant_url: '{{ global_devtenant_url }}' | ||
#global_primary_site_admin_tenant_base_url: '{{ global_primary_site_admin_tenant_base_url | default(global_primary_site_admin_tenant_base_url_default) }}' | ||
global_primary_site_admin_tenant_base_url: '{{ global_primary_site_admin_tenant_base_url }}' | ||
global_vault_url: '{{ global_vault_url }}' | ||
|
||
- name: Values being used | ||
ansible.builtin.debug: | ||
msg: | ||
- 'tapisdir: {{ tapisdir }}' | ||
- 'tapisdatadir: {{ tapisdatadir }}' | ||
- 'components_to_deploy: {{ components_to_deploy }}' |
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
12 changes: 9 additions & 3 deletions
12
playbooks/roles/proxy/templates/kube/nginx/locations/ui.conf
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 |
---|---|---|
@@ -1,11 +1,17 @@ | ||
# ui | ||
location /tapis-ui | ||
location / | ||
{ | ||
{% if "tapisui" in proxy_nginx_service_list %} | ||
proxy_pass http://tapisui-service:3000; | ||
{% else %} | ||
proxy_pass {{proxy_primary_site_admin_tenant_base_url}}; | ||
proxy_pass {{ proxy_primary_site_admin_tenant_base_url }}; | ||
{% endif %} | ||
proxy_redirect off; | ||
proxy_set_header Host $host; | ||
} | ||
} | ||
|
||
location ~* ^/(tapis-ui|tapisui|ui) | ||
{ | ||
# rewrite path to move /tapis-ui, /tapisui, and /ui traffic to / | ||
return 301 https://$host/; | ||
} |
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 |
---|---|---|
|
@@ -8,4 +8,4 @@ spec: | |
app: tapisui-deployment | ||
ports: | ||
- port: 3000 | ||
targetPort: 3000 | ||
targetPort: 80 |