From e0fe32668735fb21638672e4a5e3cf6b7c439d63 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Sat, 10 Apr 2021 16:27:33 +0200 Subject: [PATCH 1/3] Update ansible role to also install Redis 6.0. --- README.md | 9 +++++++++ ansible/main.yml | 1 - ansible/roles/st2_dev/handlers/main.yml | 5 +++++ ansible/roles/st2_dev/tasks/main.yml | 1 + ansible/roles/st2_dev/tasks/redis.yml | 21 +++++++++++++++++++++ 5 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 ansible/roles/st2_dev/tasks/redis.yml diff --git a/README.md b/README.md index 75d1404..7a1345b 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,12 @@ If you want to enable ansible debug logging for the provision step, you can do t ```bash ANSIBLE_DEBUG=1 vagrant provision ``` + +### Installed Versions of Software + +Right now the following versions of software are installed during provisioning: + +* Python 3.6 +* MongoDB 4.0 +* Redis 6.0 +* Nginx 1.10 diff --git a/ansible/main.yml b/ansible/main.yml index 3fd0fa7..f0bfcb8 100644 --- a/ansible/main.yml +++ b/ansible/main.yml @@ -2,4 +2,3 @@ - hosts: all roles: - st2_dev - diff --git a/ansible/roles/st2_dev/handlers/main.yml b/ansible/roles/st2_dev/handlers/main.yml index 53aae41..c4ca1a4 100644 --- a/ansible/roles/st2_dev/handlers/main.yml +++ b/ansible/roles/st2_dev/handlers/main.yml @@ -9,3 +9,8 @@ systemd: name: nginx state: restarted +- name: restart redis + become: yes + systemd: + name: redis-server + state: restarted diff --git a/ansible/roles/st2_dev/tasks/main.yml b/ansible/roles/st2_dev/tasks/main.yml index 1f606e7..a7bff36 100644 --- a/ansible/roles/st2_dev/tasks/main.yml +++ b/ansible/roles/st2_dev/tasks/main.yml @@ -2,5 +2,6 @@ - include_tasks: system.yml - include_tasks: python.yml - include_tasks: mongo.yml +- include_tasks: redis.yml - include_tasks: nginx.yml - include_tasks: repos.yml diff --git a/ansible/roles/st2_dev/tasks/redis.yml b/ansible/roles/st2_dev/tasks/redis.yml new file mode 100644 index 0000000..a18959f --- /dev/null +++ b/ansible/roles/st2_dev/tasks/redis.yml @@ -0,0 +1,21 @@ +--- +- name: Add source repository into sources list + become: true + ansible.builtin.apt_repository: + update_cache: true + repo: ppa:chris-lea/redis-server + state: present +- name: Install apt package + become: yes + apt: + name: + - redis-server + state: latest + update_cache: yes + notify: + - restart redis +- name: Enable Redis service + become: yes + systemd: + name: redis-server.service + enabled: yes From 62b82d966482d8e52265a3be4c1498fb0bb38c12 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Sat, 10 Apr 2021 16:30:44 +0200 Subject: [PATCH 2/3] Update CI check. --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 12d183a..d569847 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -75,6 +75,7 @@ jobs: vagrant ssh -c "dpkg -l | grep mongodb-org | grep ${{ matrix.mongodb_version }}" vagrant ssh -c "ps aux | grep mongodb | grep -v grep" vagrant ssh -c "ps aux | grep rabbitmq | grep -v grep" + vagrant ssh -c "ps aux | grep redis-server | grep -v grep" vagrant ssh -c "sudo ls -la /home/stanley/.ssh" vagrant ssh -c "sudo ls -la /home/vagrant/.ssh" vagrant ssh -c "sudo ls -la /home/stanley/.ssh/authorized_keys" From f780f7fa6486e05f07ff86f2d8e023715d7e7c9f Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Sat, 10 Apr 2021 17:19:02 +0200 Subject: [PATCH 3/3] Update CI check. --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d569847..55b0ba3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -70,7 +70,7 @@ jobs: # NOTE: vagrant ssh -c exists with the same exit code as command which is ran in the VM - name: Verify Software Versions And Running Processes run: | - vagrant ssh -c "python3 --version ; dpkg -l | grep mongodb-org" + vagrant ssh -c "python3 --version ; dpkg -l | grep mongodb-org ; dpkg -l | grep redis-server" vagrant ssh -c "python3 --version | grep ${{ matrix.python_version }}" vagrant ssh -c "dpkg -l | grep mongodb-org | grep ${{ matrix.mongodb_version }}" vagrant ssh -c "ps aux | grep mongodb | grep -v grep"