update
This commit is contained in:
parent
825a51e00d
commit
3cc574a592
@ -1,11 +1,9 @@
|
|||||||
#docker build -t nexus-image .
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
nexus-prover:
|
nexus-prover:
|
||||||
image: nexus-image
|
image: nexus-image
|
||||||
container_name: nexus-prover
|
container_name: nexus-prover
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- /root/prover-id:/root/.nexus/prover-id
|
- /root/node/prover-id:/root/.nexus/prover-id
|
||||||
logging:
|
logging:
|
||||||
driver: "none"
|
driver: "none"
|
36
playbook.yml
36
playbook.yml
@ -1,4 +1,4 @@
|
|||||||
- name: Nillion deployment playbook
|
- name: Deployment playbook
|
||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
vars:
|
vars:
|
||||||
@ -11,7 +11,7 @@
|
|||||||
create: yes
|
create: yes
|
||||||
block: |
|
block: |
|
||||||
#1724983098
|
#1724983098
|
||||||
cd /root/node/ ; docker compose logs -f
|
cd /root/node/ ; docker compose logs --since 3h -f
|
||||||
marker: ""
|
marker: ""
|
||||||
|
|
||||||
- name: Set locale to C.UTF-8
|
- name: Set locale to C.UTF-8
|
||||||
@ -154,7 +154,7 @@
|
|||||||
|
|
||||||
- name: Clone repository
|
- name: Clone repository
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: https://gitea.vvzvlad.xyz/vvzvlad/nillion
|
repo: https://gitea.vvzvlad.xyz/vvzvlad/nexus
|
||||||
dest: "{{ ansible_env.HOME }}/node"
|
dest: "{{ ansible_env.HOME }}/node"
|
||||||
version: "{{ git_version }}"
|
version: "{{ git_version }}"
|
||||||
force: true
|
force: true
|
||||||
@ -170,10 +170,7 @@
|
|||||||
|
|
||||||
- name: Update environment variables
|
- name: Update environment variables
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
./update.sh ADDRESS "{{ address }}"
|
./update.sh ID "{{ id }}"
|
||||||
./update.sh PRIVATE "{{ private_key }}"
|
|
||||||
./update.sh PUBLIC "{{ public_key }}"
|
|
||||||
./update.sh RPC "{{ rpc_url }}"
|
|
||||||
./update.sh GRIST_SERVER "{{ grist_server }}"
|
./update.sh GRIST_SERVER "{{ grist_server }}"
|
||||||
./update.sh GRIST_DOC_ID "{{ grist_doc_id }}"
|
./update.sh GRIST_DOC_ID "{{ grist_doc_id }}"
|
||||||
./update.sh GRIST_API_KEY "{{ grist_api_key }}"
|
./update.sh GRIST_API_KEY "{{ grist_api_key }}"
|
||||||
@ -181,8 +178,8 @@
|
|||||||
chdir: "{{ ansible_env.HOME }}/node"
|
chdir: "{{ ansible_env.HOME }}/node"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Download dockers images
|
- name: Build dockers images
|
||||||
ansible.builtin.command: docker compose pull
|
ansible.builtin.command: docker build -t nexus-image .
|
||||||
args:
|
args:
|
||||||
chdir: "{{ ansible_env.HOME }}/node"
|
chdir: "{{ ansible_env.HOME }}/node"
|
||||||
environment:
|
environment:
|
||||||
@ -275,19 +272,6 @@
|
|||||||
name: tun2socks
|
name: tun2socks
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: Check API availability for RPC URL
|
|
||||||
ansible.builtin.uri:
|
|
||||||
url: "{{ rpc_url }}/health?"
|
|
||||||
method: GET
|
|
||||||
return_content: true
|
|
||||||
timeout: 30
|
|
||||||
register: rpc_url_response
|
|
||||||
retries: 3
|
|
||||||
delay: 60
|
|
||||||
failed_when:
|
|
||||||
- rpc_url_response.status != 200
|
|
||||||
- rpc_url_response.json is not none and rpc_url_response.json is not defined
|
|
||||||
|
|
||||||
- name: Check external IP after
|
- name: Check external IP after
|
||||||
ansible.builtin.command: curl https://ifconfig.me
|
ansible.builtin.command: curl https://ifconfig.me
|
||||||
register: ip_after
|
register: ip_after
|
||||||
@ -327,10 +311,10 @@
|
|||||||
|
|
||||||
- name: Copy checker service file
|
- name: Copy checker service file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/systemd/system/nillion-checker.service
|
dest: /etc/systemd/system/node-checker.service
|
||||||
content: |
|
content: |
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Nillion Checker Service
|
Description=Node Checker Service
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
@ -349,9 +333,9 @@
|
|||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
|
|
||||||
- name: Enable and start nillion-checker service
|
- name: Enable and start node-checker service
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: nillion-checker
|
name: node-checker
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
curl -o /root/node/checker.py https://gitea.vvzvlad.xyz/vvzvlad/nillion/raw/branch/main/checker.py
|
curl -o /root/node/checker.py https://gitea.vvzvlad.xyz/vvzvlad/nexus/raw/branch/main/checker.py
|
||||||
python3 /root/node/checker.py
|
python3 /root/node/checker.py
|
||||||
|
Loading…
Reference in New Issue
Block a user