Skip to content

Commit

Permalink
Merge pull request #41 from sidohaakma/fix/move-to-yaml-for-requirements
Browse files Browse the repository at this point in the history
fix(armadillo): move to requirements.yml instead of .txt
  • Loading branch information
sidohaakma authored Mar 8, 2022
2 parents c76106d + e48419e commit 64b9583
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 32 deletions.
27 changes: 18 additions & 9 deletions armadillo1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ Deploy the Armadillo suite.
To use Ansible to deploy the stack you need to binaries on your system. You can install Ansible following this [user guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html). You need to be sure to run Ansible **>= 2.9**.

When you installed ansible you need to create 3 files:

- `inventory.ini`
- `playbook.yml`
- `requirements.txt`
- `requirements.yml`

### Creating inventory.ini
Your target host needs to be defined here.
Expand All @@ -29,12 +30,19 @@ Your target host needs to be defined here.
x.x.x.x # ip address of the system
```

### Creating requirements.txt
### Creating requirements.yml
Your target host needs to be defined here.

```txt
community.general
ansible.posix
```yaml
---
collections:
# install collections from Ansible Galaxy
- name: ansible.posix
version: 1.1.1
source: https://galaxy.ansible.com
- name: community.general
version: 2.0.1
source: https://galaxy.ansible.com
```
### Creating playbook.yml
The playbook is the base of the rollout for the Armadillo. The contents of the playbook is shown below.
Expand All @@ -54,7 +62,7 @@ The playbook is the base of the rollout for the Armadillo. The contents of the p
root_password: xxxxxxx
port: 9000
domain: armadillo-storage.local
host: http://localhost
host: http://minio
console:
enabled: false
port: 9001
Expand Down Expand Up @@ -109,9 +117,10 @@ The playbook is the base of the rollout for the Armadillo. The contents of the p
# override default DataSHIELD options
- role: molgenis.armadillo.service_minio
vars:
version: 2021-02-19T04-38-02Z
version: 2022-01-25T19-56-04Z
data: /var/lib/minio/data
domain: armadillo-storage.local
protocol: http
domain: "{{ minio.domain }}"
root_user: "{{ minio.root_user }}"
root_password: "{{ minio.root_password }}"
- role: molgenis.armadillo.service_auth
Expand All @@ -136,7 +145,7 @@ The playbook is the base of the rollout for the Armadillo. The contents of the p
enabled: false
acme:
email: [email protected]
- role: molgenis.armadillo.post_upgrade
- role: molgenis.armadillo.tools_upgrade
```
There are a few prerequisites that we need.
Expand Down
9 changes: 9 additions & 0 deletions armadillo1/collections/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
collections:
# install collections from Ansible Galaxy
- name: ansible.posix
version: 1.1.1
source: https://galaxy.ansible.com
- name: community.general
version: 2.0.1
source: https://galaxy.ansible.com
2 changes: 1 addition & 1 deletion armadillo1/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace: molgenis

name: armadillo

version: 2.0.0
version: 2.0.1

readme: README.md

Expand Down
3 changes: 2 additions & 1 deletion armadillo1/meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
requires_ansible: ">=2.9,<2.10"
requires_ansible: ">=2.10"

2 changes: 0 additions & 2 deletions armadillo1/requirements.txt

This file was deleted.

20 changes: 20 additions & 0 deletions armadillo1/roles/deps_compose/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
---
- name: add armadillo group | Configuration
ansible.builtin.group:
name: armadillo

- name: add armadillo user | Configuration
ansible.builtin.user:
name: armadillo
group: armadillo

- name: create directories | Configuration
ansible.builtin.file:
path: "{{ item }}"
owner: armadillo
group: armadillo
state: directory
mode: '655'
with_items:
- /usr/share/armadillo
- /usr/share/armadillo/services

- name: compose | Installation
ansible.builtin.include_tasks: "{{ ansible_os_family|lower }}.yml"
5 changes: 5 additions & 0 deletions armadillo1/roles/deps_docker/tasks/debian.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
- name: allow changing release-info apt-repositories | Configuration
ansible.builtin.command: apt update -y --allow-releaseinfo-change
tags:
- skip_ansible_lint

- name: add keyring | Repository configuration (Debian)
ansible.builtin.apt_key:
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
Expand Down
11 changes: 3 additions & 8 deletions armadillo1/roles/deps_docker/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
- name: docker | Repository configuration
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}.yml"

- name: remove old packages | Cleanup
ansible.builtin.apt:
state: absent
Expand All @@ -9,11 +12,6 @@
- containerd
- runc

- name: allow release-info to change for APT repositories | Configuration
ansible.builtin.command: apt update -y --allow-releaseinfo-change
tags:
- skip_ansible_lint

- name: prerequisites | Installation
ansible.builtin.apt:
state: present
Expand All @@ -25,9 +23,6 @@
- software-properties-common
update_cache: true

- name: docker | Repository configuration
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}.yml"

- name: docker | Installation
ansible.builtin.apt:
state: present
Expand Down
11 changes: 0 additions & 11 deletions armadillo1/roles/service_armadillo/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
---
- name: add armadillo group | Configuration
ansible.builtin.group:
name: armadillo

- name: add armadillo user | Configuration
ansible.builtin.user:
name: armadillo
group: armadillo

- name: create directories | Configuration
ansible.builtin.file:
path: "{{ item }}"
Expand All @@ -16,8 +7,6 @@
state: directory
mode: '655'
with_items:
- /usr/share/armadillo
- /usr/share/armadillo/services
- /etc/armadillo
- /var/log/armadillo

Expand Down

0 comments on commit 64b9583

Please sign in to comment.