Your own customizable Sidechain and Explorer in < 20 minutes
A shout-out to Jarunik and his voter sponsorship program for this article!
Pre-Requisites: Active Microsoft Azure account (Trial is OK) — and know how to connect to something via SSH (PuTTY for Windows)
– Ubuntu VM in Azure
– Azure PublicIP and Firewall configurations pre-built
– Your own SideChain node and Ark Explorer running in < 20 minutes
– Re-usable and customize-able deployment script
1. Virtual Machine Quick Deployment
Navigate to: https://github.com/davepinkawa/Ark-Azure
Click on the big blue “Deploy to Azure” button to be taken to Portal.Azure.com. Login with your account (Trial or not, either work).
You should only need to input data for 3 empty fields (Resource Group, Admin Password, and DNS Label), but full details for this section:
Subscription — if not already on your current one.
Resource Group — ‘Create New’ only option that will work unless you wish to edit the template yourself.
Location — Trial availability varies by region. Select whichever you are permitted access to via trial, or if paid, any will do.
Admin Username — This is the account you will sign into the server with.
Admin Password — Secure string and has high complexity requirements.
Dns Label Prefix — This is the unique DNS name that you are giving to this VM. It is mandatory that this name be unique in the Location Datacenter as a whole (It will self-check after input) **Remember this for easy SSH
Ubuntu OS Version — Only option is 16.04-LTS at this time.
ARKNSG Name — This is the name for the firewall group to permit SSH as well as Ark Node/Explorer port access to this VM.
Currently, the VM produced is a Standard_A1 size VM. This is a very low-cost resource VM for tutorial purposes (Can be scaled-up after deployment if desired or via template adjustment)
Click Agree, and Purchase to begin deployment. Should take 5–10 minutes.
2. Connecting to VM + Ark Deployer
You are welcome to explore your new VM’s Overview, etc, by clicking on ‘Resource Groups’ and finding your new group, and the VM inside. Lots of configuration items here.
Ifyou do not remember your Public DNS name or IP address (For SSH), Go to: Resource Groups > My-Ark-RG > MyUbuntuVM > Overview. This has all the general information you will need.
Connecting via SSH
The Public DNS Name for all VMs follows this pattern:
So in my case here: firstarksidechain.southcentralus.cloudapp.azure.com
Use this as the Host Name in PuTTY, and click ‘Open’
Click accept when prompted to trust the new VM and login with the credentials used during the VM Template deployment page.
Starting here, is the default quick-installation method with the chain being named “MyTest”. If you wish to customize, please see the bottom-most section of this article.
Run the following command (It’s a one-liner, copy and paste the full contents from here or from the Github page):
This script will complete all of the installation steps to get both Ark node and Ark explorer running for your sidechain, with all Default values. Total installation time is about 10 minutes.
There is 1 important item to locate in the stream of data being output to the console (For wallet control, etc). Your Genesis Passphrase details!
Just after the Node gets installed, there will be 3 lines of text to record. Copy and Paste works just fine out of PuTTY, so grab these lines outlined in Red.
This information will be used later on, as you explore Ark past the deployment phase with Alex Barnsley. Copy and Paste it right out of the console window for safe keeping.
3. Final result — See Explorer in action
This is the Public IP of your server, and the port required to view the Ark Explorer for your sidechain (4200). The API should be available on Port 4100.
You can highlight the URL straight from the PuTTY window, such as: http://126.96.36.199:4200 and hit CTRL+C to copy it. Paste into a browser, and voila!
4. Customizing Your Deployment
If you wish to customize your deployment of Ark within the bounds of Ark-Deployer, download a copy of:
Within this file, you’re welcome to edit the list of variables on lines 21–31 and personalize them. These variables all align with an optional parameter of Ark Deployer (See GitHub: https://github.com/ArkEcosystem/ark-deployer#optional-parameters)
You can then run this new version of your script against a new VM, or, you can uninstall the original node/explorer and re-install using the script again. I would recommend just rolling out a new server for ease of use, but that’s your call.
To quickly make a personalized copy of the script (GitHub account)
- Go in browser to: https://raw.githubusercontent.com/davepinkawa/Ark-Azure/master/script/arkdefaultinstall.sh
- Copy the contents of this file (ALL of it; Just CTRL+A and CTRL+C)
- Open a new tab to https://gist.github.com/
- Paste contents of clipboard to this file, and customize lines 21–31 to your hearts content. These variables all align with an optional parameter of Ark Deployer (See GitHub: https://github.com/ArkEcosystem/ark-deployer#optional-parameters).
- Create a ‘Public Gist’ with a .sh file name (required)
- Click on “Raw” on the same line as your file name and copy the URL
- You can now, on a prepared VM, run via SSH:
- curl -o- [paste raw gist URL here ending in .sh] | bash
Enjoy following along with Alex Barnsley’s guide going forward in your Ark journey with this amazing and far more in-depth article about Ark: https://blog.ark.io/ark-deployer-setup-guide-c10825ebb0e4