-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
164 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
- name: Copy Neon Node files | ||
ansible.builtin.template: | ||
src: "{{ item.src }}" | ||
dest: "{{ item.dest }}" | ||
mode: "0644" | ||
owner: neon | ||
group: neon | ||
loop: | ||
- { "src": "templates/neon-node/neon-node-requirements.j2.txt", "dest": "/home/neon/neon-node-requirements.txt"} | ||
- { "src": "templates/neon-node/start-node.py", "dest": "/home/neon/start-node.py"} | ||
- name: Create Neon Node config folder | ||
ansible.builtin.file: | ||
path: "{{ item }}" | ||
state: directory | ||
mode: "2775" # Keeps the group sticky | ||
owner: neon | ||
group: neon | ||
loop: | ||
- /root/xdg/config | ||
- /root/xdg/config/neon | ||
- name: Create symlinked neon.yaml | ||
ansible.builtin.file: | ||
src: /home/neon/xdg/config/neon/neon.yaml | ||
dest: /root/xdg/config/neon/neon.yaml | ||
state: link | ||
- name: Install Neon Node voice client | ||
ansible.builtin.pip: | ||
requirements: "/home/neon/neon-node-requirements.txt" | ||
virtualenv: "/home/neon/.venvs/neon-node" | ||
extra_args: "--pre" # TODO: Remove after a stable release | ||
# - name: Download Rust messagebus | ||
# ansible.builtin.get_url: | ||
# url: https://github.com/OscillateLabsLLC/ovos-rust-messagebus/releases/download/v1.0.0/ovos_messagebus-x86_64-unknown-linux-gnu.tar.gz | ||
# dest: /home/neon | ||
# mode: 0755 | ||
# - name: Unarchive Rust messagebus | ||
# ansible.builtin.unarchive: | ||
# remote_src: true | ||
# src: /home/neon/ovos_messagebus-x86_64-unknown-linux-gnu.tar.gz | ||
# dest: /home/neon | ||
- name: Set up Neon Node services | ||
ansible.builtin.template: | ||
src: "{{ item.src }}" | ||
dest: "{{ item.dest }}" | ||
owner: neon | ||
group: neon | ||
mode: 0644 | ||
backup: true | ||
loop: | ||
- { "src": "templates/neon-node/neon-node.service.j2", "dest": "/etc/systemd/system/neon-node.service" } | ||
# - { "src": "templates/neon-node/rust-messagebus.service.j2", "dest": "/etc/systemd/system/neon-messagebus.service" } | ||
- name: Enable and start Neon Node services | ||
ansible.builtin.systemd_service: | ||
name: "{{ item }}" | ||
enabled: true | ||
force: true | ||
daemon_reload: true | ||
state: restarted | ||
become: true | ||
loop: | ||
# - neon-messagebus.service | ||
- neon-node.service |
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 @@ | ||
neon-nodes[voice-client]~=0.0 |
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,16 @@ | ||
[Unit] | ||
Documentation=https://github.com/NeonGeckoCom/neon-nodes/blob/dev/README.md | ||
Description=Neon Node Voice Client | ||
|
||
[Service] | ||
ExecStart=/home/neon/.venvs/neon-node/bin/python /home/neon/start-node.py | ||
ExecReload=/usr/bin/kill -HUP $MAINPID | ||
ExecStop=/usr/bin/kill -KILL $MAINPID | ||
Restart=on-failure | ||
RestartSec=5s | ||
Environment="OVOS_CONFIG_BASE_FOLDER=neon" | ||
Environment="OVOS_CONFIG_FILENAME=neon.yaml" | ||
Environment="XDG_CONFIG_HOME=/home/neon/xdg/config" | ||
|
||
[Install] | ||
WantedBy=neon-messagebus.service |
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,13 @@ | ||
[Unit] | ||
Documentation=https://github.com/OscillateLabsLLC/ovos-rust-messagebus/blob/dev/README.md | ||
Description=Neon Rust Messagebus | ||
|
||
[Service] | ||
ExecStart=/home/neon/ovos_messagebus-x86_64-unknown-linux-gnu | ||
ExecReload=/usr/bin/kill -HUP $MAINPID | ||
ExecStop=/usr/bin/kill -KILL $MAINPID | ||
Restart=on-failure | ||
RestartSec=5s | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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 @@ | ||
from neon_utils.process_utils import start_systemd_service | ||
from neon_nodes.voice_client import NeonVoiceClient | ||
|
||
start_systemd_service(NeonVoiceClient().watchdog()) |
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