mirror of https://github.com/nucypher/nucypher.git
Moe network monitor services and provisioning
parent
ad5da13cd9
commit
c7fc036bd3
|
@ -8,6 +8,9 @@
|
||||||
raw: sudo apt -y update && sudo apt install -y python2.7-minimal python2.7-setuptools
|
raw: sudo apt -y update && sudo apt install -y python2.7-minimal python2.7-setuptools
|
||||||
- include_vars: "{{ lookup('env', 'ANSIBLE_VARIABLES') }}"
|
- include_vars: "{{ lookup('env', 'ANSIBLE_VARIABLES') }}"
|
||||||
|
|
||||||
|
vars:
|
||||||
|
networks_file: "{{ lookup('file', '../../networks.json') | from_json }}"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Install System Dependencies"
|
- name: "Install System Dependencies"
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -48,7 +51,6 @@
|
||||||
shell: 'iptables -A INPUT -p tcp -m conntrack --dport {{ moe_http_port }} --ctstate NEW,ESTABLISHED -j ACCEPT'
|
shell: 'iptables -A INPUT -p tcp -m conntrack --dport {{ moe_http_port }} --ctstate NEW,ESTABLISHED -j ACCEPT'
|
||||||
vars:
|
vars:
|
||||||
moe_http_port: 12500
|
moe_http_port: 12500
|
||||||
teacher: "{{ hostvars[groups['tag_Role_' + lookup('env', 'NUCYPHER_NETWORK_NAME') + '_ursulas'][1]] }}"
|
|
||||||
|
|
||||||
- name: "Render Moe's Node Service"
|
- name: "Render Moe's Node Service"
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -60,8 +62,9 @@
|
||||||
vars:
|
vars:
|
||||||
virtualenv_path: '/home/ubuntu/venv'
|
virtualenv_path: '/home/ubuntu/venv'
|
||||||
nucypher_network_domain: "{{ lookup('env', 'NUCYPHER_NETWORK_NAME') }}"
|
nucypher_network_domain: "{{ lookup('env', 'NUCYPHER_NETWORK_NAME') }}"
|
||||||
|
teacher_uri: "{{ networks_file[lookup('env', 'NUCYPHER_NETWORK_NAME')][0] }}"
|
||||||
|
|
||||||
- name: "Enable and Start Ursula Service"
|
- name: "Enable and Start Moes's Monitoring"
|
||||||
become: yes
|
become: yes
|
||||||
become_flags: "-H -S"
|
become_flags: "-H -S"
|
||||||
systemd:
|
systemd:
|
||||||
|
@ -69,4 +72,4 @@
|
||||||
no_block: yes
|
no_block: yes
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: restarted
|
state: restarted
|
||||||
name: "ursula_node"
|
name: "moe_monitor"
|
||||||
|
|
|
@ -4,7 +4,7 @@ Description="Run 'Moe', A NuCypher Network Monitor."
|
||||||
[Service]
|
[Service]
|
||||||
User=ubuntu
|
User=ubuntu
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart={{ virtualenv_path }}/bin/nucypher moe --network {{ nucypher_network_domain }} --teacher-uri {{ teacher_checksum_address }}@https://{{ teacher_rest_host }}:{{ teacher_rest_port }}
|
ExecStart={{ virtualenv_path }}/bin/nucypher moe --network {{ nucypher_network_domain }} --teacher-uri {{ teacher_uri }}
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
Loading…
Reference in New Issue