diff --git a/resources/ansible/create_node_image.yml b/resources/ansible/create_node_image.yml index a967d8da..8dec4975 100644 --- a/resources/ansible/create_node_image.yml +++ b/resources/ansible/create_node_image.yml @@ -5,3 +5,12 @@ roles: - role: prerequisites - role: filebeat + # Right now we are in a situation where we don't want Telegraf to be started automatically because + # we don't want metrics with new names to be forwarded to the existing production infrastructure. + tasks: + - name: stop telegraf + become: True + ansible.builtin.systemd: + name: telegraf + state: stopped + enabled: no diff --git a/resources/ansible/nodes.yml b/resources/ansible/nodes.yml index c45f234c..028c5ad0 100644 --- a/resources/ansible/nodes.yml +++ b/resources/ansible/nodes.yml @@ -1,17 +1,4 @@ --- -- name: copy logstash certificate to nodes - hosts: all - become: False - max_fail_percentage: 10 - ignore_unreachable: yes - tasks: - - name: copy public logstash certificate to node - copy: - src: logstash-{{ logstash_stack_name }}-public.crt - dest: /tmp/logstash-{{ logstash_stack_name }}-public.crt - mode: 0644 - when: logstash_stack_name is defined and logstash_stack_name | length > 0 - - name: deploy antnode to remaining nodes hosts: all become: False @@ -52,9 +39,15 @@ name: systemd-journald state: restarted enabled: yes - - name: restart telegraf + # - name: restart telegraf + # become: True + # ansible.builtin.systemd: + # name: telegraf + # state: restarted + # enabled: yes + - name: stop telegraf become: True ansible.builtin.systemd: name: telegraf - state: restarted - enabled: yes + state: stopped + enabled: no diff --git a/resources/ansible/roles/node/tasks/main.yml b/resources/ansible/roles/node/tasks/main.yml index 20124126..a81d0a83 100644 --- a/resources/ansible/roles/node/tasks/main.yml +++ b/resources/ansible/roles/node/tasks/main.yml @@ -78,7 +78,6 @@ - --data-dir-path=/mnt/antnode-storage/data - --log-dir-path=/mnt/antnode-storage/log - "--count={{ nodes_to_add }}" - - "--owner=maidsafe" - "--peer={{ genesis_multiaddr }}" - "--rpc-address={{ node_rpc_ip }}" - "--rewards-address={{ rewards_address }}" diff --git a/resources/ansible/roles/telegraf-configuration/tasks/main.yml b/resources/ansible/roles/telegraf-configuration/tasks/main.yml index 11795a3f..5b7ecc85 100644 --- a/resources/ansible/roles/telegraf-configuration/tasks/main.yml +++ b/resources/ansible/roles/telegraf-configuration/tasks/main.yml @@ -50,31 +50,31 @@ dest: /etc/default/telegraf remote_src: yes -- name: replace SAFENODE_TESTNET_NAME value +- name: replace ANTNODE_TESTNET_NAME value replace: path: "/etc/default/telegraf" - regexp: 'SAFENODE_TESTNET_NAME=UNDEFINED' - replace: 'SAFENODE_TESTNET_NAME={{ testnet_name | upper }}' + regexp: 'ANTNODE_TESTNET_NAME=UNDEFINED' + replace: 'ANTNODE_TESTNET_NAME={{ testnet_name | upper }}' -- name: replace SAFENODE_HOST_ROLE value +- name: replace ANTNODE_HOST_ROLE value replace: path: "/etc/default/telegraf" - regexp: 'SAFENODE_HOST_ROLE=UNDEFINED' - replace: 'SAFENODE_HOST_ROLE={{ node_type | upper }}' + regexp: 'ANTNODE_HOST_ROLE=UNDEFINED' + replace: 'ANTNODE_HOST_ROLE={{ node_type | upper }}' # The real branch name will be supplied later, when it is available in `safenode`. -- name: replace SAFENODE_BRANCH_NAME value +- name: replace ANTNODE_BRANCH_NAME value replace: path: "/etc/default/telegraf" - regexp: "SAFENODE_BRANCH_NAME=UNDEFINED" - replace: "SAFENODE_BRANCH_NAME=STABLE" + regexp: "ANTNODE_BRANCH_NAME=UNDEFINED" + replace: "ANTNODE_BRANCH_NAME=STABLE" # The real commit hash will be supplied later, when it is available in `safenode`. -- name: replace SAFENODE_BRANCH_COMMIT value +- name: replace ANTNODE_BRANCH_COMMIT value replace: path: "/etc/default/telegraf" - regexp: "SAFENODE_BRANCH_COMMIT=UNDEFINED" - replace: "SAFENODE_BRANCH_COMMIT=UNDEFINED" + regexp: "ANTNODE_BRANCH_COMMIT=UNDEFINED" + replace: "ANTNODE_BRANCH_COMMIT=UNDEFINED" - name: copy telegraf config file copy: @@ -109,9 +109,9 @@ become: True command: systemctl daemon-reload -- name: reload the configuration files for systemctl daemon - become: True - command: systemctl start telegraf-elasticsearch.service +# - name: reload the configuration files for systemctl daemon +# become: True +# command: systemctl start telegraf-elasticsearch.service # - name: start telegraf service # systemd: diff --git a/resources/ansible/roles/uploader-metrics/tasks/main.yml b/resources/ansible/roles/uploader-metrics/tasks/main.yml index 3efb558e..02f8c5aa 100644 --- a/resources/ansible/roles/uploader-metrics/tasks/main.yml +++ b/resources/ansible/roles/uploader-metrics/tasks/main.yml @@ -43,31 +43,31 @@ dest: /etc/default/telegraf remote_src: yes -- name: replace SAFE_UPLOADER_TESTNET_NAME value +- name: replace ANT_UPLOADER_TESTNET_NAME value replace: path: "/etc/default/telegraf" - regexp: 'SAFE_UPLOADER_TESTNET_NAME=UNDEFINED' - replace: 'SAFE_UPLOADER_TESTNET_NAME={{ testnet_name | upper }}' + regexp: 'ANT_UPLOADER_TESTNET_NAME=UNDEFINED' + replace: 'ANT_UPLOADER_TESTNET_NAME={{ testnet_name | upper }}' -- name: replace SAFE_UPLOADER_HOST_ROLE value +- name: replace ANT_UPLOADER_HOST_ROLE value replace: path: "/etc/default/telegraf" - regexp: 'SAFE_UPLOADER_HOST_ROLE=UNDEFINED' - replace: 'SAFE_UPLOADER_HOST_ROLE=UPLOADER_NODE' + regexp: 'ANT_UPLOADER_HOST_ROLE=UNDEFINED' + replace: 'ANT_UPLOADER_HOST_ROLE=UPLOADER_NODE' # The real branch name will be supplied later, when it is available in `safenode`. -- name: replace SAFE_UPLOADER_BRANCH_NAME value +- name: replace ANT_UPLOADER_BRANCH_NAME value replace: path: "/etc/default/telegraf" - regexp: "SAFE_UPLOADER_BRANCH_NAME=UNDEFINED" - replace: "SAFE_UPLOADER_BRANCH_NAME=STABLE" + regexp: "ANT_UPLOADER_BRANCH_NAME=UNDEFINED" + replace: "ANT_UPLOADER_BRANCH_NAME=STABLE" # The real commit hash will be supplied later, when it is available in `safenode`. -- name: replace SAFE_UPLOADER_BRANCH_COMMIT value +- name: replace ANT_UPLOADER_BRANCH_COMMIT value replace: path: "/etc/default/telegraf" - regexp: "SAFE_UPLOADER_BRANCH_COMMIT=UNDEFINED" - replace: "SAFE_UPLOADER_BRANCH_COMMIT=UNDEFINED" + regexp: "ANT_UPLOADER_BRANCH_COMMIT=UNDEFINED" + replace: "ANT_UPLOADER_BRANCH_COMMIT=UNDEFINED" - name: copy telegraf config file copy: diff --git a/resources/ansible/uploaders.yml b/resources/ansible/uploaders.yml index 3143d177..fd4f874b 100644 --- a/resources/ansible/uploaders.yml +++ b/resources/ansible/uploaders.yml @@ -22,10 +22,16 @@ name: systemd-journald state: restarted enabled: yes - # The Telegraf service seems to need to be rebooted for metrics to start transmitting. - - name: restart telegraf + # # The Telegraf service seems to need to be rebooted for metrics to start transmitting. + # - name: restart telegraf + # become: True + # ansible.builtin.systemd: + # name: telegraf + # state: restarted + # enabled: yes + - name: stop telegraf become: True ansible.builtin.systemd: name: telegraf - state: restarted - enabled: yes \ No newline at end of file + state: stopped + enabled: no diff --git a/resources/terraform/testnet/digital-ocean/dev.tfvars b/resources/terraform/testnet/digital-ocean/dev.tfvars index fd4b02c1..2cd81ccc 100644 --- a/resources/terraform/testnet/digital-ocean/dev.tfvars +++ b/resources/terraform/testnet/digital-ocean/dev.tfvars @@ -1,15 +1,15 @@ bootstrap_droplet_size = "s-2vcpu-4gb" -bootstrap_droplet_image_id = 172040723 +bootstrap_droplet_image_id = 172129824 bootstrap_node_vm_count = 1 evm_node_droplet_size = "s-4vcpu-8gb" evm_node_droplet_image_id = 172040852 evm_node_vm_count = 1 -nat_gateway_droplet_image_id = 172051596 +nat_gateway_droplet_image_id = 172129956 node_droplet_size = "s-4vcpu-8gb" -node_droplet_image_id = 172040547 +node_droplet_image_id = 172129019 node_vm_count = 10 private_node_vm_count = 1 setup_nat_gateway = true uploader_droplet_size = "s-2vcpu-4gb" -uploader_droplet_image_id = 172051523 +uploader_droplet_image_id = 172130080 uploader_vm_count = 1 diff --git a/resources/terraform/testnet/digital-ocean/staging.tfvars b/resources/terraform/testnet/digital-ocean/staging.tfvars index 7c8b2675..19ffa52d 100644 --- a/resources/terraform/testnet/digital-ocean/staging.tfvars +++ b/resources/terraform/testnet/digital-ocean/staging.tfvars @@ -1,15 +1,15 @@ bootstrap_droplet_size = "s-2vcpu-4gb" -bootstrap_droplet_image_id = 172040723 +bootstrap_droplet_image_id = 172129824 bootstrap_node_vm_count = 2 evm_node_vm_count = 1 evm_node_droplet_size = "s-4vcpu-8gb" evm_node_droplet_image_id = 172040852 -nat_gateway_droplet_image_id = 172051596 +nat_gateway_droplet_image_id = 172129956 node_droplet_size = "s-4vcpu-8gb" -node_droplet_image_id = 172040547 +node_droplet_image_id = 172129019 node_vm_count = 39 private_node_vm_count = 1 setup_nat_gateway = true uploader_droplet_size = "s-2vcpu-4gb" -uploader_droplet_image_id = 172051523 +uploader_droplet_image_id = 172130080 uploader_vm_count = 2 diff --git a/src/ansible/extra_vars.rs b/src/ansible/extra_vars.rs index f01c6e8f..f27de676 100644 --- a/src/ansible/extra_vars.rs +++ b/src/ansible/extra_vars.rs @@ -200,12 +200,12 @@ impl ExtraVarsDocBuilder { repo_owner, ); } - _ => { + BinaryOption::Versioned { antctl_version, .. } => { self.add_variable( "antctld_archive_url", &format!( - "{}/antctld-latest-x86_64-unknown-linux-musl.tar.gz", - ANTCTL_S3_BUCKET_URL, + "{}/antctld-{}-x86_64-unknown-linux-musl.tar.gz", + ANTCTL_S3_BUCKET_URL, antctl_version ), ); } diff --git a/src/main.rs b/src/main.rs index 205edb7f..ed2a0e01 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3051,6 +3051,7 @@ async fn main() -> Result<()> { /// The second option is to build from source, which is useful for testing changes from forks. /// /// The usage of arguments are also validated here. +#[allow(clippy::too_many_arguments)] async fn get_binary_option( branch: Option, protocol_version: Option,