-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: replace old binary/repo references
Various things were updated in accordance with the branding alignment for the binaries and repository: * Renamed version arguments on various commands from `safe` -> `ant` * Renamed version variables/arguments/fields from `safe` -> `ant` * Ansible: renamed `safe_user` role -> `ant_user` * Ansible: renamed `node-manager` role -> `antctl` * General: updated lots of small references over the whole codebase, from `safe` -> `ant`.
- Loading branch information
Showing
45 changed files
with
1,688 additions
and
1,400 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
resources/ansible/node_manager_inventory.yml → resources/ansible/antctl_inventory.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,25 @@ | ||
--- | ||
# We always build the faucet binary, but safenode only applies for using a custom branch. | ||
- name: build binaries | ||
hosts: all | ||
become: False | ||
roles: | ||
- { | ||
role: build_safe_network_binary, | ||
bin_name: "autonomi", | ||
bin_name: "ant", | ||
when: custom_bin == "true" | ||
} | ||
- { | ||
role: build_safe_network_binary, | ||
bin_name: "safenode", | ||
bin_name: "antnode", | ||
when: custom_bin == "true" | ||
} | ||
- { | ||
role: build_safe_network_binary, | ||
bin_name: "safenode_rpc_client", | ||
bin_name: "antctl", | ||
when: custom_bin == "true" | ||
} | ||
- { | ||
role: build_safe_network_binary, | ||
bin_name: "safenode-manager", | ||
when: custom_bin == "true" | ||
} | ||
- { | ||
role: build_safe_network_binary, | ||
bin_name: "safenodemand", | ||
bin_name: "antctld", | ||
when: custom_bin == "true" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 16 additions & 16 deletions
32
...es/ansible/roles/safe_user/tasks/main.yml → ...ces/ansible/roles/ant_user/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
- name: user for running node | ||
ansible.builtin.user: | ||
name: safe | ||
name: ant | ||
shell: /bin/bash | ||
|
||
- name: create .ssh directory for safe user | ||
- name: create .ssh directory for ant user | ||
ansible.builtin.file: | ||
path: /home/safe/.ssh | ||
owner: safe | ||
group: safe | ||
path: /home/ant/.ssh | ||
owner: ant | ||
group: ant | ||
state: directory | ||
mode: '0755' | ||
|
||
# This is necessary for the logstash service, which runs as the logstash user, to | ||
# read the log files under /home/safe/.local/share/safe/node. | ||
# read the log files under /home/ant/.local/share/ant/node. | ||
- name: make home directory accessible for logstash user | ||
ansible.builtin.file: | ||
path: /home/safe | ||
path: /home/ant | ||
mode: '0755' | ||
|
||
# This is a bit of a hack, but it allows the `safe` user to have SSH access using the same | ||
# This is a bit of a hack, but it allows the `ant` user to have SSH access using the same | ||
# authorized_keys, which is useful for running utility scripts. | ||
- name: create .ssh directory for safe user | ||
- name: create .ssh directory for ant user | ||
ansible.builtin.file: | ||
path: /home/safe/.ssh | ||
owner: safe | ||
group: safe | ||
path: /home/ant/.ssh | ||
owner: ant | ||
group: ant | ||
state: directory | ||
mode: '0755' | ||
when: provider == "digital-ocean" | ||
|
||
- name: copy authorized_keys to safe user | ||
- name: copy authorized_keys to ant user | ||
ansible.builtin.copy: | ||
src: /root/.ssh/authorized_keys | ||
dest: /home/safe/.ssh/authorized_keys | ||
owner: safe | ||
group: safe | ||
dest: /home/ant/.ssh/authorized_keys | ||
owner: ant | ||
group: ant | ||
remote_src: true | ||
mode: '0600' | ||
when: provider == "digital-ocean" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
public_rpc: False | ||
node_rpc_ip: "127.0.0.1" | ||
node_instance_count: 20 | ||
binary_dir: /usr/local/bin | ||
antctl_archive_filename: antctl-latest-x86_64-unknown-linux-musl.tar.gz | ||
antctl_archive_url: https://antctl.s3.eu-west-2.amazonaws.com/{{ antctl_archive_filename }} | ||
antctld_archive_filename: antctld-latest-x86_64-unknown-linux-musl.tar.gz | ||
antctld_archive_url: https://antctld.s3.eu-west-2.amazonaws.com/{{ antctld_archive_filename }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
- name: check if antctl binary exists | ||
ansible.builtin.stat: | ||
path: "{{ binary_dir}}/antctl" | ||
register: antctl_binary | ||
|
||
- name: get the private IP for the instance | ||
set_fact: | ||
node_rpc_ip: "{{ instance_facts.instances[0].network_interfaces[0].private_ip_address }}" | ||
when: provider == "aws" and public_rpc and not antctl_binary.stat.exists | ||
|
||
- name: use the public IP as the RPC address on DO | ||
set_fact: | ||
node_rpc_ip: "{{ ansible_host }}" | ||
when: provider == "digital-ocean" and public_rpc and not antctl_binary.stat.exists | ||
|
||
- name: download the antctl binary | ||
ansible.builtin.get_url: | ||
url: "{{ antctl_archive_url }}" | ||
dest: /tmp/{{ antctl_archive_filename }} | ||
when: not antctl_binary.stat.exists | ||
|
||
- name: extract the antctl binary to /usr/local/bin | ||
become: True | ||
ansible.builtin.unarchive: | ||
src: "/tmp/{{ antctl_archive_filename }}" | ||
dest: "{{ binary_dir }}" | ||
remote_src: True | ||
when: not antctl_binary.stat.exists | ||
|
||
- name: download the antctld binary | ||
ansible.builtin.get_url: | ||
url: "{{ antctld_archive_url }}" | ||
dest: /tmp/{{ antctld_archive_filename }} | ||
when: not antctl_binary.stat.exists | ||
|
||
- name: extract the antctld binary to /tmp/antctld | ||
become: True | ||
ansible.builtin.unarchive: | ||
src: "/tmp/{{ antctld_archive_filename }}" | ||
dest: /tmp/ | ||
remote_src: True | ||
when: not antctl_binary.stat.exists | ||
|
||
- name: add antctld | ||
become: true | ||
command: antctl -v daemon add --address {{ node_rpc_ip }} --path /tmp/antctld | ||
when: not antctl_binary.stat.exists | ||
|
||
- name: start antctld | ||
become: true | ||
command: antctl -v daemon start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
resources/ansible/roles/build_safe_network_binary/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
bin_name: safenode | ||
bin_name: antnode | ||
org: maidsafe | ||
branch: main | ||
# The archive is stored inside "https://sn-node.s3.eu-west-2.amazonaws.com/{org}/{branch}/{bin_name}-{testnet_name}-x86_64-unknown-linux-musl.tar.gz" | ||
bin_archive_filename: "{{ bin_name }}-{{ testnet_name }}-x86_64-unknown-linux-musl.tar.gz" | ||
# csv of the features that you want to enable on safenode. By default, none of the features are enabled. | ||
safenode_features_list: "" | ||
antnode_features_list: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.