Log inLog Out
For YouPoliticsEntertainmentRelationshipLifestyleSportsTechnology
Easily set up an Aion Network node using Docker on AWS.

UmaiR

Oct. 13, 2019

SSH into your VM
Secure Shell ( SSH ) is a cryptographic network protocol for operating network services securely over an unsecured network. What this means is that you can access a computer remotely from your local computer with Terminal on a Mac or Command Prompt on Windows. The commands are different on both but because we are accessing our Linux instance in AWS it will not matter and we will be using Linux commands.
To SSH in you will need three pieces of information.
The command which is [ ssh -i ] ssh is the command and the [ -i ] option specifies that we are going to give it an identity file as an argument.
The identity file [ /path/to/file/aionBlockchain.pem ] which is the .pem key file you downloaded after initializing your VM. You can easily get the path by moving the file with your mouse and dropping it into the terminal.
The username and DNS name [ ec2-user@ec2–54–202–60–22.us-west-2.compute.amazonaws.com ]. The username for a LINUX EC2 instance is ec2-user by default and the instance can be found by clicking on your running machine and underneath in the description tab on the right-hand side at the top next to Public DNS (IPv4)
The command should look something like this
Once you hit enter you should be a screen similar to this.
Installing Docker
Now you have access to our Linux computer you can install the Aion kernel. Aion has two kernel/client options. One built with Rust and the other with Java. You will be installing the Java version. Our machine should already be configured with Docker but just to be sure type:
If you get a version then great you can skip the next few steps and carry on. If you received something similar to this:
You will need to install Docker. To do that type the following command:
Broken down this command is:
sudo permits you to run commands as the superuser.
YUM(Yellowdog Updater Modified) is an open-source, command-line tool that allows you to easily install, update, remove or search software packages on a system.
-y a parameter is for YUM that will automatically answer yes to all questions throughout the install.
Now you have Docker installed, we will need to start it. Type the following:
Installing Aion kernel
( This information can be found at the Aion docs page but the description here is more high level for someone who has less experience with installing applications on the command line )
Once started you can now pull the latest Aion Java Image by typing the following:
You will need to create a local volume to store the blockchain that you are about to sync to. Call the volume aion-mainnet. You can do this by typing the following:
You are now officially set up to start our node! You do this by typing:
What! that's a lot of information. Let’s break it down:
[ docker run ] specifies what container you want to run.
[ -it ] is an option combined with docker run. It specifies to have a terminal driver added so you can access the container whilst it is running. This allows you to interact with the running node.
[ -p ] publishes a port to the host. So we currently have ports :8545, :8547,:30303 open.
[ — mount-source ] specifies what volume to use. You will use the aion-mainnet that you just created.
[ destination ] specifies the path to where the volume is located.
If all went well you should see the kernel start from the genesis block and sync to the blockchain. You should see something similar to this.
It will take a while to sync and be up to date with the current block. At the time of this writing using this configuration, it took around 12 hours to get to the current block.
Let's break down what the terminal is telling us:
1–8 Information on peers connected
Seed node
Total difficulty
Block number and hash
The IP address of the node
Port of IP address
If the connection is outbound or inbound
Binary version
9–12 Information on block synced
9. DateTime of sync
10. Node the block was received from
11. Hash Id
12. Block number
Once the block number is the same as the most recent block on the Aion mainnet block explorer you have a running node that is currently in sync with the Aion Network.
WOW! how easy was that? Now you are contributing to making the internet a more transparent, trustworthy and decentralized place.
0
Comments
Sign in to post a message
You're the first to comment.
Say something
Recommend
Log in