-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #160 from nebari-dev/conda-store-version
Update conda-store, add redis, configure postgres, minio data directory
- Loading branch information
Showing
16 changed files
with
2,433 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
- nfs | ||
- mysql | ||
- postgresql | ||
- redis | ||
- minio | ||
- backups | ||
- traefik | ||
|
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
redis_enabled: false | ||
redis_port: 6379 | ||
redis_password: 1XoRW/Vgz+LdKLXeh9uwdBrYPBJKhIJR | ||
redis_data_directory: /opt/conda-store/redis/ |
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,9 @@ | ||
--- | ||
- name: Restart services redis | ||
become: true | ||
ansible.builtin.service: | ||
name: "{{ item }}" | ||
enabled: "yes" | ||
state: restarted | ||
with_items: | ||
- redis |
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 @@ | ||
--- | ||
- name: Install redis | ||
ansible.builtin.include_tasks: redis.yaml | ||
when: redis_enabled |
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,76 @@ | ||
--- | ||
- name: Remove existing Redis keyring file | ||
ansible.builtin.file: | ||
path: /usr/share/keyrings/redis-archive-keyring.gpg | ||
state: absent | ||
become: true | ||
|
||
- name: Add Redis GPG Key | ||
ansible.builtin.shell: | ||
cmd: | | ||
set -o pipefail # See: https://ansible.readthedocs.io/projects/lint/rules/risky-shell-pipe/#correct-code | ||
curl -fsSL https://packages.redis.io/gpg | sudo gpg --batch --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg | ||
executable: /bin/bash | ||
become: true | ||
|
||
- name: Add Redis APT Repository | ||
ansible.builtin.shell: | ||
cmd: | | ||
set -o pipefail # See: https://ansible.readthedocs.io/projects/lint/rules/risky-shell-pipe/#correct-code | ||
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list | ||
executable: /bin/bash | ||
become: true | ||
|
||
- name: Ensure Redis data directory exists | ||
ansible.builtin.file: | ||
path: "{{ redis_data_directory }}" | ||
state: directory | ||
owner: redis | ||
group: redis | ||
mode: "0755" | ||
become: true | ||
|
||
- name: Install redis | ||
ansible.builtin.apt: | ||
name: redis | ||
state: present | ||
update_cache: true | ||
become: true | ||
|
||
- name: Copy the redis systemd service file | ||
become: true | ||
ansible.builtin.copy: | ||
content: | | ||
[Unit] | ||
Description=Redis | ||
After=syslog.target | ||
[Service] | ||
ExecStart=/usr/bin/redis-server /etc/redis/redis.conf | ||
RestartSec=5s | ||
Restart=on-success | ||
[Install] | ||
WantedBy=multi-user.target | ||
dest: /etc/systemd/system/redis.service | ||
owner: root | ||
group: root | ||
mode: "0644" | ||
register: _redis_service | ||
|
||
- name: Ensure Redis Configuration | ||
ansible.builtin.template: | ||
src: templates/redis.conf.j2 | ||
dest: /etc/redis/redis.conf | ||
owner: root | ||
group: root | ||
mode: "0644" | ||
become: true | ||
notify: Restart services redis | ||
|
||
- name: Ensure Redis is started | ||
ansible.builtin.service: | ||
name: redis | ||
state: started | ||
enabled: "yes" | ||
become: true |
Oops, something went wrong.