-
Notifications
You must be signed in to change notification settings - Fork 2
Support federated API deployment #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
8000e4b
Use `demo` collection for testing
Ndpnt b8bed94
Make infrastructure set up modular
Ndpnt 8b9133c
Refactor engine playbooks
Ndpnt 9c57eb6
Create role for deploying federated API
Ndpnt 8676317
Create playbooks for setting up and deploying API
Ndpnt 3f93ebb
Make the nginx role configurable
Ndpnt fd05a16
Add required config entry for testing
Ndpnt 49560e2
Remove special character
Ndpnt e87d303
Remove obsolete tags
Ndpnt 747a3d5
Move Nginx app specific conf from infra to apps
Ndpnt 7d6919e
Rename variables to avoid conflicts
Ndpnt df700e1
Rename config file for clarity
Ndpnt c7cd605
Remove obsolete tags
Ndpnt 8370c49
Rename and adapt playbooks
Ndpnt c7d5925
Update documentation
Ndpnt 3bab5be
Remove whitespaces
Ndpnt 874fca5
Add changelog entry
Ndpnt 887bcbc
fixup! Use `demo` collection for testing
MattiSG aca3109
Add funder
Ndpnt ea12d9e
Improve doc
Ndpnt 32bda7c
Use safer dependencies installation
Ndpnt 9e7d344
Use sandbox repositories for testing
Ndpnt 400aeb4
Prefix file names to avoid potential conflicts
Ndpnt dc0db92
Improve variable name
Ndpnt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,6 @@ | ||
--- | ||
- name: Set up infrastructure and deploy the Open Terms Archive engine | ||
hosts: all | ||
|
||
- import_playbook: infrastructure.yml | ||
- import_playbook: application.yml |
This file contains hidden or 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,14 @@ | ||
--- | ||
- name: Deploy the Open Terms Archive engine | ||
hosts: all | ||
|
||
tasks: | ||
- name: Load the production config | ||
ansible.builtin.include_vars: | ||
name: app_config | ||
file: "{{ inventory_dir }}/{{ ota_engine_config_path | default('../config/production.json') }}" | ||
tags: always | ||
|
||
- ansible.builtin.include_role: | ||
name: engine | ||
tags: always |
This file contains hidden or 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,26 @@ | ||
--- | ||
- name: Set up infrastructure | ||
hosts: all | ||
become: true | ||
|
||
tasks: | ||
- name: Load OTA engine config | ||
ansible.builtin.include_vars: | ||
name: app_config | ||
file: "{{ inventory_dir }}/{{ ota_engine_config_path | default('../config/production.json') }}" | ||
tags: always | ||
|
||
- ansible.builtin.include_role: | ||
name: infrastructure/mongo | ||
when: | ||
- (app_config.recorder.versions.storage.type is defined and app_config.recorder.versions.storage.type == 'mongo') or | ||
(app_config.recorder.snapshots.storage.type is defined and app_config.recorder.snapshots.storage.type == 'mongo') | ||
# Skip Debian 11 with ARM architecture as it is not currently supported by MongoDB. | ||
# See https://www.mongodb.com/docs/manual/installation/#supported-platforms | ||
- ansible_distribution != 'Debian' or (ansible_distribution == 'Debian' and ansible_facts['architecture'] != 'aarch64') | ||
|
||
roles: | ||
- role: infrastructure/git | ||
- role: infrastructure/node | ||
- role: infrastructure/chromium | ||
- role: infrastructure/nginx |
This file contains hidden or 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,6 @@ | ||
--- | ||
- name: Set up infrastructure and deploy the Open Terms Archive federated API | ||
hosts: all | ||
|
||
- import_playbook: infrastructure.yml | ||
- import_playbook: application.yml |
This file contains hidden or 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,6 @@ | ||
--- | ||
- name: Deploy the Open Terms Archive federated API | ||
hosts: all | ||
|
||
roles: | ||
- role: federated-api |
This file contains hidden or 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,9 @@ | ||
--- | ||
- name: Set up infrastructure | ||
hosts: all | ||
become: true | ||
|
||
roles: | ||
- role: infrastructure/git | ||
- role: infrastructure/node | ||
- role: infrastructure/nginx |
This file contains hidden or 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,4 +1,4 @@ | ||
ota_declarations_directory: "{{ app_config.name }}" | ||
ota_declarations_branch: main | ||
ota_snapshots_branch: main | ||
ota_versions_branch: main | ||
ota_engine_declarations_directory: "{{ app_config.name }}" | ||
ota_engine_declarations_branch: main | ||
ota_engine_snapshots_branch: main | ||
ota_engine_versions_branch: main |
This file contains hidden or 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,6 @@ | ||
--- | ||
- name: Restart NGINX | ||
become: true | ||
ansible.builtin.service: | ||
name: nginx | ||
state: restarted |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.