From 5f43445a0e9f25a37ff44cb2c82998ee944f3d0b Mon Sep 17 00:00:00 2001 From: Ed Prosser Date: Tue, 2 Jul 2019 12:11:36 +0100 Subject: [PATCH] revision of deploy Signed-off-by: Ed Prosser --- docs/source/conf.py | 8 +++++-- docs/source/index.rst | 11 ++++++++- docs/source/quickstart-build.rst | 19 ++++++++-------- docs/source/quickstart-deploy.rst | 38 +++++++++++++++++++------------ docs/source/quickstart-index.rst | 13 +++++------ 5 files changed, 55 insertions(+), 34 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 1360bd3a09..e6ca7e33f2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -146,8 +146,13 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -# html_theme_options = {} +html_theme_options = { + 'includehidden':True, + 'collapse_navigation':False, + 'sticky_navigation':True, + 'titles_only':True +} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] @@ -285,4 +290,3 @@ latex_elements = { 'extraclassoptions' : 'openany', } - diff --git a/docs/source/index.rst b/docs/source/index.rst index aa0e02dac8..260bee533b 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -30,6 +30,8 @@ We look forward to seeing what you can do with Corda! .. toctree:: :maxdepth: 1 + :hidden: + :titlesonly: release-notes app-upgrade-notes @@ -40,6 +42,8 @@ We look forward to seeing what you can do with Corda! .. toctree:: :caption: Development :maxdepth: 1 + :hidden: + :titlesonly: quickstart-index.rst key-concepts.rst @@ -55,6 +59,8 @@ We look forward to seeing what you can do with Corda! .. toctree:: :caption: Operations :maxdepth: 2 + :hidden: + :titlesonly: corda-nodes-index.rst corda-networks-index.rst @@ -70,6 +76,8 @@ We look forward to seeing what you can do with Corda! :caption: Corda Network :maxdepth: 2 :if_tag: htmlmode + :hidden: + :titlesonly: corda-network/index.md corda-network/UAT.md @@ -87,9 +95,10 @@ We look forward to seeing what you can do with Corda! :caption: Participate :maxdepth: 2 :if_tag: htmlmode + :hidden: + :titlesonly: contributing-index.rst deterministic-modules.rst design/design-docs-index.rst changelog - diff --git a/docs/source/quickstart-build.rst b/docs/source/quickstart-build.rst index 6520d093dd..53efa0e215 100644 --- a/docs/source/quickstart-build.rst +++ b/docs/source/quickstart-build.rst @@ -256,6 +256,7 @@ Step Four: Creating a flow } } + **So far you've...** **Next you must...** @@ -278,17 +279,17 @@ Step Four: Creating a flow .. sourcecode:: kotlin - @Suspendable - override fun call(): SignedTransaction { - val signedTransactionFlow = object : SignTransactionFlow(counterpartySession) { - override fun checkTransaction(stx: SignedTransaction) = requireThat { - val output = stx.tx.outputs.single().data - "The output must be a CarState" using (output is CarState) + @Suspendable + override fun call(): SignedTransaction { + val signedTransactionFlow = object : SignTransactionFlow(counterpartySession) { + override fun checkTransaction(stx: SignedTransaction) = requireThat { + val output = stx.tx.outputs.single().data + "The output must be a CarState" using (output is CarState) + } } + val txWeJustSignedId = subFlow(signedTransactionFlow) + return subFlow(ReceiveFinalityFlow(counterpartySession, txWeJustSignedId.id)) } - val txWeJustSignedId = subFlow(signedTransactionFlow) - return subFlow(ReceiveFinalityFlow(counterpartySession, txWeJustSignedId.id)) - } 22. The completed ``CarFlow.kt`` should look like this: diff --git a/docs/source/quickstart-deploy.rst b/docs/source/quickstart-deploy.rst index 40b6247719..8fd8f569b3 100644 --- a/docs/source/quickstart-deploy.rst +++ b/docs/source/quickstart-deploy.rst @@ -1,33 +1,41 @@ -Deploying an example CorDapp -============================ +Running the example CorDapp +=========================== -At this point we've set up the development environment, and have a sample CorDapp in an IntelliJ project. In this section, we'll deploy an instance of this CorDapp running on local nodes, including one notary, and two nodes, each representing one party in a transaction. +At this point we've set up the development environment, and have an example CorDapp in an IntelliJ project. In this section, the CorDapp will be deployed to locally running Corda nodes. -Steps ------ +The local Corda network includes one notary, and three nodes, each representing parties in the network. A Corda node is an individual instance of Corda representing one party in a network. For more information on nodes, see the `node documentation <./key-concepts-node.html>`_. -Before continuing, ensure that you have +Before continuing, ensure that you've `set up your development environment <./quickstart-index.html>`_. +Step One: Deploy the CorDapp locally +------------------------------------ -1. Navigate to the root directory of the sample CorDapp. +The first step is to deploy the CorDapp to nodes running locally. -2. Deploy the CorDapp by running the following command: ``./gradlew deployNodes``. +1. Navigate to the root directory of the example CorDapp. + +2. Deploy the CorDapp by running the following command: ``./gradlew deployNodes`` 3. To best understand the deployment process, there are several perspectives it is helpful to see. Run the following command: ``build/nodes/runnodes`` - This command opens three terminal windows: the notary, and a node each for PartyA and PartyB. A notary is a validation service that prevents double-spending and + This command opens four terminal windows: the notary, and a node each for PartyA, PartyB, and PartyC. A notary is a validation service that prevents double-spending, enforces timestamping, and may also validate transactions. For more information on notaries, see the `notary documentation <./key-concepts-notaries.html>`_. -4. Click the second terminal window to see the perspective of PartyA. +4. Go through the tabs to see the perspectives of other network members. -5. After the PartyA node has been successfully deployed, flows can be executed from the perspective of PartyA. To execute the **AWBDJAKLJWLDNLAWND** flow, run the following command: ``flow start target: `` +Step Two: Run a CorDapp transaction +----------------------------------- - A flow is the mechanism by which a transaction takes place using Corda. Flows are written as part of the CorDapp, and define the mechanisms by which parties transact. +1. Open the terminal window for PartyA. From this window, any flows executed will be from the perspective of PartyA. -6. To check whether PartyB has received the transaction, open the terminal window showing PartyB's perspective, and run the following command: ``run vaultQuery contractStateType:net.corda.`` +2. To execute the ``ExampleFlow.kt`` flow, run the following command: ``flow start ExampleFlow iouValue: 1, otherParty: PartyB`` - This command displays all of the STUFF states in the node's vault. States are immutable objects that represent shared facts between the parties. States serve as the inputs and outputs of transactions. + A flow is the mechanism by which a transaction takes place using Corda. This flow creates an instance of the IOU state, which requires an ``iouValue`` property. Flows are contained in CorDapps, and define the mechanisms by which parties transact. For more information on flows, see the `flow documentation `_. + +3. To check whether PartyB has received the transaction, open the terminal window showing PartyB's perspective, and run the following command: ``run vaultQuery contractStateType:net.corda.example.IOUState`` + + This command displays all of the IOU states in the node's vault. States are immutable objects that represent shared facts between the parties. States serve as the inputs and outputs of transactions. Next steps ---------- -After deploying the sample CorDapp, a useful next step is to look into the contents of a CorDapp in more detail, to better understand the concepts of flow, state, transactions, and contracts, before writing your own CorDapp. +After deploying the example CorDapp, the next step is to start writing a CorDapp containing your own contract, states, and flows. diff --git a/docs/source/quickstart-index.rst b/docs/source/quickstart-index.rst index 5612613225..5df1ef5326 100644 --- a/docs/source/quickstart-index.rst +++ b/docs/source/quickstart-index.rst @@ -11,10 +11,9 @@ Getting started developing CorDapps Getting started with Corda will walk you through the process of setting up a development environment, deploying an example CorDapp, and building your own CorDapp based on the example. -1. Setting up a development environment -2. Deploying an example CorDapp -3. Understanding CorDapp contents -4. Building your own CorDapp +1. `Setting up a development environment`_ +2. `Deploying an example CorDapp <./quickstart-deploy.html>`_ +3. `Building your own CorDapp <./quickstart-build.html>`_ The getting started experience is designed to be lightweight and get to code as quickly as possible, for more detail, see the following documentation: @@ -46,9 +45,9 @@ Step One: Downloading a sample project ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. Open a command prompt or terminal. -2. Clone the CorDapp example repo by running ``git clone https://github.com/corda/cordapp-example`` -3. Move into the ``cordapp-example`` folder by running ``cd cordapp-example`` -4. Checkout the corresponding branch for Corda Enterprise by running ``git checkout release-enterprise-V3`` in the current directory. +2. Clone the CorDapp example repo by running: ``git clone https://github.com/corda/cordapp-example`` +3. Move into the ``cordapp-example`` folder by running: ``cd cordapp-example`` +4. Checkout the corresponding branch by running: ``git checkout release-V4`` in the current directory. Step Two: Creating an IntelliJ project