-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into athena-module-config
- Loading branch information
Showing
17 changed files
with
341 additions
and
13 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
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,13 +1,25 @@ | ||
ARTEMIS_DOCKER_TAG='{{ artemis_build_version }}' | ||
ARTEMIS_SSH_KEY_PATH='{{ artemis_ssh_key_path }}' | ||
|
||
ARTEMIS_ENV_FILE='{{ artemis_working_directory }}/artemis.env' | ||
{% if is_multinode_install %} | ||
{% for node_id in range(1, artemis_node_count + 1) %} | ||
ARTEMIS_NODE_{{ node_id }}_ENV_FILE='{{ artemis_working_directory }}/node{{ node_id }}.env' | ||
{% endfor %} | ||
{% endif %} | ||
|
||
ARTEMIS_VOLUME_MOUNT='{{ artemis_working_directory }}/data/artemis' | ||
ARTEMIS_LEGAL_MOUNT='{{ artemis_working_directory }}/legal' | ||
ARTEMIS_DATA_EXPORT_MOUNT='{{ artemis_working_directory }}/data-exports' | ||
|
||
DATABASE_ENV_FILE='{{ artemis_working_directory }}/database.env' | ||
DATABASE_VOLUME_MOUNT='{{ artemis_working_directory }}/data/database' | ||
|
||
# Broker & Registry vars | ||
REGISTRY_PASSWORD='{{ artemis_jhipster_registry_password }}' | ||
BROKER_USER='{{ broker.username }}' | ||
BROKER_PASSWORD='{{ broker.password }}' | ||
|
||
# Nginx vars | ||
NGINX_PROXY_SSL_CERTIFICATE_PATH='{{ proxy_ssl_certificate_path }}' | ||
NGINX_PROXY_SSL_CERTIFICATE_KEY_PATH='{{ proxy_ssl_certificate_key_path }}' |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SPRING_PROFILES_ACTIVE='{{ artemis_spring_profiles }}{% if docker_node_id == 1 %},scheduling{% endif %}' | ||
EUREKA_INSTANCE_INSTANCEID='Artemis:{{ docker_node_id }}' | ||
EUREKA_INSTANCE_HOSTNAME='artemis-app-node-{{ docker_node_id }}' | ||
SPRING_HAZELCAST_INTERFACE='artemis-app-node-{{ docker_node_id }}' |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Pyris | ||
========= | ||
|
||
This role installs Pyris on a host. The role supports single node installations via Docker | ||
|
||
Role Variables | ||
-------------- | ||
Default variables can be found in the `defaults/main.yml` file. | ||
|
||
### Variables that have to be configured for a single node installation: | ||
|
||
``` | ||
pyris_deployment_user_public_key: #FIXME | ||
pyris_config: #FIXME | ||
proxy_ssl_certificate_path: #FIXME | ||
proxy_ssl_certificate_key_path: #FIXME | ||
``` | ||
|
||
pyris_config is the configuration for Pyris. See https://github.com/ls1intum/Pyris for details |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
pyris_build_version: "latest" | ||
pyris_working_directory: "/opt/pyris" | ||
|
||
############################################################################## | ||
# Pyris Linux Users | ||
############################################################################## | ||
|
||
pyris_user_name: "pyris" | ||
pyris_user_group: "pyris" | ||
pyris_user_uid: "1337" | ||
pyris_user_gid: "1337" | ||
|
||
pyris_create_deployment_user: false | ||
pyris_deployment_user_name: deployment | ||
pyris_deployment_user_uid: 1338 | ||
pyris_deployment_user_public_key: "" | ||
pyris_deployment_user_comment: "User to deploy pyris to this host" | ||
|
||
|
||
############################################################################## | ||
# OpenAI Setup | ||
############################################################################## | ||
|
||
pyris_config: #FIXME | ||
|
||
|
||
############################################################################## | ||
# Nginx Setup | ||
############################################################################## | ||
|
||
proxy_ssl_certificate_path: #FIXME | ||
proxy_ssl_certificate_key_path: #FIXME |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
# handlers file for pyris | ||
- name: restart docker compose pyris | ||
become: true | ||
shell: | | ||
./pyris-docker.sh restart {{ pyris_build_version }} {{ pyris_branch }} | ||
args: | ||
chdir: "{{ pyris_working_directory }}" | ||
listen: "restart docker pyris" | ||
|
||
- name: start docker compose pyris | ||
become: true | ||
command: ./pyris-docker.sh start {{ pyris_build_version }} {{ pyris_branch }} | ||
args: | ||
chdir: "{{ pyris_working_directory }}" | ||
listen: "start docker pyris" | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
- name: Ensure pyris group {{ pyris_user_group }} exists | ||
become: yes | ||
group: | ||
name: "{{ pyris_user_group }}" | ||
gid: "{{ pyris_user_gid }}" | ||
state: present | ||
|
||
- name: Ensure pyris user {{ pyris_user_name }} exists | ||
become: yes | ||
user: | ||
name: "{{ pyris_user_name }}" | ||
state: present | ||
uid: "{{ pyris_user_uid }}" | ||
group: "{{ pyris_user_group }}" | ||
groups: "docker" | ||
|
||
- name: Ensure deployment user {{ pyris_deployment_user_name }} exists | ||
become: yes | ||
user: | ||
name: "{{ pyris_deployment_user_name }}" | ||
comment: "{{ pyris_deployment_user_comment }}" | ||
state: present | ||
uid: "{{ pyris_deployment_user_uid }}" | ||
group: "{{ pyris_user_group }}" | ||
groups: "sudo,docker" | ||
append: yes | ||
when: (pyris_create_deployment_user | bool) | ||
|
||
- name: Ensure (limited) sudo privileges for user {{ pyris_deployment_user_name }} | ||
become: yes | ||
template: | ||
src: pyris_deployment_sudoers.j2 | ||
dest: /etc/sudoers.d/pyris_deployment | ||
validate: 'visudo -cf %s' | ||
mode: 0440 | ||
when: (pyris_create_deployment_user | bool) | ||
|
||
- name: Authorize ssh-key for deployment user | ||
become: yes | ||
authorized_key: | ||
user: "{{ pyris_deployment_user_name }}" | ||
state: present | ||
key: "{{ pyris_deployment_user_public_key }}" | ||
when: (pyris_create_deployment_user | bool) | ||
|
||
- name: Create pyris directory | ||
become: true | ||
file: | ||
path: "{{ pyris_working_directory }}" | ||
state: directory | ||
mode: '0775' | ||
|
||
- name: Set permissions for pyris directory | ||
become: true | ||
file: | ||
path: "{{ pyris_working_directory }}" | ||
state: directory | ||
recurse: yes | ||
owner: "{{ pyris_user_name }}" | ||
group: "{{ pyris_user_group }}" | ||
register: permissions | ||
notify: restart docker pyris | ||
|
||
- name: Copy docker.env to pyris directory | ||
become: true | ||
template: | ||
src: "templates/docker.env.j2" | ||
dest: "{{ pyris_working_directory }}/docker.env" | ||
owner: "{{ pyris_user_name }}" | ||
group: "{{ pyris_user_group }}" | ||
mode: 0660 | ||
register: config | ||
notify: restart docker pyris | ||
|
||
- name: Copy application.yml to pyris directory | ||
become: true | ||
template: | ||
src: "templates/application.yml.j2" | ||
dest: "{{ pyris_working_directory }}/application.yml" | ||
owner: "{{ pyris_user_name }}" | ||
group: "{{ pyris_user_group }}" | ||
mode: 0660 | ||
register: config | ||
notify: restart docker pyris | ||
|
||
- name: Copy pyris-docker.sh helper script | ||
become: true | ||
template: | ||
src: "templates/pyris-docker.sh.j2" | ||
dest: "{{ pyris_working_directory }}/pyris-docker.sh" | ||
owner: "{{ pyris_user_name }}" | ||
group: "{{ pyris_user_group }}" | ||
mode: 0770 | ||
register: config | ||
notify: restart docker pyris | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ pyris_config |to_yaml(indent=4) }} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
PYRIS_DOCKER_TAG='{{ pyris_build_version }}' | ||
PYRIS_APPLICATION_YML_FILE='{{ pyris_working_directory }}/application.yml' | ||
|
||
# Nginx vars | ||
NGINX_PROXY_SSL_CERTIFICATE_PATH='{{ proxy_ssl_certificate_path }}' | ||
NGINX_PROXY_SSL_CERTIFICATE_KEY_PATH='{{ proxy_ssl_certificate_key_path }}' |
Oops, something went wrong.