Questions on bootnode setup (Ubuntu server vs local VM)


#1

Hi Team,

I am setting up bootnode on AWS by following these steps:

Questions:

  • I don’t understand the purpose of step 0. It says make sure you have Python installed. I assume it refers to local VM (control VM?)
  • It is not clear if I need any control VM or not. So I ignored steps 0 for now, and tried to proceed:
  1. Installed Ubuntu server on AWS (T2.Large Instance)
  2. Completed steps 2-9 All on Ubuntu Server (not sure if all these steps should be done on Ubuntu server or not. Maybe local VM?)
  3. Currently I am on step 10. Please let me know if this also needs to be done on Ubuntu server?

I get an error: UNREACHABLE! => {“changed”: false, “msg”: “ERROR! SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh”, “unreachable”: true}

This is when I got confused about “remote host” Because with my current setup I am basically trying to connect from Ubuntu server to itself (public IP) which doesn’t seem right.

Please let me know.

Thank you,
Marat


#2

Marat,

I believe the playbook scripts are designed to be configured and executed on your local VM not the remote Ubuntu Server you set up, as it appears you have done.

So:

  • step 0 should be done on local VM if python not installed or doesn’t match specified versions.
  • steps 2-12 should be done on local VM as well

Will see if the documentation can be made clearer.

Another thing that make me uncomfortable is that the title of this document is: “How to setup a bootnode on not-AWS.” an yet you used AWS.

Perhaps just a typo in title but will have to research more and get back to you.

Thanks for trying and asking questions & a Happy New Year to you and yours!

John


#3

Thanks for replying, John.

I’ll try again

As for the title, I did notice that it says not-AWS, but I got this link from TG channel and it was provided as AWS related :slight_smile: also AWS was mentioned in the steps… So I thought it is a typo.

Thanks,
Marat


#4

I am in process of creating the wiki in the wiki repo and adding more info to all the docs and more info about the network itself. I will try to clear this up in the docs, but if there is anything else you guys can think of, please feel free to message me or reply here, Thank you.


#5

Thanks! Once I am back from vacation, I’ll be deploying on AWS again and will use two servers

T2.micro as control VM (free tier)
T2.large as bootnode

If you can, please add more info on step 4 (admin keys and bootnode keys)

Looking forward to your Wiki updates


#6

Hi, just login via ssh to your t2.large instance. be sure you have pip installed ansible there with boto and boto3 pip installed too. Then put your hosts file in the cloned bootnode directory. your hosts file must contain only this (for bootnode): [bootnode]
Your_Public_Ip ansible_connection=local
then go to etc/ssh folder using mc(or other) and copy your ssh_host_key_rsa.pub file to /files folder with renaming it to admins.pub, after this run ansible-playbook -i hosts site.yml as root
Must be done).
Check for by ansible added instances during your final setup and and kill them. There can be automatic misusing security group for bootnode user, so you can also check that.


#8

It is unclear what service you used, looks like you are just posting the instructions here. Did you use AWS for your deployment or are you using another cloud service?


#9

Hi, am using both AWS and Scaleway PoA Network bootnode instances. While serving same as author above mentioned problem I found that it’s very easy(and cost effective, because each time you get an error running playbook on your local machine playbook generates an instance on AWS, so you need to stop unnecessary inst) to run ansible playbook on host system directly
To setup bootnode on Scaleway you need to add security group,group policy rules and ubuntu user manually . It takes about 2 min and then we can run ansible playbook for install bn. ) To be able to instantly deploy PoA Network bootnode on Scaleway hosting(Europe) you also need to comment this:
- bootnode-access
in your site.yml file(line 29).


#10

I am not sure what you are talking about with bootnode-access, I didn’t have to do anything like that unless it is specific to Scaleway. You need to create a user (easier to just use ubuntu or change the name top of site.yml) and that user needs sudo privileges WITHOUT password and need to manually put the SSH keys on the remote machine ubuntu user.
Create a new file in

 /etc/sudoers.d/ 

directory and add

ubuntu ALL=(ALL) NOPASSWD:ALL

Put SSH keys in

/home/ubuntu/.ssh/authorized_keys 

on remote machine with the private key being local

I will have a full guide on setting up Non-AWS virtual machines on a cloud service in the github wiki soon. After the machine is setup, you do not need to run the first playbook, only the site.yml playbook after commenting out the AWS options for secret keys. etc and finishing your config & hosts file. I am not sure if this is where your problem lies, lmk.


#11

Yes, Scaleway has it’s specific API, for full automation for SC hosting playbook need to use uri module to be able to create security groups on SC or adding users to host machine. But it isnt a problem, simply do not use security group creation options in site yml and create them manually for 2 min))) Hope this info about SC was helpful for your Non-AWS wiki. For me i prefer to run playbook directly on host machine. )