mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2024-11-16 17:07:36 +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)
|
||||
copy:
|
||||
src: ../../bin/xmr-nodes-static-linux-amd64
|
||||
dest: /path/to/remote/xmr-nodes/bin
|
||||
src: ../../bin/xmr-nodes-client-linux-amd64
|
||||
dest: /path/to/remote/xmr-nodes/bin/xmr-nodes-client
|
||||
owner: your_user
|
||||
group: your_group
|
||||
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)
|
||||
copy:
|
||||
src: ../../bin/xmr-nodes-static-linux-arm64
|
||||
dest: /path/to/remote/xmr-nodes/bin
|
||||
src: ../../bin/xmr-nodes-client-linux-arm64
|
||||
dest: /path/to/remote/xmr-nodes/bin/xmr-nodes-client
|
||||
owner: your_user
|
||||
group: your_group
|
||||
mode: 0755
|
||||
when: inventory_hostname in groups['prober']
|
||||
when: inventory_hostname in groups['prober'] and ansible_facts['architecture'] == 'aarch64'
|
||||
|
||||
|
||||
- name: Start systemd timer
|
||||
|
|
|
@ -9,13 +9,23 @@
|
|||
state: stopped
|
||||
when: inventory_hostname in groups['server']
|
||||
|
||||
- name: Upload binary file
|
||||
- name: Upload binary file (AMD64)
|
||||
copy:
|
||||
src: ../../bin/xmr-nodes-static-linux-amd64
|
||||
dest: /path/to/remote/server/bin
|
||||
src: ../../bin/xmr-nodes-server-linux-amd64
|
||||
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'] == '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
|
||||
systemd:
|
||||
|
|
|
@ -6,7 +6,7 @@ After=network.target
|
|||
Type=oneshot
|
||||
User=your_user
|
||||
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
|
||||
|
||||
# vim: filetype=systemd
|
||||
|
|
|
@ -10,7 +10,7 @@ Type=simple
|
|||
User=your_user
|
||||
Restart=always
|
||||
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
|
||||
|
||||
# vim: filetype=systemd
|
||||
|
|
Loading…
Reference in a new issue