2018-07-11 13:12:52 +00:00
|
|
|
Deploying Corda to Corda Testnet from an Azure Cloud Platform VM
|
|
|
|
================================================================
|
|
|
|
|
|
|
|
.. contents::
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
This document will describe how to set up a virtual machine on the Azure Cloud Platform to deploy your pre-configured
|
|
|
|
Corda node and automatically connnect to Testnet. A self-service download link can be obtained from
|
|
|
|
https://testnet.corda.network.
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
Pre-requisites
|
|
|
|
--------------
|
2018-08-17 15:59:52 +00:00
|
|
|
* Ensure you have a registered Microsoft Azure account which can create virtual machines.
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
Deploy Corda node
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
Browse to https://portal.azure.com and log in with your Microsoft account.
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
STEP 1: Create a Resource Group
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2018-07-11 13:12:52 +00:00
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
Click on the "Resource groups" link in the side nav in the Azure Portal and then click "Add":
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
.. image:: resources/azure-rg.png
|
|
|
|
|
|
|
|
Fill in the form and click "Create":
|
|
|
|
|
|
|
|
.. image:: resources/azure-rg-2.png
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
STEP 2: Launch the VM
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
At the top of the left sidenav click on the button with the green cross "Create a resource".
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
In this example we are going to use an Ubuntu server so select the latest Ubuntu Server option:
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
.. image:: resources/azure-select-ubuntu.png
|
|
|
|
|
|
|
|
Fill in the form:
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
* Add a username (to log into the VM) and choose and enter a password
|
|
|
|
* Choose the resource group we created earlier from the "Use existing" dropdown
|
|
|
|
* Select a cloud region geographically near to your location to host your VM
|
2018-07-11 13:12:52 +00:00
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
Click on "OK":
|
2018-07-11 13:12:52 +00:00
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
.. image:: resources/azure-vm-form.png
|
2018-07-11 13:12:52 +00:00
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
Choose a size ("D4S_V3 Standard" is recommended if available) and click "Select":
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
.. image:: resources/azure-instance-type.png
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
Click on "Public IP address" to open the "Settings" panel
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
.. image:: resources/azure-vm-settings.png
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
Set the IP address to "Static" under "Assignment" and click "OK":
|
2018-07-11 13:12:52 +00:00
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
.. note:: This is so the IP address for your node does not change frequently in the global network map.
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
.. image:: resources/azure-set-static-ip.png
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
Next toggle "Network Security Group" to advanced and click on "Network security group (firewall)":
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
.. image:: resources/azure-nsg.png
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
Add the following inbound rules for ports 8080 (webserver), and 10002-10003 for the P2P and RPC ports used by the Corda
|
|
|
|
node respectively:
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
.. code:: bash
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
Destination port ranges: 10002, Priority: 1041 Name: Port_10002
|
|
|
|
Destination port ranges: 10003, Priority: 1042 Name: Port_10003
|
|
|
|
Destination port ranges: 8080, Priority: 1043 Name: Port_8080
|
|
|
|
Destination port ranges: 22, Priority: 1044 Name: Port_22
|
|
|
|
|
|
|
|
.. note:: The priority has to be unique number in the range 900 (highest) and 4096 (lowest) priority. Make sure each
|
|
|
|
rule has a unique priority or there will be a validation failure and error message.
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
.. image:: resources/azure-nsg-2.png
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
Click "OK" and "OK" again on the "Settings" panel:
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
.. image:: resources/azure-settings-ok.png
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
Click "Create" and wait a few minutes for your instance to be provisioned and start running:
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
.. image:: resources/azure-create-vm.png
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
STEP 3: Connect to your VM and set up the environment
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
Once your instance is running click on the "Connect" button and copy the ssh command:
|
|
|
|
|
|
|
|
.. image:: resources/azure-ssh.png
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
Enter the ssh command into your terminal. At the prompt, type "yes" to continue connecting and then enter the password
|
|
|
|
you configured earlier to log into the remote VM:
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
.. image:: resources/azure-shell.png
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
STEP 4: Download and set up your Corda node
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2018-07-11 13:12:52 +00:00
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
Now that your Azure environment is configured you can switch to the
|
|
|
|
`Testnet web application <https://testnet.corda.network/platform>`_ and click "Copy" to get a one-time installation
|
|
|
|
script.
|
2018-07-11 13:12:52 +00:00
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
.. note:: If you have not already set up your account on Testnet, please visit https://testnet.corda.network and sign
|
|
|
|
up.
|
2018-07-11 13:12:52 +00:00
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
.. note:: You can generate as many Testnet identites as you like by refreshing this page to generate a new one-time
|
|
|
|
link.
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
.. image:: resources/testnet-platform.png
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
In the terminal of your cloud instance, paste the command you just copied to install and run your Corda node:
|
2018-07-11 13:12:52 +00:00
|
|
|
|
|
|
|
.. code:: bash
|
|
|
|
|
|
|
|
sudo ONE_TIME_DOWNLOAD_KEY=YOUR_UNIQUE_DOWNLOAD_KEY_HERE bash -c "$(curl -L https://testnet.corda.network/api/user/node/install.sh)"
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
.. warning:: This command will execute the install script as ROOT on your cloud instance. You may wish to examine the
|
|
|
|
script prior to executing it on your machine.
|
2018-07-11 13:12:52 +00:00
|
|
|
|
2018-07-20 15:21:24 +00:00
|
|
|
You can follow the progress of the installation by typing the following command in your terminal:
|
|
|
|
|
|
|
|
.. code:: bash
|
|
|
|
|
|
|
|
tail -f /opt/corda/logs/node-<VM-NAME>.log
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
Once the node has booted up, you can navigate to the external web address of the instance on port 8080:
|
2018-07-20 15:21:24 +00:00
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
.. code:: bash
|
|
|
|
|
|
|
|
http://<PUBLIC-IP-ADDRESS>:8080/
|
2018-07-20 15:21:24 +00:00
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
If everything is working, you should see the following:
|
|
|
|
|
|
|
|
.. image:: resources/installed-cordapps.png
|
2018-07-20 15:21:24 +00:00
|
|
|
|
|
|
|
Testing your deployment
|
|
|
|
-----------------------
|
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
To test that your deployment is working correctly, follow the instructions in :doc:`testnet-explorer-corda` to set up
|
|
|
|
the Finance CorDapp and issue cash to a counterparty.
|
2018-07-20 15:21:24 +00:00
|
|
|
|
2018-08-17 15:59:52 +00:00
|
|
|
This will also demonstrate how to install a custom CorDapp.
|