Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add corda to CI #84

Merged
merged 3 commits into from
Jan 6, 2020

Conversation

denis-yu-glotov
Copy link
Contributor

@denis-yu-glotov denis-yu-glotov commented Dec 11, 2019

This resolves #34.

@denis-yu-glotov
Copy link
Contributor Author

To run Corda, we need to install Oracle JDK 8: https://docs.corda.net/releases/release-V4.1/quickstart-index.html#prerequisites. OpenJDKs does not work, unfortunately. I didn't find a way to istall Oracle JDK other then downloading tar form https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and un-taring it. I tried various ppt repositories, but they didn't have 8. Additionally, it is not possible to download the tar (jdk-8u231-linux-x64.tar.gz, 185Mb) archive without logging in to Oracle website. So we need to store it somewhere. I think to use Github pages to store the tar and upload it from there.

@petermetz
Copy link
Member

To run Corda, we need to install Oracle JDK 8: https://docs.corda.net/releases/release-V4.1/quickstart-index.html#prerequisites. OpenJDKs does not work, unfortunately. I didn't find a way to istall Oracle JDK other then downloading tar form https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and un-taring it. I tried various ppt repositories, but they didn't have 8. Additionally, it is not possible to download the tar (jdk-8u231-linux-x64.tar.gz, 185Mb) archive without logging in to Oracle website. So we need to store it somewhere. I think to use Github pages to store the tar and upload it from there.

I got it working to a point (e.g. it was running), and I was using OpenJDK IIRC. On the link you posted: where do they say that it has to be Oracle JDK, I couldn't find it.
Oracle JDK may not be an option at all due to licensing changes (which is why it got removed from the package managers)
How does it break with OpenJDK exactly on your side?
Their main documentation says it's supported (could be outdated, I'm just double checking) https://docs.corda.net/getting-set-up.html

I tested it on my dev VM which has OpenJDK 8:

$ java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~18.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
$ npm run corda:build

> @hyperledger-labs/blockchain-integration-framework.examples.simple-asset-transfer@0.1.0 corda:build **PATH_REDACTED***blockchain/blockchain-integration-framework/packages/core/examples/simple-asset-transfer
> cd corda && ./gradlew build deployNodes deployWeb deployScripts && cd ../

Starting a Gradle Daemon (subsequent builds will be faster)

> Task :workflows:test
Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details
> Task :contracts:compileKotlin UP-TO-DATE
> Task :contracts:compileJava NO-SOURCE
> Task :contracts:processResources NO-SOURCE
> Task :contracts:classes UP-TO-DATE
> Task :contracts:configureCordappFatJar
> Task :contracts:inspectClassesForKotlinIC UP-TO-DATE
> Task :contracts:jar UP-TO-DATE
> Task :workflows:compileKotlin UP-TO-DATE
> Task :workflows:compileJava NO-SOURCE
> Task :workflows:processResources UP-TO-DATE
> Task :workflows:classes UP-TO-DATE
> Task :workflows:configureCordappFatJar
> Task :workflows:inspectClassesForKotlinIC UP-TO-DATE
> Task :workflows:jar UP-TO-DATE

BUILD SUCCESSFUL in 13s
9 actionable tasks: 2 executed, 7 up-to-date

> Task :deployNodes
Running Cordform task
Deleting **PATH_REDACTED***blockchain/blockchain-integration-framework/packages/core/examples/simple-asset-transfer/corda/build/nodes
Bootstrapping local test network in **PATH_REDACTED***blockchain/blockchain-integration-framework/packages/core/examples/simple-asset-transfer/corda/build/nodes
Generating node directory for PartyC
Generating node directory for PartyB
Generating node directory for PartyA
Generating node directory for PartyD
Generating node directory for Notary
Waiting for all nodes to generate their node-info files...
Distributing all node-info files to all nodes
Loading existing network parameters... none found
Gathering notary identities
Generating contract implementations whitelist
New NetworkParameters {
      minimumPlatformVersion=4
      notaries=[NotaryInfo(identity=O=Notary, L=London, C=GB, validating=false)]
      maxMessageSize=10485760
      maxTransactionSize=524288000
      whitelistedContractImplementations {
        
      }
      eventHorizon=PT720H
      packageOwnership {
        
      }
      modifiedTime=2019-12-12T18:19:42.495Z
      epoch=1
  }
