Skip to content

Commit

Permalink
OPSEXP-570: Make ADW URL parameterised (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsuciu authored Oct 9, 2020
1 parent 5db983c commit 9edf728
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
- ssh ec2-user@$control_machine_ip "source ~/.bash_profile;pip install --upgrade awscli 'molecule-ec2';"
- ssh ec2-user@$control_machine_ip "$COMMON_COMMANDS;molecule destroy -s ec2"
- ssh ec2-user@$control_machine_ip "$COMMON_COMMANDS;molecule create -s ec2"
- ssh ec2-user@$control_machine_ip "$COMMON_COMMANDS;sudo setenforce 0; ansible-playbook playbooks/acs.yml -i /opt/buildacs/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER/alfresco-ansible-deployment/molecule_temp_dir/inventory/ansible_inventory.yml"
- ssh ec2-user@$control_machine_ip "$COMMON_COMMANDS;ansible-playbook playbooks/acs.yml -i /opt/buildacs/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER/alfresco-ansible-deployment/molecule_temp_dir/inventory/ansible_inventory.yml"
- echo "wait for repo to be up" && sleep 5m
- ssh ec2-user@$control_machine_ip "$COMMON_COMMANDS;molecule verify -s ec2"
- export TESTHOST=$(ssh ec2-user@$control_machine_ip "$COMMON_COMMANDS;cat molecule_temp_dir/instance_config.yml | yq .[].address -r")
Expand Down
8 changes: 4 additions & 4 deletions roles/adw/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
mode: '0755'
when: not adw_zip.stat.exists

- name: Create "{{ nginx_folder }}/digital-workspace/" dir
- name: Create "{{ nginx_folder }}/{{ request_uri }}/" dir
file:
path: "{{ nginx_folder }}/digital-workspace/"
path: "{{ nginx_folder }}/{{ request_uri }}/"
state: directory
mode: '0755'
when: not adw_zip.stat.exists
Expand All @@ -35,8 +35,8 @@
become: yes
unarchive:
src: "{{ temp_dir }}/alfresco-digital-workspace-{{ adwVersion }}.zip"
dest: "{{ nginx_folder }}/digital-workspace/"
dest: "{{ nginx_folder }}/{{ request_uri }}/"
remote_src: yes
creates: "{{ nginx_folder }}/digital-workspace/app.config.json"
creates: "{{ nginx_folder }}/{{ request_uri }}/app.config.json"

- include_tasks: nginx.yml
2 changes: 1 addition & 1 deletion roles/adw/templates/alfresco_adw.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ server {
proxy_pass_header Set-Cookie;

location / {
root {{ nginx_folder }}/digital-workspace/;
root {{ nginx_folder }}/{{ request_uri }}/;
index index.html index.htm;
}
}
1 change: 1 addition & 0 deletions roles/adw/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
nginx_package_name: "nginx"
nginx_folder: "/usr/share/nginx/html"
temp_dir: "/tmp/digital_workspace"
request_uri: "digital-workspace"

0 comments on commit 9edf728

Please sign in to comment.