Sn-testnet-deploy

I have been playing with sn-testnet-deploy.

On the face of it, a small network appears to be up.
I have not cleared all obstacles though.

Everything completes and I get my Peer list, Faucet address etc.

My assumption was that if I grab safe from my s3 and cp to .local/bin I would be able to connect without setting peers.
When I run safe wallet get-faucet [IP] it finds no peers and is stuck there.
If I export SAFE_PEERS=/ I get the same result.

cc @chriso :slight_smile:

6 Likes

chris is away this week.

You’ll need to set SAFE_PEERS or pass a --peer


The auto connection is only to a specific file in the s3 bucket we manually update before a testnet release. Without that, or similar, you have to pass some in

2 Likes

ok thanks, so if I run,

Check the faucet:
safe --peer /ip4/138.68.133.249/tcp/12000/p2p/12D3KooWKZMqh45gWd34UsUDK1zLUqcWizZF1VC9qMSSFgCAAkN4 wallet get-faucet 138.68.133.249:8000

Should I get anything?
It gets no further than 2/5.


josh@pc1:~$ safe --peer /ip4/138.68.133.249/tcp/12000/p2p/12D3KooWKZMqh45gWd34UsUDK1zLUqcWizZF1VC9qMSSFgCAAkN4 wallet get-faucet 138.68.133.249:8000
Logging to directory: "/home/josh/.local/share/safe/client/logs/log_2023-11-14_12-58-58"
Built with git version: f79e4518 / main / f79e4518
Instantiating a SAFE client...
Connecting to the network w/peers: ["/ip4/138.68.133.249/tcp/12000/p2p/12D3KooWKZMqh45gWd34UsUDK1zLUqcWizZF1VC9qMSSFgCAAkN4", "/ip4/138.68.133.211/tcp/33107/p2p/12D3KooW9y4yDKY8PPK8kDESELiK1ffMwmTVb1DVLpkTY3175pHM"]...
⠂ 2/5 initial peers found.
1 Like

should be going I think.

are those peers valid? What code are you running? main? (they appear not to be aware of any more nodes)

1 Like

yes main, it is the peers the tool gave me yes.

Did I shoot myself in the foot here, as I am poking and not intending for a “usable” network I ran --vm-count 5 --node-count 5 is that perhaps too few?

That’s 25, so should be fine.

Hmmmm, can you grab the logs with logs copy and just see how many other nodes they are aware of?

You lost me here sorry, logs copy doesn’t appear to be a script and I am still very much finding my way around the new tool.

no worries. in the deployer you can run cargo run -- logs copy --name <testnet name> and it’ll pull down logs from each machine,

1 Like

:+1: ahh, it is busy adding more nodes, I need to wait for it to complete.
I just grep for peers?

Ah, when it’s done it should inform you of everything. Give you printed list of peers, contacts for faucet etc.

(thats me off again for the eve, good luck! let us know how you get on!)

1 Like

Attached the output of logs copy
output.zip (6.5 KB)

Can I destroy beta-build that beast going to demolish my wallet.

Got family round for a meal - I will join in later if possible.

1 Like

I have temporarily moved my attention to installing a lock on the outside of a sliding glass door which is almost as complicated as my previous endeavor. :sweat_smile:

2 Likes

So these feral Burmese pythons are getting bolder then?
I could never live in Florida - up to my arse in alligators - and lawyers.

Well, I have regressed and no longer complete, for reasons unknown :sob:

Running ansible against genesis node...
[WARNING]:  * Failed to parse /home/josh/sn-testnet-
deploy/resources/ansible/inventory/.beta_genesis_inventory_digital_ocean.yml
with auto plugin: We were unable to read either as JSON nor YAML, these are the
errors we got from each: JSON: Expecting ',' delimiter: line 1 column 181 (char
180)  Syntax Error while loading YAML.   did not find expected ',' or '}'  The
error appears to be in '<string>': line 1, column 181, but may be elsewhere in
the file depending on the exact syntax problem.
[WARNING]:  * Failed to parse /home/josh/sn-testnet-
deploy/resources/ansible/inventory/.beta_genesis_inventory_digital_ocean.yml
with yaml plugin: We were unable to read either as JSON nor YAML, these are the
errors we got from each: JSON: Expecting ',' delimiter: line 1 column 181 (char
180)  Syntax Error while loading YAML.   did not find expected ',' or '}'  The
error appears to be in '<string>': line 1, column 181, but may be elsewhere in
the file depending on the exact syntax problem.
[WARNING]:  * Failed to parse /home/josh/sn-testnet-
deploy/resources/ansible/inventory/.beta_genesis_inventory_digital_ocean.yml
with ini plugin: We were unable to read either as JSON nor YAML, these are the
errors we got from each: JSON: Expecting ',' delimiter: line 1 column 181 (char
180)  Syntax Error while loading YAML.   did not find expected ',' or '}'  The
error appears to be in '<string>': line 1, column 181, but may be elsewhere in
the file depending on the exact syntax problem.
[WARNING]: Unable to parse /home/josh/sn-testnet-
deploy/resources/ansible/inventory/.beta_genesis_inventory_digital_ocean.yml as
an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:
JSON: Expecting ',' delimiter: line 1 column 181 (char 180)

