mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2025-01-09 20:39:57 +00:00
Update deployment example (CPU arch aware) #3
The ansible playbook is now using ansible_facts to determinate target server or prober CPU architecture. The final "production" binary name and changed to just simply "xmr-nodes-{client,server}".
This commit is contained in:
parent
279b142e76
commit
0f7029b939
4 changed files with 21 additions and 11 deletions
|
@ -11,21 +11,21 @@
|
||||||
|
|
||||||
- name: Upload binary file (AMD64)
|
- name: Upload binary file (AMD64)
|
||||||
copy:
|
copy:
|
||||||
src: ../../bin/xmr-nodes-static-linux-amd64
|
src: ../../bin/xmr-nodes-client-linux-amd64
|
||||||
dest: /path/to/remote/xmr-nodes/bin
|
dest: /path/to/remote/xmr-nodes/bin/xmr-nodes-client
|
||||||
owner: your_user
|
owner: your_user
|
||||||
group: your_group
|
group: your_group
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: inventory_hostname in groups['prober']
|
when: inventory_hostname in groups['prober'] and ansible_facts['architecture'] == 'x86_64'
|
||||||
|
|
||||||
- name: Upload binary file (ARM64)
|
- name: Upload binary file (ARM64)
|
||||||
copy:
|
copy:
|
||||||
src: ../../bin/xmr-nodes-static-linux-arm64
|
src: ../../bin/xmr-nodes-client-linux-arm64
|
||||||
dest: /path/to/remote/xmr-nodes/bin
|
dest: /path/to/remote/xmr-nodes/bin/xmr-nodes-client
|
||||||
owner: your_user
|
owner: your_user
|
||||||
group: your_group
|
group: your_group
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: inventory_hostname in groups['prober']
|
when: inventory_hostname in groups['prober'] and ansible_facts['architecture'] == 'aarch64'
|
||||||
|
|
||||||
|
|
||||||
- name: Start systemd timer
|
- name: Start systemd timer
|
||||||
|
|
|
@ -9,13 +9,23 @@
|
||||||
state: stopped
|
state: stopped
|
||||||
when: inventory_hostname in groups['server']
|
when: inventory_hostname in groups['server']
|
||||||
|
|
||||||
- name: Upload binary file
|
- name: Upload binary file (AMD64)
|
||||||
copy:
|
copy:
|
||||||
src: ../../bin/xmr-nodes-static-linux-amd64
|
src: ../../bin/xmr-nodes-server-linux-amd64
|
||||||
dest: /path/to/remote/server/bin
|
dest: /path/to/remote/server/bin/xmr-nodes-server
|
||||||
Owner: your_user
|
Owner: your_user
|
||||||
Group: your_group
|
Group: your_group
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
when: inventory_hostname in groups['server'] and ansible_facts['architecture'] == 'x86_64'
|
||||||
|
|
||||||
|
- name: Upload binary file (ARM64)
|
||||||
|
copy:
|
||||||
|
src: ../../bin/xmr-nodes-server-linux-arm64
|
||||||
|
dest: /path/to/remote/server/bin/xmr-nodes-server
|
||||||
|
Owner: your_user
|
||||||
|
Group: your_group
|
||||||
|
mode: 0755
|
||||||
|
when: inventory_hostname in groups['server'] and ansible_facts['architecture'] == 'aarch64'
|
||||||
|
|
||||||
- name: Start systemd daemon
|
- name: Start systemd daemon
|
||||||
systemd:
|
systemd:
|
||||||
|
|
|
@ -6,7 +6,7 @@ After=network.target
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
User=your_user
|
User=your_user
|
||||||
WorkingDirectory=/path/to/project/dir
|
WorkingDirectory=/path/to/project/dir
|
||||||
ExecStart=/path/to/project/dir/bin/xmr-nodes-static-linux-arm64 probe
|
ExecStart=/path/to/project/dir/bin/xmr-nodes-client probe
|
||||||
TimeoutSec=90
|
TimeoutSec=90
|
||||||
|
|
||||||
# vim: filetype=systemd
|
# vim: filetype=systemd
|
||||||
|
|
|
@ -10,7 +10,7 @@ Type=simple
|
||||||
User=your_user
|
User=your_user
|
||||||
Restart=always
|
Restart=always
|
||||||
WorkingDirectory=/path/to/project/dir
|
WorkingDirectory=/path/to/project/dir
|
||||||
ExecStart=/path/to/project/dir/bin/xmr-nodes-static-linux-arm64 serve
|
ExecStart=/path/to/project/dir/bin/xmr-nodes-server serve
|
||||||
SyslogIdentifier=xmr-node-server
|
SyslogIdentifier=xmr-node-server
|
||||||
|
|
||||||
# vim: filetype=systemd
|
# vim: filetype=systemd
|
||||||
|
|
Loading…
Reference in a new issue