<h1>Working with the Corda Demo on Azure Marketplace<aclass="headerlink"href="#working-with-the-corda-demo-on-azure-marketplace"title="Permalink to this headline">¶</a></h1>
<p>Corda ships with a VM image which can be used to deploy a pre-configured virtual machine on the <aclass="reference external"href="https://azure.microsoft.com/en-gb/overview/what-is-azure">Microsoft Azure Marketplace</a></p>
<p>This Corda Demo VM is an easy option for running the demos; it is <em>NOT</em> a development environment. When you are ready to get developing on Corda and start making contributions to the project please clone the <aclass="reference external"href="https://github.com/corda/">GitHub Repos</a> instead.</p>
<divclass="section"id="pre-requisites">
<h2>Pre-requisites<aclass="headerlink"href="#pre-requisites"title="Permalink to this headline">¶</a></h2>
<ulclass="simple">
<li>Ensure you have a registered Microsoft Azure account and are logged on to the Azure portal.</li>
<li>It is recommended you generate a private-public SSH key pair (see <aclass="reference external"href="https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2/">here</a>)</li>
</ul>
</div>
<divclass="section"id="deploying-the-vm">
<h2>Deploying the VM<aclass="headerlink"href="#deploying-the-vm"title="Permalink to this headline">¶</a></h2>
<p>Search the Azure Marketplace for Corda.
Click the ‘Create’ button.</p>
<p>STEP 1: Basics</p>
<ulclass="simple">
<li><strong>Name</strong>: Choose an appropriate descriptive name for the VM</li>
<li><strong>VM Disk Type</strong>: Select ‘SSD’</li>
<li><strong>Username</strong>: Your preferred user name for the administrator account when accessing via SSH</li>
<li><strong>Authentication type</strong>: Select ‘SSH public key’, then paste the contents of your SSH public key file (see pre-requisites, above) into the box below. Alternatively select ‘Password’ to use a password of your choice to administer the VM</li>
<li><strong>Subscription</strong>: Select your subscription name</li>
<li><strong>Resource group</strong>: Select ‘Use existing’. From the drop-down menu, select your account group</li>
<li><strong>Location</strong>: Select the geographical location physically closest to you</li>
<p>A range of available hardware configurations will be presented, along with estimated costs. For the purposes of running the demos, a configuration of 2 cores and at least 14GB is recommended</p>
<p>Click ‘Purchase’ to complete the configuration and start the VM deployment.</p>
<p>The VM will begin the deployment process, which typically takes 4-5 minutes to complete. To see progress, click on the “Deploying” icon displayed.</p>
<p>Once deployed, click ‘Overview’ to see the virtual machine details. Note down the <strong>Public IP address</strong>. You will need this to connect to the demo screens via your web browser:</p>
<h2>Viewing the SIMM Valuation demo<aclass="headerlink"href="#viewing-the-simm-valuation-demo"title="Permalink to this headline">¶</a></h2>
<p>The SIMM Valuation demo creates three nodes, representing three parties in the example workflow (Bank A, Bank B, Bank C). Each node listens on a different port - those used by the demo are:</p>
<p><strong>SIMM Valuation Demo ports:</strong><strong>12005 (node A for Bank A)</strong>, <strong>12007 (node B for Bank B)</strong>, <strong>12009 (node C for Bank C)</strong></p>
<p>Open three browser tabs and direct each one to</p>
<divclass="highlight-shell"><divclass="highlight"><pre><span></span>http://<spanclass="o">(</span>public IP address<spanclass="o">)</span>:<spanclass="o">(</span>port<spanclass="o">)</span>/web/simmvaluationdemo
</pre></div>
</div>
<p>specifying each of the three ports above in different windows, e.g.</p>
<p>Now let’s take a look at a transaction between Bank A and B which is not visible to Bank C. This illustrates the restricted data sharing feature of Corda, i.e. data is shared on a need-to-know basis. Nodes provide the dependency graph of a transaction they are sending to another node on demand, but there is no global broadcast of all transactions.</p>
<li>In the browser tab for Bank A (the top right hand corner shows which bank you are administering) click ‘Create New Trade’ from the top navigation bar</li>
<li>Select to trade with Bank B</li>
<li>Select ‘EUR Fixed 1y EURIBOR 3m’ from the drop down</li>
<li>Click ‘Submit’ to create the trade</li>
<li>In the browser tab for Bank B click ‘View Portfolio’ from the top navigation bar to see this new trade</li>
<li>In the browser tab for Bank C click ‘View Portfolio’ from the top navigation bar and you will not be able to see the trade, as expected</li>
<pclass="last">There is a known issue whereby some users may see a 400 error when navigating the SIMM Valuation demo. If you encounter this error, simply navigate back to the root page (<aclass="reference external"href="http://">http://</a><em>(public IP address)</em>:<em>(port)</em>/<em>web</em>/<em>simmvaluationdemo</em>) in the browser before continuing.</p>
</div>
</div>
<divclass="section"id="viewing-the-irs-demo">
<h2>Viewing the IRS demo<aclass="headerlink"href="#viewing-the-irs-demo"title="Permalink to this headline">¶</a></h2>
<p>The IRS demo creates three nodes: Bank A, Bank B and a node that runs a notary, a network map and an interest rates oracle together. The two banks agree on an interest rate swap, and then do regular fixings of the deal as the time on a simulated clock passes. Each bank node listens on a different port - those used by the demo are:</p>
<p><strong>IRS demo ports:</strong><strong>11005 (node A for Bank A)</strong>, <strong>11007 (node B for Bank B)</strong></p>
<p>Open two browser tabs and direct one to each of the following:</p>
<p>Now let’s take a look at how the interest rates oracle provides interest rates for a deal with a semi-annual payment frequency, and how the two counterparties to the trade see the same deal information on their own nodes, i.e. you see what I see.</p>
<li>In the browser tab for Bank A click ‘Create Deal’ from the top navigation bar</li>
<li>Modify the terms of the IRS deal, or leave as default</li>
<li>Click ‘Submit’ to create the deal</li>
<li>In the browser tab for Bank A click ‘Recent Deals’ from the top navigation bar to view the deal</li>
<li>In the browser tab for Bank B click ‘Recent Deals’ from the top navigation bar to view the deal. Compare the economic details to those shown in the Bank A tab</li>
There are separate sub-directories for each of the three nodes (<em>nodea</em>, <em>nodeb</em>, <em>nodec</em>), each containing a <em>/logs</em> sub-directory.</p>
<p>The name of the log file will follow the name given to the service it reflects, e.g. <em>node-clint-vm-test.log</em>.</p>
<h2>Next Steps<aclass="headerlink"href="#next-steps"title="Permalink to this headline">¶</a></h2>
<p>Now you have taken a look at two Corda demos do go and visit the <aclass="reference external"href="https://www.corda.net">dedicated Corda website</a></p>
<p>Or to get straight into the Corda open source codebase, head over to the <aclass="reference external"href="https://www.github.com/corda">Github Corda repo</a></p>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.