mirror of
https://github.com/corda/corda.git
synced 2025-06-18 23:28:21 +00:00
Merge remote-tracking branch 'open/master' into os-merge-20180722
# Conflicts: # CONTRIBUTORS.md # constants.properties # docs/source/aws-vm-explore.rst # docs/source/azure-vm-explore.rst # docs/source/corda-networks-index.rst # docs/source/gcp-vm.rst # docs/source/getting-set-up.rst # docs/source/node-database.rst # finance/src/main/kotlin/net/corda/finance/contracts/asset/cash/selection/CashSelectionSQLServerImpl.kt # finance/src/main/resources/META-INF/services/net.corda.finance.contracts.asset.cash.selection.AbstractCashSelection # node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt # node/src/test/kotlin/net/corda/node/services/config/NodeConfigurationImplTest.kt
This commit is contained in:
@ -12,4 +12,7 @@ Networks
|
||||
corda-testnet-intro
|
||||
azure-template-guide
|
||||
testnet-explorer
|
||||
gcp-vm
|
||||
deploy-locally
|
||||
testnet-explorer-corda
|
||||
cipher-suites
|
||||
|
@ -155,3 +155,10 @@ Run the ``run-corda.sh`` script to start your Corda node.
|
||||
Congratulations! You now have a running Corda node on Testnet.
|
||||
|
||||
.. warning:: It is possible to copy the ``node.zip`` file from your local machine to any other host machine and run the Corda node from there. Do not run multiple copies of the same node (i.e. with the same identity). If a new copy of the node appears on the network then the network map server will interpret this as a change in the address of the node and route traffic to the most recent instance. Any states which are on the old node will no longer be available and undefined behaviour may result. Please provision a new node from the application instead.
|
||||
|
||||
|
||||
Testing your deployment
|
||||
-----------------------
|
||||
|
||||
To test 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.
|
||||
|
||||
|
136
docs/source/gcp-vm.rst
Normal file
136
docs/source/gcp-vm.rst
Normal file
@ -0,0 +1,136 @@
|
||||
Deploying Corda to Corda Testnet from a Google Cloud Platform VM
|
||||
================================================================
|
||||
|
||||
.. contents::
|
||||
|
||||
This document explains how to deploy a Corda node to Google Cloud Platform that can connect directly to the Corda Testnet. A self service download link can be obtained from https://testnet.corda.network. This document will describe how to set up a virtual machine on the Google Cloud Platform (GCP) to deploy your pre-configured Corda node and automatically connnect to Testnet.
|
||||
|
||||
Pre-requisites
|
||||
--------------
|
||||
* Ensure you have a registered Google Cloud Platform account with
|
||||
billing enabled (https://cloud.google.com/billing/docs/how-to/manage-billing-account) which can create virtual machines under your subscription(s) and you are logged on to the GCP console: https://console.cloud.google.com.
|
||||
|
||||
|
||||
Deploy Corda node
|
||||
-----------------
|
||||
|
||||
Browse to https://console.cloud.google.com and log in with your
|
||||
Google credentials.
|
||||
|
||||
**STEP 1: Create a GCP Project**
|
||||
|
||||
In the project drop down click on the plus icon to create a new
|
||||
project to house your Corda resources.
|
||||
|
||||
.. image:: resources/consolegcp.png
|
||||
|
||||
.. image:: resources/console2.png
|
||||
|
||||
.. image:: resources/newprojectgcp.png
|
||||
|
||||
Enter a project name and click Create.
|
||||
|
||||
**STEP 2: Launch the VM**
|
||||
|
||||
In the left hand side nav click on Compute Engine.
|
||||
|
||||
.. image:: resources/gcpcompute.png
|
||||
|
||||
Click on Create Instance.
|
||||
|
||||
.. image:: resources/consolegcpcreatevm.png
|
||||
|
||||
Fill in the form with the desired VM specs:
|
||||
|
||||
Recommended minimum 4vCPU with 15GB memory and 40GB Persistent disk.
|
||||
Ubuntu 16.04 LTS.
|
||||
|
||||
Allow full API access.
|
||||
|
||||
Dont worry about firewall settings as you will configure those later.
|
||||
|
||||
.. image:: resources/gcpconsolevmsettings.png
|
||||
|
||||
Click Create and wait a few sections for your instance to provision
|
||||
and start running.
|
||||
|
||||
**STEP 3: Connect to your VM and set up the environment**
|
||||
|
||||
Once your instance is running click on the SSH button to launch a
|
||||
cloud SSH terminal in a new window.
|
||||
|
||||
.. image:: resources/gcpconsolelaunchssh.png
|
||||
|
||||
.. image:: resources/gcpshell.png
|
||||
|
||||
Run the following to configure the firewall to allow Corda traffic
|
||||
|
||||
.. code:: bash
|
||||
|
||||
gcloud compute firewall-rules create nodetonode --allow tcp:10002
|
||||
gcloud compute firewall-rules create nodetorpc --allow tcp:10003
|
||||
gcloud compute firewall-rules create webserver --allow tcp:8080
|
||||
|
||||
|
||||
Promote the ephemeral IP address associated with this
|
||||
instance to a static IP address.
|
||||
|
||||
First check the region and select the one you are using from the list:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
gcloud compute regions list
|
||||
|
||||
Find your external IP:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
gcloud compute addresses list
|
||||
|
||||
Run this command with the ephemeral IP address as the argument to
|
||||
the --addresses flag and the region:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
gcloud compute addresses create corda-node --addresses 35.204.53.61 --region europe-west4
|
||||
|
||||
**STEP 4: Download and set up your Corda node**
|
||||
|
||||
Now your GCP environment is configured you can switch to the Testnet
|
||||
web application and click on the copy to clipboard button to get a one
|
||||
time installation script.
|
||||
|
||||
.. note:: If you have not already set up your account on Testnet then please visit https://testnet.corda.network and sign up.
|
||||
|
||||
.. image:: resources/testnet-platform.png
|
||||
|
||||
You can generate as many Testnet identites as you like by refreshing
|
||||
this page to generate a new one time link.
|
||||
|
||||
In the terminal of your cloud instance paste the command you just copied to install and run
|
||||
your unique Corda instance:
|
||||
|
||||
.. 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)"
|
||||
|
||||
.. 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.
|
||||
|
||||
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
|
||||
|
||||
Once the node has booted up you can navigate to the external web address of the instance on port 8080. If everything is working you should see the following:
|
||||
|
||||
.. image:: resources/installed-cordapps.png
|
||||
|
||||
|
||||
Testing your deployment
|
||||
-----------------------
|
||||
|
||||
To test 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.
|
||||
|
||||
This will also demonstrate how to install a custom CorDapp.
|
||||
|
@ -47,12 +47,14 @@ The set-up instructions are available for the following platforms:
|
||||
|
||||
* :ref:`mac-label` (or `in video form <https://vimeo.com/217462230>`__)
|
||||
|
||||
* :ref:`deb-ubuntu-label`
|
||||
|
||||
.. _windows-label:
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
.. warning:: If you are using a Mac machine, please follow the :ref:`mac-label` instructions instead.
|
||||
.. warning:: If you are using a Mac or a Debian/Ubuntu machine, please follow the :ref:`mac-label` or :ref:`deb-ubuntu-label` instructions instead.
|
||||
|
||||
Java
|
||||
^^^^
|
||||
@ -140,7 +142,7 @@ Run from IntelliJ
|
||||
Mac
|
||||
---
|
||||
|
||||
.. warning:: If you are using a Windows machine, please follow the :ref:`windows-label` instructions instead.
|
||||
.. warning:: If you are using a Windows or a Debian/Ubuntu machine, please follow the :ref:`windows-label` or :ref:`deb-ubuntu-label` instructions instead.
|
||||
|
||||
Java
|
||||
^^^^
|
||||
@ -242,6 +244,35 @@ And a list of simple sample CorDapps for you to explore basic concepts is availa
|
||||
|
||||
You can clone these repos to your local machine by running the command ``git clone [repo URL]``.
|
||||
|
||||
.. _deb-ubuntu-label:
|
||||
|
||||
Debian/Ubuntu
|
||||
------
|
||||
|
||||
.. warning:: If you are using a Mac or a Windows machine, please follow the :ref:`mac-label` or :ref:`windows-label` instructions instead.
|
||||
|
||||
These instructions were tested on Ubuntu Desktop 18.04 LTS.
|
||||
|
||||
Java
|
||||
^^^^
|
||||
1. Open a new terminal and add the Oracle PPA to your repositories by typing ``sudo add-apt-repository ppa:webupd8team/java``. Press ENTER when prompted.
|
||||
2. Update your packages list with the command ``sudo apt update``
|
||||
3. Install the Oracle JDK 8 by typing ``sudo apt install oracle-java8-installer``. Press Y when prompted and agree to the licence terms.
|
||||
4. Verify that the JDK was installed correctly by running ``java -version``
|
||||
|
||||
Git
|
||||
^^^^
|
||||
1. From the terminal, Git can be installed using apt with the command ``sudo apt install git``
|
||||
2. Verify that git was installed correctly by typing ``git --version``
|
||||
|
||||
IntelliJ
|
||||
^^^^^^^^
|
||||
Jetbrains offers a pre-built snap package that allows for easy, one-step installation of IntelliJ onto Ubuntu.
|
||||
|
||||
1. To download the snap, navigate to https://snapcraft.io/intellij-idea-community
|
||||
2. Click ``Install``, then ``View in Desktop Store``. Choose ``Ubuntu Software`` in the Launch Application window.
|
||||
3. Ensure the Kotlin plugin in Intellij is updated to version |kotlin_version|
|
||||
|
||||
Next steps
|
||||
----------
|
||||
The best way to check that everything is working fine is by taking a deeper look at the
|
||||
|
@ -382,4 +382,4 @@ To add support for another database to a Corda node, the following JAR files mus
|
||||
|
||||
All additional JAR files need to be copy into ``./drivers`` subdirectory of the node.
|
||||
|
||||
.. note:: This is a general guideline. In some cases, it might not be feasible to add support for your desired database without recompiling the Corda source code.
|
||||
.. note:: This is a general guideline. In some cases, it might not be feasible to add support for your desired database without recompiling the Corda source code.
|
BIN
docs/source/resources/installed-cordapps.png
Normal file
BIN
docs/source/resources/installed-cordapps.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
127
docs/source/testnet-explorer-corda.rst
Normal file
127
docs/source/testnet-explorer-corda.rst
Normal file
@ -0,0 +1,127 @@
|
||||
Using the Node Explorer to test a Corda node on Corda Testnet
|
||||
=============================================================
|
||||
|
||||
This document will explain how to test the installation of a Corda node on Testnet.
|
||||
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
This guide assumes you have deployed a Corda node to the Corda Testnet.
|
||||
|
||||
.. note::
|
||||
|
||||
If you need to set up a node on Testnet first please follow the instructions: :doc:`corda-testnet-intro`.
|
||||
|
||||
|
||||
Get the testing tools
|
||||
---------------------
|
||||
|
||||
To run the tests and make sure your node is connecting correctly to the network you will need to download and install a
|
||||
couple of resources.
|
||||
|
||||
1. Log into your Cloud VM via SSH.
|
||||
|
||||
|
||||
2. Stop the Corda node(s) running on your cloud instance.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
ps aux | grep corda.jar | awk '{ print $2 }' | xargs sudo kill
|
||||
|
||||
|
||||
3. Download the finance CorDapp
|
||||
|
||||
In the terminal on your cloud instance run:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
wget https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases/net/corda/corda-finance/<VERSION>-corda/corda-finance-<VERSION>-corda.jar
|
||||
|
||||
This is required to run some flows to check your connections, and to issue/transfer cash to counterparties. Copy it to the Corda installation location:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
sudo cp /home/<USER>/corda-finance-<VERSION>-corda.jar /opt/corda/cordapps/
|
||||
|
||||
4. Add the following line to the bottom of your ``node.conf``:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
issuableCurrencies : [ USD ]
|
||||
|
||||
.. note:: Make sure that the config file is in the correct format, e.g., by ensuring that there's a comma at the end of the line prior to the added config.
|
||||
|
||||
4. Restart the Corda node:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
cd /opt/corda
|
||||
sudo ./run-corda.sh
|
||||
|
||||
Your node is now running the Finance Cordapp.
|
||||
|
||||
.. note:: You can double-check that the CorDapp is loaded in the log file ``/opt/corda/logs/node-<VM-NAME>.log``. This file will list installed apps at startup. Search for ``Loaded CorDapps`` in the logs.
|
||||
|
||||
6. Now download the Node Explorer to your **LOCAL** machine:
|
||||
|
||||
.. note:: Node Explorer is a JavaFX GUI which connects to the node over the RPC interface and allows you to send transactions.
|
||||
|
||||
Download the Node Explorer from here:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
http://ci-artifactory.corda.r3cev.com/artifactory/corda-releases/net/corda/corda-tools-explorer/<VERSION>-corda/corda-tools-explorer-<VERSION>-corda.jar
|
||||
|
||||
.. warning:: This Node Explorer is incompatible with the Corda Enterprise distribution and vice versa as they currently use different serialisation schemes (Kryo vs AMQP).
|
||||
|
||||
7. Run the Node Explorer tool on your **LOCAL** machine.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
java -jar corda-tools-explorer-<VERSION>-corda.jar
|
||||
|
||||
.. image:: resources/explorer-login.png
|
||||
|
||||
|
||||
Connect to the node
|
||||
-------------------
|
||||
|
||||
To connect to the node you will need:
|
||||
|
||||
* The IP address of your node (the public IP of your cloud instance). You can find this in the instance page of your cloud console.
|
||||
* The port number of the RPC interface to the node, specified in ``/opt/corda/node.conf`` in the ``rpcSettings`` section, (by default this is 10003 on Testnet).
|
||||
* The username and password of the RPC interface of the node, also in the ``node.conf`` in the ``rpcUsers`` section, (by default the username is ``cordazoneservice`` on Testnet).
|
||||
|
||||
Click on ``Connect`` to log into the node.
|
||||
|
||||
Check your network identity and counterparties
|
||||
----------------------------------------------
|
||||
|
||||
Once Explorer has logged in to your node over RPC click on the ``Network`` tab in the side navigation of the Explorer UI:
|
||||
|
||||
.. image:: resources/explorer-network.png
|
||||
|
||||
If your Corda node is correctly configured and connected to the Testnet then you should be able to see the identities of your node, the Testnet notary and the network map listing all the counterparties currently on the network.
|
||||
|
||||
|
||||
Test issuance transaction
|
||||
-------------------------
|
||||
|
||||
Now we are going to try and issue some cash to a 'bank'. Click on the ``Cash`` tab.
|
||||
|
||||
.. image:: resources/explorer-cash-issue1.png
|
||||
|
||||
Now click on ``New Transaction`` and create an issuance to a known counterparty on the network by filling in the form:
|
||||
|
||||
.. image:: resources/explorer-cash-issue2.png
|
||||
|
||||
Click ``Execute`` and the transaction will start.
|
||||
|
||||
.. image:: resources/explorer-cash-issue3.png
|
||||
|
||||
Click on the red X to close the notification window and click on ``Transactions`` tab to see the transaction in progress, or wait for a success message to be displayed:
|
||||
|
||||
.. image:: resources/explorer-transactions.png
|
||||
|
||||
Congratulations! You have now successfully installed a CorDapp and executed a transaction on the Corda Testnet.
|
Reference in New Issue
Block a user