Idk if this is Ansible version related but I am using 8.2.0

(ansible_venv) josh@pc1:~/sn-testnet-deploy$ ansible --version
ansible [core 2.15.6]
  config file = None
  configured module search path = ['/home/josh/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/josh/sn-testnet-deploy/ansible_venv/lib/python3.11/site-packages/ansible
  ansible collection location = /home/josh/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/josh/sn-testnet-deploy/ansible_venv/bin/ansible
  python version = 3.11.4 (main, Jun  9 2023, 07:59:55) [GCC 12.3.0] (/home/josh/sn-testnet-deploy/ansible_venv/bin/python3)
  jinja version = 3.1.2
  libyaml = True
1 Like

Maybe this?

It is just a syntax error caused by incorrect indention.
1 Like

I don’t think so, line 1 doesn’t have a column 181, and I have not altered it at all from it previously not being a thorn in my side.

---
plugin: community.digitalocean.digitalocean
strict: True
attributes:
  - id
  - name
  - networks
  - tags
keyed_groups:
  - key: do_tags | lower
    prefix: ''
    separator: ''
compose:
  ansible_host: do_networks.v4 | selectattr('type','eq','public')
    | map(attribute='ip_address') | first
filters:
  - '"environment:beta" in do_tags'
  - '"type:genesis" in do_tags'

but there is a note in the docs saying:

August 2023 update: please pin to Ansible version 8.2.0, using pip install ansible==8.2.0 . There is an issue with the newer version not correctly reading the Digital Ocean environment variables for the dynamic inventory.

It worked before which makes me want to jump in front of a bus.

3 Likes

If it is any constipation, I t previously abandoned an ansible project cos the indentation and tabs/spaces thing drove me mental.

Have a strong cup of coffee, relax and try again.

2 Likes

Hi Josh,

Did you pin to that specific version of Ansible? If so, what happened after that?

1 Like

Hey Chris, gm!

Here is what I have.

Ansible
(ansible_venv) josh@pc1:~/sn-testnet-deploy$ pip install ansible==8.2.0 Requirement already satisfied: ansible==8.2.0 in /home/josh/ansible_venv/lib/python3.11/site-packages (8.2.0) Requirement already satisfied: ansible-core~=2.15.2 in /home/josh/ansible_venv/lib/python3.11/site-packages (from ansible==8.2.0) (2.15.6) Requirement already satisfied: jinja2>=3.0.0 in /home/josh/ansible_venv/lib/python3.11/site-packages (from ansible-core~=2.15.2->ansible==8.2.0) (3.1.2) Requirement already satisfied: PyYAML>=5.1 in /home/josh/ansible_venv/lib/python3.11/site-packages (from ansible-core~=2.15.2->ansible==8.2.0) (6.0.1) Requirement already satisfied: cryptography in /home/josh/ansible_venv/lib/python3.11/site-packages (from ansible-core~=2.15.2->ansible==8.2.0) (41.0.5) Requirement already satisfied: packaging in /home/josh/ansible_venv/lib/python3.11/site-packages (from ansible-core~=2.15.2->ansible==8.2.0) (23.2) Requirement already satisfied: resolvelib<1.1.0,>=0.5.3 in /home/josh/ansible_venv/lib/python3.11/site-packages (from ansible-core~=2.15.2->ansible==8.2.0) (1.0.1) Requirement already satisfied: MarkupSafe>=2.0 in /home/josh/ansible_venv/lib/python3.11/site-packages (from jinja2>=3.0.0->ansible-core~=2.15.2->ansible==8.2.0) (2.1.3) Requirement already satisfied: cffi>=1.12 in /home/josh/ansible_venv/lib/python3.11/site-packages (from cryptography->ansible-core~=2.15.2->ansible==8.2.0) (1.16.0) Requirement already satisfied: pycparser in /home/josh/ansible_venv/lib/python3.11/site-packages (from cffi>=1.12->cryptography->ansible-core~=2.15.2->ansible==8.2.0) (2.21)

(ansible_venv) josh@pc1:~/sn-testnet-deploy$ ansible --version
ansible [core 2.15.6]
config file = None
configured module search path = [‘/home/josh/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = /home/josh/ansible_venv/lib/python3.11/site-packages/ansible
ansible collection location = /home/josh/.ansible/collections:/usr/share/ansible/collections
executable location = /home/josh/ansible_venv/bin/ansible
python version = 3.11.4 (main, Jun 9 2023, 07:59:55) [GCC 12.3.0] (/home/josh/ansible_venv/bin/python3)
jinja version = 3.1.2
libyaml = True

The Thorn
PLAY [build binaries] **********************************************************

TASK [Gathering Facts] *********************************************************
ok: [beta-build]

TASK [build_safe_network_binary : store s3_deploy secret access key] ***********
ok: [beta-build]

TASK [build_safe_network_binary : clone safe_network repo] *********************
changed: [beta-build]

TASK [build_safe_network_binary : build faucet binary] *************************
changed: [beta-build]

TASK [build_safe_network_binary : copy binary to tmp directory] ****************
changed: [beta-build]

TASK [build_safe_network_binary : archive binary] ******************************
changed: [beta-build]

TASK [build_safe_network_binary : upload archive to S3] ************************
changed: [beta-build]

TASK [build_safe_network_binary : store s3_deploy secret access key] ***********
ok: [beta-build]

TASK [build_safe_network_binary : clone safe_network repo] *********************
ok: [beta-build]

TASK [build_safe_network_binary : build safe binary] ***************************
changed: [beta-build]

TASK [build_safe_network_binary : copy binary to tmp directory] ****************
changed: [beta-build]

TASK [build_safe_network_binary : archive binary] ******************************
changed: [beta-build]

TASK [build_safe_network_binary : upload archive to S3] ************************
changed: [beta-build]

TASK [build_safe_network_binary : store s3_deploy secret access key] ***********
ok: [beta-build]

TASK [build_safe_network_binary : clone safe_network repo] *********************
ok: [beta-build]

TASK [build_safe_network_binary : build safenode binary] ***********************
changed: [beta-build]

TASK [build_safe_network_binary : copy binary to tmp directory] ****************
changed: [beta-build]

TASK [build_safe_network_binary : archive binary] ******************************
changed: [beta-build]

TASK [build_safe_network_binary : upload archive to S3] ************************
changed: [beta-build]

TASK [build_safe_network_binary : store s3_deploy secret access key] ***********
ok: [beta-build]

TASK [build_safe_network_binary : clone safe_network repo] *********************
ok: [beta-build]

TASK [build_safe_network_binary : build safenode_rpc_client binary] ************
changed: [beta-build]

TASK [build_safe_network_binary : copy binary to tmp directory] ****************
changed: [beta-build]

TASK [build_safe_network_binary : archive binary] ******************************
changed: [beta-build]

TASK [build_safe_network_binary : upload archive to S3] ************************
changed: [beta-build]

PLAY RECAP *********************************************************************
beta-build : ok=25 changed=17 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

[WARNING]: Invalid characters were found in group names but not replaced, use
-vvvv to see details
[DEPRECATION WARNING]: Support for passing object key names with a leading ‘/’
has been deprecated. This feature will be removed from amazon.aws in a release
after 2025-12-01. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
Checking for SSH availability at 138.68.141.174…
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
SSH is available.
Running ansible against genesis node…
[WARNING]: * Failed to parse /home/josh/sn-testnet-
deploy/resources/ansible/inventory/.beta_genesis_inventory_digital_ocean.yml
with auto plugin: We were unable to read either as JSON nor YAML, these are the
errors we got from each: JSON: Expecting ‘,’ delimiter: line 1 column 181 (char
180) Syntax Error while loading YAML. did not find expected ‘,’ or ‘}’ The
error appears to be in ‘’: line 1, column 181, but may be elsewhere in
the file depending on the exact syntax problem.
[WARNING]: * Failed to parse /home/josh/sn-testnet-
deploy/resources/ansible/inventory/.beta_genesis_inventory_digital_ocean.yml
with yaml plugin: We were unable to read either as JSON nor YAML, these are the
errors we got from each: JSON: Expecting ‘,’ delimiter: line 1 column 181 (char
180) Syntax Error while loading YAML. did not find expected ‘,’ or ‘}’ The
error appears to be in ‘’: line 1, column 181, but may be elsewhere in
the file depending on the exact syntax problem.
[WARNING]: * Failed to parse /home/josh/sn-testnet-
deploy/resources/ansible/inventory/.beta_genesis_inventory_digital_ocean.yml
with ini plugin: We were unable to read either as JSON nor YAML, these are the
errors we got from each: JSON: Expecting ‘,’ delimiter: line 1 column 181 (char
180) Syntax Error while loading YAML. did not find expected ‘,’ or ‘}’ The
error appears to be in ‘’: line 1, column 181, but may be elsewhere in
the file depending on the exact syntax problem.
[WARNING]: Unable to parse /home/josh/sn-testnet-
deploy/resources/ansible/inventory/.beta_genesis_inventory_digital_ocean.yml as
an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:
JSON: Expecting ‘,’ delimiter: line 1 column 181 (char 180)

Syntax Error while loading YAML.
did not find expected ‘,’ or ‘}’

The error appears to be in ‘’: line 1, column 181, but may
be elsewhere in the file depending on the exact syntax problem.
Failed to provision genesis node ExternalCommandRunFailed(“ansible-playbook”)
Error:
0: Command that executed with ansible-playbook failed. See output for details.

Location:
src/main.rs:333