diff --git a/docker-compose.yml b/docker-compose.yml index 68c3410..46c9a5b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,9 @@ -#docker build -t nexus-image . - services: nexus-prover: image: nexus-image container_name: nexus-prover restart: unless-stopped volumes: - - /root/prover-id:/root/.nexus/prover-id + - /root/node/prover-id:/root/.nexus/prover-id logging: driver: "none" \ No newline at end of file diff --git a/playbook.yml b/playbook.yml index e352994..7b3cbbd 100644 --- a/playbook.yml +++ b/playbook.yml @@ -1,4 +1,4 @@ -- name: Nillion deployment playbook +- name: Deployment playbook hosts: all become: true vars: @@ -11,7 +11,7 @@ create: yes block: | #1724983098 - cd /root/node/ ; docker compose logs -f + cd /root/node/ ; docker compose logs --since 3h -f marker: "" - name: Set locale to C.UTF-8 @@ -154,7 +154,7 @@ - name: Clone repository ansible.builtin.git: - repo: https://gitea.vvzvlad.xyz/vvzvlad/nillion + repo: https://gitea.vvzvlad.xyz/vvzvlad/nexus dest: "{{ ansible_env.HOME }}/node" version: "{{ git_version }}" force: true @@ -170,10 +170,7 @@ - name: Update environment variables ansible.builtin.shell: | - ./update.sh ADDRESS "{{ address }}" - ./update.sh PRIVATE "{{ private_key }}" - ./update.sh PUBLIC "{{ public_key }}" - ./update.sh RPC "{{ rpc_url }}" + ./update.sh ID "{{ id }}" ./update.sh GRIST_SERVER "{{ grist_server }}" ./update.sh GRIST_DOC_ID "{{ grist_doc_id }}" ./update.sh GRIST_API_KEY "{{ grist_api_key }}" @@ -181,8 +178,8 @@ chdir: "{{ ansible_env.HOME }}/node" changed_when: false - - name: Download dockers images - ansible.builtin.command: docker compose pull + - name: Build dockers images + ansible.builtin.command: docker build -t nexus-image . args: chdir: "{{ ansible_env.HOME }}/node" environment: @@ -275,19 +272,6 @@ name: tun2socks 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 ansible.builtin.command: curl https://ifconfig.me register: ip_after @@ -327,10 +311,10 @@ - name: Copy checker service file ansible.builtin.copy: - dest: /etc/systemd/system/nillion-checker.service + dest: /etc/systemd/system/node-checker.service content: | [Unit] - Description=Nillion Checker Service + Description=Node Checker Service After=network.target [Service] @@ -349,9 +333,9 @@ ansible.builtin.systemd: daemon_reload: yes - - name: Enable and start nillion-checker service + - name: Enable and start node-checker service ansible.builtin.systemd: - name: nillion-checker + name: node-checker enabled: yes state: started diff --git a/update-and-run-checker.sh b/update-and-run-checker.sh index 7ece524..81fb32f 100644 --- a/update-and-run-checker.sh +++ b/update-and-run-checker.sh @@ -1,4 +1,4 @@ #!/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 diff --git a/update.sh b/update.sh index 8ce0a97..97cac11 100644 --- a/update.sh +++ b/update.sh @@ -10,7 +10,7 @@ NEW_VALUE=$2 # Список файлов FILES=( - "credentials.json" + "prover-id" "docker-compose.yml" "grist.json" )