Running a LTO Network node on Alibaba Cloud (ECI)

Stefan van Oirschot
LTO Network
Published in
7 min readApr 20, 2019

So you decided you want to be part of the LTO Network, awesome! Ow… you were already part of the Community?! Even better! Nice to meet you!

A great way to be part of the community is by actively participating as a node in the network. This blog post demonstrates the steps needed to get an LTO Network node up and running using Alibaba Cloud, specifically Elastic Container Instances.

In this guide I’ll be skipping the part about creating wallets, having a main wallet, a staking wallet, how to lease, etc. If you want to read more about this, please check out the steps 1 and 2 in this guide.

Be prepared for some tough configuration. Configuring a container instance on Alibaba is not at all straightforward and a lot of manual networking and security related steps are involved.

Deploying your node on Alibaba Cloud using the browser interface

Alibaba Cloud — LTO node — Main screen

Setting up an LTO Public Node on Alibaba cloud is _not_ possible using a free account. There are paid services involved like a NAT Gateway and Elastic IP. Make sure you have entered your payment parameters before continuing.

Alright, let’s go!

Alibaba Cloud — LTO node — Product overview

Alibaba Cloud offers multiple Container offerings. The Container Service gives you the option of configuring a Kubernetes cluster or Swarm cluster. We do not want this. We just want to deploy 1 container.

We’ll go with the Elastic Container Instance option.

Alibaba Cloud — LTO node — Elastic Container Instance main screen

On the Elastic Container Instance product page click Create Elastic Container Group.

Alibaba Cloud — LTO node — ECI main configuration page

We’ll come back to this page a few times. Unfortunately we have to setup various network and security related stuff before being able to deploy our container.

All links you’ll click will open in a new Tab which makes it easy to jump back.

Important: Make sure you configure the resources in the region you’re actually using for your container deployment. In the above screenshot you see the US West 1 and then Zone B. All my configuration is done in Zone A! I will have to switch to be able to select my netwerk components, for example the vSwitch.

The configuration container configuration page asks us to select a VPC. We do not have one yet so let’s create one by clicking Go to Console and Create.

Alibaba Cloud — LTO node — VPC, Virtual Private Cluster configuration

In the next screen click on Create VPC. In the screen appearing configure a VPC and a vSwitch. As you can see in the screenshot above. This is were you configure the Zone.

Next up is configuring the NAT Gateway. Click on the NAT Gateways option in the menu on the left.

Alibaba Cloud — LTO node — NAT Gateways overview

No NAT Gateway available yet. In the screen appearing click on Create NAT Gateway to create one.

Alibaba Cloud — LTO node — NAT Gateway — This is a paid service.

Let’s go with the defaults. A Small Specification should be enough. Continue.

Alibaba Cloud — LTO node — Finish your order

With your order complete you can refresh your NAT Gateways overview page. You will see your NAT Gateway appearing. Let’s go to the next option to configure. The EIP.

Alibaba Cloud — LTO node — EIP configuration page

The EIP is our Elastic IP Address. Click on Elastic IP Addresses in the menu on the left. Click Create EIP in the screen appearing to create our Elastic IP address.

Alibaba Cloud — LTO node — Another paid service :)

Not sure about the max bandwidth needed. I went with 50 Mbps in this example. Make sure you have the region configured as the region were you’ll be deploying your container. Click on Buy Now and finish the rest of the transaction.

Alibaba Cloud — LTO node — EIP Available

In the above screenshot you can see that we have our freshly ordered EIP available. It’s time to bind the EIP to our NAT Gateway. Click Bind on the far right.

Alibaba Cloud — LTO node — Bind EIP to our NAT Gateway

We want to bind the EIP to our NAT Gateway. Make sure to select NAT Gateway Instance in the Instance Type field. Now select your NAT Gateway Instance and click OK.

Alibaba Cloud — LTO node — EIP bind to NAT Gateway → Allocated

Good job! You’ll see the status changing from Binding to Allocated when successful. With this done we can go back to our NAT Gateway and configure Source NAT.

Alibaba Cloud — LTO node — NAT Gateways overview

Click on Configure SNAT on the far right to configure Source NAT.

Alibaba Cloud — LTO node — Add a SNAT entry to our table

To continue click on Create SNAT Entry a new screen will appear.

Alibaba Cloud — LTO node — Create SNAT Entry page

Select our vSwitch and select our EIP. Your IP address will differ from the above screenshot. Now click OK to continue.

Alibaba Cloud — LTO node — We’re back in the ECI configuration page

OK, we’re back in the ECI configuration page. As you can see we switched our zone to Zone A as I configured my vSwitch in Zone A. I’ve selected my VPC and my vSwitch.

Next up is the configuration of a Security Group. We’ll do this by clicking on Create Security Group.

Alibaba Cloud — LTO node — Security Groups overview

Click Create Security Group to continue.

Alibaba Cloud — LTO node — Rules!

We do not really want rules but still, let’s click on Create Rules Now. Accept the proposed rules.

Alibaba Cloud — LTO node — Security group ingress overview

Go to the ingress rules tab of our security group. Select all the rules there and remove them. We do not need ingress rules to make our LTO Public Node work.

Alibaba Cloud — LTO node — Back to the ECI configuration

With our Security Group created and configured we can finally continue with the configuration of our Elastic Container Instance. Click on Select Security Group and select our freshly created security group from the list. Click Select.

Now scroll down to the Container Group Name for the next step.

Alibaba Cloud — LTO node — Finally, some container configuration

We’re almost there. It’s time todo some container configuration.

Please enter a:

  • Container Group Name: you choose!
  • Container Name: you choose!

Fill in the Docker Image name for the public node and fill in “latest” in the version field.

Select 1 vCPU and the 2GiB memory option will appear. We do not need 4 GiB.

Finally enter the environment variables. Unlike in the above screenshot we need to configure 3 parameters:

  • LTO_WALLET_SEED: The seed of the wallet you use for staking
  • LTO_WALLET_PASSWORD: You choose a password
  • LTO_NODE_NAME: Optional but can be a good idea :)

Let’s Create the container.

Alibaba Cloud — LTO node — ECI overview page

A small summary before kicking off the creation process. If everything looks good to you click on Create ECI to activate the container.

Alibaba Cloud — LTO node — ECI instance successfully activated

Yes, we did it. We created our Elastic Container Instance on Alibaba Cloud! Click Console to see our container in action.

Alibaba Cloud — LTO node — Looking good! blockchain downloaded, appending MicroBlocks!

In the above screenshot i have selected our freshly created container instance and the Logs tab. I’ve selected the Container Name and clicked OK to view the log entries.

Depending on when you check the node will be busy downloading the blockchain or appending MicroBlocks :)

That’s it. You’ve successfully mastered setting up a LTO Network public node on Alibaba Cloud. Awesome!

Now wait for a 1.000 blocks…

Best of luck and thank you very much for contributing and being part of the LTO Network Community!

--

--

Stefan van Oirschot
LTO Network

Chief Digital Advisor at Red Hat | Creating organizational impact through Open Transformation