Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
grzanka committed Oct 29, 2023
1 parent d71a790 commit 3849b05
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
3 changes: 3 additions & 0 deletions roles/backend/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ backend_backend_external_url: "http://localhost:5000"
backend_keycloak_base_url: ""
backend_keycloak_realm: ""

backend_ssl_crt : "server.crt"

Check failure on line 12 in roles/backend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.9)

yaml[colons]

Too many spaces before colon

Check failure on line 12 in roles/backend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.10)

yaml[colons]

Too many spaces before colon

Check failure on line 12 in roles/backend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.11)

yaml[colons]

Too many spaces before colon
backend_ssl_key : "server.key"

Check failure on line 13 in roles/backend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.9)

yaml[colons]

Too many spaces before colon

Check failure on line 13 in roles/backend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.10)

yaml[colons]

Too many spaces before colon

Check failure on line 13 in roles/backend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.11)

yaml[colons]

Too many spaces before colon

ansible_become: false

Check warning on line 15 in roles/backend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.9)

var-naming[no-role-prefix]

Variables names from within roles should use backend_ as a prefix. (vars: ansible_become)

Check warning on line 15 in roles/backend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.10)

var-naming[no-role-prefix]

Variables names from within roles should use backend_ as a prefix. (vars: ansible_become)

Check warning on line 15 in roles/backend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.11)

var-naming[no-role-prefix]

Variables names from within roles should use backend_ as a prefix. (vars: ansible_become)
17 changes: 10 additions & 7 deletions roles/backend/tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@
version: '{{ backend_repo_version }}'
force: true # at later stages repo can be manually modified, therefore we do a force checkout

- name: Copy the certificate files
- name: Copy the SSL certificate from local machine
ansible.builtin.copy:
src: '{{ item }}'
dest: '{{ backend_repo_workdir }}'
src: '{{ backend_ssl_crt }}'
dest: '{{ backend_repo_workdir }} / server.crt'
mode: '0400'

- name: Copy the SSL key from local machine
ansible.builtin.copy:
src: '{{ backend_ssl_key }}'
dest: '{{ backend_repo_workdir }} / server.key'
mode: '0400'
with_items:
- 'server.crt'
- 'server.key'

# get fact about number of cores
# # https://docs.ansible.com/ansible/latest/collections/ansible/builtin/setup_module.html
# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/setup_module.html
- name: Get number of cores
ansible.builtin.setup:
filter: ansible_processor_vcpus
Expand Down
3 changes: 3 additions & 0 deletions roles/frontend/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ frontend_ui_url: "http://localhost:80"
frontend_keycloak_base_url: ""
frontend_keycloak_realm: ""
frontend_keycloak_client_id: ""

frontend_ssl_crt : "server.crt"

Check failure on line 15 in roles/frontend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.9)

yaml[colons]

Too many spaces before colon

Check failure on line 15 in roles/frontend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.10)

yaml[colons]

Too many spaces before colon

Check failure on line 15 in roles/frontend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.11)

yaml[colons]

Too many spaces before colon
frontend_ssl_key : "server.key"

Check failure on line 16 in roles/frontend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.9)

yaml[colons]

Too many spaces before colon

Check failure on line 16 in roles/frontend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.10)

yaml[colons]

Too many spaces before colon

Check failure on line 16 in roles/frontend/defaults/main.yml

View workflow job for this annotation

GitHub Actions / linter (3.11)

yaml[colons]

Too many spaces before colon
16 changes: 10 additions & 6 deletions roles/frontend/tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@
regexp: '^(\s*server_name\s*)localhost;'
line: 'server_name {{ frontend_ui_hostname }};'

- name: Copy the certificate files
- name: Copy the SSL certificate from local machine
ansible.builtin.copy:
src: '{{ item }}'
dest: '{{ frontend_repo_workdir }}'
src: '{{ frontend_ssl_crt }}'
dest: '{{ frontend_repo_workdir }} / server.crt'
mode: '0400'
with_items:
- 'server.crt'
- 'server.key'

- name: Copy the SSL key from local machine
ansible.builtin.copy:
src: '{{ frontend_ssl_key }}'
dest: '{{ frontend_repo_workdir }} / server.key'
mode: '0400'


- name: Create .env file with REACT_APP_BACKEND_URL
ansible.builtin.blockinfile:
Expand Down
2 changes: 1 addition & 1 deletion yap_dev_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ backend_keycloak_realm: 'PLGrid'

# github repo settings
frontend_repo_version: '1280-unhandled-keycloak-log-in-failure'
backend_repo_version: 'master'
backend_repo_version: '394-deploy-fluka-binary-to-backend-from-s3-object'

0 comments on commit 3849b05

Please sign in to comment.