Bootstrapping complete!

BUILD SUCCESSFUL in 3m 15s
28 actionable tasks: 28 executed
$ npm run corda

> @hyperledger-labs/blockchain-integration-framework.examples.simple-asset-transfer@0.1.0 corda ***PATH_REDACTED***/blockchain/blockchain-integration-framework/packages/core/examples/simple-asset-transfer
> cd corda/build/scripts && ./start_corda_components.sh ../../logs && cd ../../../

Directory ../../logs exists, overriding it
Starting Corda nodes... done
Starting Web Spring Boot components... done

@denis-yu-glotov
Copy link
Contributor Author

@petermetz
Copy link
Member

This is how it fails with openJDK: https://travis-ci.org/denis-yu-glotov/blockchain-integration-framework/builds/624192472#L1564...

Not sure if this will fix it completely, but it's definitely a typo that has to be fixed for it to work:
You are installing the JRE (just the runtime) not the JDK (development kit): https://github.com/denis-yu-glotov/blockchain-integration-framework/blob/c90634636a77720369f1ade467ebd6f7c3884fe2/.travis.yml#L23

@hyperledger hyperledger deleted a comment Dec 23, 2019
@hyperledger hyperledger deleted a comment Dec 23, 2019
@hyperledger hyperledger deleted a comment Dec 23, 2019
@hyperledger hyperledger deleted a comment Dec 23, 2019
@hyperledger hyperledger deleted a comment Dec 23, 2019
@hyperledger hyperledger deleted a comment Dec 23, 2019
@hyperledger hyperledger deleted a comment Dec 23, 2019
@denis-yu-glotov
Copy link
Contributor Author

As we discussed with @jonathan-m-hamilton, here I provide a ci.sh script that runs all 3 existing blockchains and all 6 scenarios between them. But travis runs only Fabric and Quorum (CI_NO_CORDA). If in future, we manage to have large executor on Circle-CI (premium tier), than it will be able to run all 3 blockchans and all 6 scenarios.

Signed-off-by: Denis Glotov <denis.glotov@accenture.com>
@denis-yu-glotov
Copy link
Contributor Author

I squashed all my commits to make commitlint bot happy. This PR is ready for review and merge. Circle-CI is failing because we don't have premium plan activated yet (still discussing on rocket chat about this possibility).

…rces and

crashes if more processes comes in.
`resource_class: large` would probably help so revert this patch when we have
it available.

Signed-off-by: Denis Glotov <denis.glotov@accenture.com>
Signed-off-by: Denis Glotov <denis.glotov@accenture.com>
@denis-yu-glotov
Copy link
Contributor Author

I disabled Fabric deploy and scenarios for Circle CI because it crashes Corda (out of memory in JVM). If we once have stronger VM as executor (resource_class: large) the patch that commented it, could be reverted.

@denis-yu-glotov
Copy link
Contributor Author

Waiting to be reviewed...

Copy link
Member

@petermetz petermetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@petermetz petermetz merged commit bd796d6 into hyperledger:master Jan 6, 2020
blefevre pushed a commit to blefevre/blockchain-integration-framework that referenced this pull request Feb 4, 2020
* feature: add all scenarios to ci.sh, but travis runs only subset of them

Signed-off-by: Denis Glotov <denis.glotov@accenture.com>

* fix: disable circle-ci Fabric deploy because Corda fills vm all resources and

crashes if more processes comes in.
`resource_class: large` would probably help so revert this patch when we have
it available.

Signed-off-by: Denis Glotov <denis.glotov@accenture.com>

* feature: add circle-ci badge to readme

Signed-off-by: Denis Glotov <denis.glotov@accenture.com>
ryjones pushed a commit that referenced this pull request Feb 1, 2023
Adding support for Corda-Network2 data transfer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Scenarios to Travis CI
2 participants