Ah, this is an encrypted file. What to do is, create a fork of the repository, then delete that file, and replace it with a text file, with these contents:
master_user_password="<your password>"
You actually only need this file if you’re creating an Opensearch stack, which we don’t need for just running a testnet.
The next thing to do is get my fork of sn_testnet_tool and use the new-safenode-testnet branch:
git clone https://github.com/jacderida/sn_testnet_tool.git
cd sn_testnet_tool
git checkout new-safenode-testnet
Now go to the aws directory. Read the instructions in the ‘Setup’ section in the README and get back to me. Note: this is the README under the aws directory, not the README at the top level of the repository.
The SN_TESNET_DEV_SUBNET_ID and SN_TESTNET_DEV_SECURITY_GROUP_ID need to be replaced with values from your own infrastructure. The subnet ID can be either of the two public subnets that were created from terraform-testnet-infra, and the security group ID also comes from that infrastructure.
willie@gagarin:~/projects/maidsafe/terraform-testnet-infra/networking$ terraform validate
╷
│ Error: Module not installed
│
│ on main.tf line 15:
│ 15: module "vpc" {
│
│ This module is not yet installed. Run "terraform init" to install all modules required by this configuration.
╵
willie@gagarin:~/projects/maidsafe/terraform-testnet-infra/networking$ terraform init
Initializing the backend...
Error refreshing state: AccessDenied: Access Denied
status code: 403, request id: Z4F3RDGT557X9R7R, host id: tnasCI8ib/DU+gXXdxfJH7eNMeks2hzzML+O3QoVbQR43IrGwBaf6mnwJOvyZ+JoDFLmNcp5Gc8=
I can complete the first couple of Hasicorp tutorials so I know I am set up correctly.
willie@gagarin:~/projects/maidsafe/terraform-testnet-infra$ just networking "dev"
Initializing the backend...
Error refreshing state: AccessDenied: Access Denied
status code: 403, request id: 6JBBGM2SE4KDNDJJ, host id: W/cEF3YZOykSoCaMjSY0eGDFgbuhraa7hPhd3gJXQyW9KjuOwFbQ866L29faIJSJHHAYQM2SwvQ=
╷
│ Error: Required plugins are not installed
│
│ The installed provider plugins are not consistent with the packages selected in the dependency lock file:
│ - registry.terraform.io/hashicorp/aws: there is no package for registry.terraform.io/hashicorp/aws 4.49.0 cached in .terraform/providers
│
│ Terraform uses external plugins to integrate with a variety of different infrastructure services. To download the plugins required for this
│ configuration, run:
│ terraform init
╵
Creating new Terraform workspace dev
╷
│ Error: Required plugins are not installed
│
│ The installed provider plugins are not consistent with the packages selected in the dependency lock file:
│ - registry.terraform.io/hashicorp/aws: there is no package for registry.terraform.io/hashicorp/aws 4.49.0 cached in .terraform/providers
│
│ Terraform uses external plugins to integrate with a variety of different infrastructure services. To download the plugins required for this
│ configuration, run:
│ terraform init
╵
cat: '<path>': No such file or directory
Creating new key pair for the testnet infra...
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
aws: error: argument --public-key-material: expected one argument
error: Recipe `init` failed with exit code 2
error: Recipe `networking` failed with exit code 2
willie@gagarin:~/projects/maidsafe/terraform-testnet-infra$
This is our bucket, so you need to change the name to one of your own. If I recall correctly, bucket names are global to the whole system, so you won’t have access to one in our account.
Also, there’s an error further down which is indicating you haven’t created the .env file and set your SSH public/private key paths.
Make sure also you have set these environment variables:
@Josh You would need to do the same thing and change the name of the buckets for the tfstate files (in both repositories).
I have honestly never seen that error before about creating an EC2 instance. You can launch Terraform with TF_LOG=debug to see if you can get more information. If you’re using a free tier account, is it possible you’re trying to launch an instance that isn’t on free tier?
Not a free tier
All buckets are changed, maybe this helps:
Error: creating EC2 Instance: Blocked: This account is currently blocked and not recognized as a valid account. Please contact aws-verification@amazon.com if you have questions.
│ status code: 400
│
│ with module.genesis_ec2_instance.aws_instance.this[0],
│ on .terraform/modules/genesis_ec2_instance/main.tf line 7, in resource "aws_instance" "this":
│ 7: resource "aws_instance" "this" {
looks like it is a region issue, I am not a new customer but how do we determine new.
As a new customer, you can launch Elastic Compute Cloud (EC2) instances in 3 AWS regions. We suggest you to use the regions US East (N. Virginia), US East (Ohio), US West (Oregon),
I am getting involved with this on the assumption that we (those who are diving in right now) will be able to set up their own testnets on AWS - with a view to combining them all later into the upcoming Joshnet which will predominately consist of Maidsafe-funded AWS and DO resources.
Is this a reasonable assumption and if so, should we be looking to set up the VPCs in the same AWS region?
Should I move everything from eu-west-1 to eu-west-2?
Ah yeah, I’ve just seen that the region is hard coded in the Terraform manifest. Ideally these would probably use environment variables, but I think I looked into that before and you can’t use environment variables with the provider blocks.
Make sure the Terraform manifest and AWS_DEFAULT_REGION are set to the same value.
You might want to log in to the GUI and try launching an instance in different regions to see which one it will let you launch in.
It should be possible for nodes you launch to connect to ours, but it would all be done using public IP addresses, so it shouldn’t matter where your nodes are running, as long as the connectivity is open.
In any case, we use eu-west-2 and I’ve no plans to change that.
Changed regions but it found something new to complain about!
Error: creating EC2 Instance: InvalidAMIID.NotFound: The image id '[ami-01b8d743224353ffe]' does not exist
│ status code: 400,
│
│ with module.node_ec2_instances[13].aws_instance.this[0],
│ on .terraform/modules/node_ec2_instances/main.tf line 7, in resource "aws_instance" "this":
│ 7: resource "aws_instance" "this" {