Starting a test network on AWS

Hey everyone, I’ve been hanging around this forum for too long sitting on my hands. I’m want to try using the free AWS account to I have to run Safe. I’ve scrolled and scrolled through posts here going in loops trying to find where to start.

If I wanted to download and run a test network on an Ubuntu system where would i start? Sorry for the noobish post but grew tired of scrolling.

THANK YOU!

Too many squirrels running around in my brain!

9 Likes

I could potentially talk you through the setup I have for running a testnet on AWS, but I don’t think it would remain completely free. You need to create a VPC and I think some of those components are not free.

5 Likes

Any directions would be appreciated and if I have to pay for something I’ll do it. :slight_smile:

1 Like

If you wanted to publish the VPC details, I would hook a couple of instances to that from my own free tier allowance.

3 Likes

Which region will you be doing this in?

PS the correct answer is eu-west-1 :slight_smile:

1 Like

Do you want to just take over this with your setup?

2 Likes

The VPC pricing doesn’t seem to expensive…famous last words…

2 Likes

Have you read GitHub - maidsafe/terraform-testnet-infra: Defines infrastructure for hosting testnets (and supplementary tooling like OpenSearch) on AWS
and
sn_testnet_tool/aws at main · maidsafe/sn_testnet_tool · GitHub ?

2 Likes

@upstate

The first thing to do is get a copy of this repository:

Go through the instructions in ‘General Setup’. They are not very specific because they are assuming the reader has some technical knowledge, so if you need to ask any questions, please do.

When you’ve done that, let me know.

3 Likes

Much appreciation!

Also, now that I’m out of work and calmed down some of the squirrels, I realized I was going down the wrong path for starting a test environment for myself to do development. I thought at one time there was a way to start up a bunch of nodes yourself.

With that being said this seems way more interesting at the moment to start with. Thank you all again.

With the latest binaries all you need is testnet – with no args you will get 25 local nodes

1 Like

Hey Chris, whats the reason for switching to aws?
I see there is wan testnet pr which is DO so is it a personal preference thing?

3 Likes

Hi Josh,

We will support both AWS and DO. At some point, I’d imagine our testing may involve nodes on both providers. They both have benefits over the other in certain areas. AWS is a lot more sophisticated than DO, but in certain cases the simplicity of DO is actually beneficial.

I’m hoping to refactor the testnet tool with my new AWS setup to make that also work with DO. I still need to get the go ahead from Josh on that one though.

We may also be bringing this infrastructure in to the main safe_network repo too.

I’m not sure if @upstate actually wants to move forward with this, but if anybody else wanted to go through using our setup I would be happy to talk through it in this thread.

6 Likes

I am definitely up for giving it a try! I don’t have time this evening but will give it a shot tomorrow and shout when I hit a roadblock.

I was playing with the stripped down DO set up today.
Is https://sn-node.s3.eu-west-2.amazonaws.com still getting latest or should I use a local build.

3 Likes

OK cool.

Go through the ‘General Setup’ section first, and get back to me when you’ve done that. Or if you have any questions with that.

The README actually needs updated a little bit because you don’t need to setup Opensearch, you just need the base networking stuff, and it doesn’t describe how to do that. I’ll put in a PR for it shortly.

4 Likes

Sorry, I just realised, I never answered this question.

At the moment, we don’t have any release process for the new repo, so safenode-latest-x86_64-unknown-linux-musl.tar.gz is just a binary I’ve put there manually.

6 Likes

That would be great!

3 Likes

Im getting forced down several IAM rabbit holes trying to set up a user that will only be able to run AWS CLI.
apart from that I have nearly finished the ‘General Setup’ section.

Its all AWS stuff, I just need to read it all again.

4 Likes

@chriso what goes into secrets.tfvars

│ Error: Invalid character
│ 
│   on secrets.tfvars line 1:
│    1: GITCRYPTET/	0�C[�ֻ�ROkfЈ3�cH� ��b�'��́�TS���� CF>��+vu�
│ 
│ This character is not used within the language.

That is my current roadblock, prob better to wait on that PR.

Just to let you know, you use an IAM user with the CLI. The permissions you assign to the user then dictate what actions they are allowed to perform with the CLI (or by any other means, e.g., GUI - they all end up going through the same APIs at the bottom). So you don’t create a user for using the CLI as such, what you would want in this case is a user who would be able to create and remove all the resources defined in this repository.

However, I would suggest, if you’re only running on your personal account, you don’t really need a user with fine-grained permissions. It’s bad practice to use the keys on your root account, so what I’d probably do if I was you, is create one IAM user and assign it the Administrator role, so it can then do almost anything on your account. If you really do want a user who can only manipulate the resources in this repository, I can get the list of permissions, but honestly I would advise not bothering with that for a personal account.

1 Like