From ff624529adb719aecea0a6a6885dac518581425e Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Sat, 29 Feb 2020 23:17:55 -0500 Subject: [PATCH 1/2] Update to Besu 1.4 --- besu-appsody-stacks/java-besu-gradle/image/Dockerfile-stack | 2 +- .../java-besu-gradle/templates/hello/README.md | 2 +- .../java-besu-gradle/templates/hello/build.gradle | 2 +- besu-appsody-stacks/java-besu-maven/image/Dockerfile-stack | 2 +- besu-appsody-stacks/java-besu-maven/templates/hello/README.md | 2 +- besu-appsody-stacks/java-besu-maven/templates/hello/pom.xml | 3 +-- besu-appsody-stacks/java-besu-plugins/image/Dockerfile-stack | 4 ++-- .../java-besu-plugins/templates/demo/build.gradle | 4 ++-- besu-maven-archetype/README.md | 2 +- .../src/main/resources/archetype-resources/pom.xml | 3 +-- 10 files changed, 12 insertions(+), 14 deletions(-) diff --git a/besu-appsody-stacks/java-besu-gradle/image/Dockerfile-stack b/besu-appsody-stacks/java-besu-gradle/image/Dockerfile-stack index 66c69ea..dbd3de6 100644 --- a/besu-appsody-stacks/java-besu-gradle/image/Dockerfile-stack +++ b/besu-appsody-stacks/java-besu-gradle/image/Dockerfile-stack @@ -23,7 +23,7 @@ ENV APPSODY_WATCH_DIR=/project/user-app ENV APPSODY_WATCH_IGNORE_DIR=/project/user-app/target ENV APPSODY_WATCH_REGEX="^.*(.sol|.java)$" -ENV APPSODY_INSTALL="touch logfile.log ; /project/user-app/gradlew --gradle-user-home=/gradle --console=plain build installBesu && echo 'Starting Hyperledger Besu...' && build/besu-1.3.8/bin/besu --config-file=config.toml 2>&1 | tee logfile.log & tail -f -n0 logfile.log | grep -q 'Ethereum main loop is up'" +ENV APPSODY_INSTALL="touch logfile.log ; /project/user-app/gradlew --gradle-user-home=/gradle --console=plain build installBesu && echo 'Starting Hyperledger Besu...' && build/besu-1.4.0/bin/besu --config-file=config.toml 2>&1 | tee logfile.log & tail -f -n0 logfile.log | grep -q 'Ethereum main loop is up'" ENV APPSODY_RUN="/project/user-app/gradlew --gradle-user-home=/gradle --console=plain run" ENV APPSODY_RUN_ON_CHANGE= diff --git a/besu-appsody-stacks/java-besu-gradle/templates/hello/README.md b/besu-appsody-stacks/java-besu-gradle/templates/hello/README.md index d67618b..7d3db46 100644 --- a/besu-appsody-stacks/java-besu-gradle/templates/hello/README.md +++ b/besu-appsody-stacks/java-besu-gradle/templates/hello/README.md @@ -6,7 +6,7 @@ `gradle clean build installBesu` 2. Start Hyperledger Besu: -`build/besu-1.3.8/bin/besu --config-file=config.toml` +`build/besu-1.4.0/bin/besu --config-file=config.toml` 3. Wait until you see `Ethereum main loop is up` diff --git a/besu-appsody-stacks/java-besu-gradle/templates/hello/build.gradle b/besu-appsody-stacks/java-besu-gradle/templates/hello/build.gradle index ff0ca55..d665462 100644 --- a/besu-appsody-stacks/java-besu-gradle/templates/hello/build.gradle +++ b/besu-appsody-stacks/java-besu-gradle/templates/hello/build.gradle @@ -42,7 +42,7 @@ application { } task installBesu(type: Copy) { - def dependency = project.dependencies.create('hyperledger-org:besu-repo:besu-1.3.8@zip') + def dependency = project.dependencies.create('hyperledger-org:besu-repo:besu-1.4.0@zip') def config = project.configurations.detachedConfiguration(dependency) File resolvedFile; diff --git a/besu-appsody-stacks/java-besu-maven/image/Dockerfile-stack b/besu-appsody-stacks/java-besu-maven/image/Dockerfile-stack index 9f42690..d15497b 100644 --- a/besu-appsody-stacks/java-besu-maven/image/Dockerfile-stack +++ b/besu-appsody-stacks/java-besu-maven/image/Dockerfile-stack @@ -23,7 +23,7 @@ ENV APPSODY_WATCH_DIR=/project/user-app ENV APPSODY_WATCH_IGNORE_DIR=/project/user-app/target ENV APPSODY_WATCH_REGEX="^.*(.sol|.java)$" -ENV APPSODY_INSTALL="touch logfile.log ; mvn -B -Dmaven.repo.local=/mvn/repository install -DskipTests && echo 'Starting Hyperledger Besu...' && target/besu-1.3.8/bin/besu --config-file=config.toml 2>&1 | tee logfile.log & tail -f -n0 logfile.log | grep -q 'Ethereum main loop is up'" +ENV APPSODY_INSTALL="touch logfile.log ; mvn -B -Dmaven.repo.local=/mvn/repository install -DskipTests && echo 'Starting Hyperledger Besu...' && target/besu-1.4.0/bin/besu --config-file=config.toml 2>&1 | tee logfile.log & tail -f -n0 logfile.log | grep -q 'Ethereum main loop is up'" ENV APPSODY_RUN="mvn -B -Dmaven.repo.local=/mvn/repository exec:java -Dexec.mainClass='com.sample.App'" ENV APPSODY_RUN_ON_CHANGE= diff --git a/besu-appsody-stacks/java-besu-maven/templates/hello/README.md b/besu-appsody-stacks/java-besu-maven/templates/hello/README.md index b5be436..3f9b771 100644 --- a/besu-appsody-stacks/java-besu-maven/templates/hello/README.md +++ b/besu-appsody-stacks/java-besu-maven/templates/hello/README.md @@ -6,7 +6,7 @@ `mvn clean install` 2. Start Hyperledger Besu: -`target/besu-1.3.8/bin/besu --config-file=config.toml` +`target/besu-1.4.0/bin/besu --config-file=config.toml` 3. Wait until you see `Ethereum main loop is up` diff --git a/besu-appsody-stacks/java-besu-maven/templates/hello/pom.xml b/besu-appsody-stacks/java-besu-maven/templates/hello/pom.xml index d9f4de8..fbaf1bb 100644 --- a/besu-appsody-stacks/java-besu-maven/templates/hello/pom.xml +++ b/besu-appsody-stacks/java-besu-maven/templates/hello/pom.xml @@ -75,9 +75,8 @@ wget - https://bintray.com/api/ui/download/hyperledger-org/besu-repo/besu-1.3.8.zip + https://bintray.com/api/ui/download/hyperledger-org/besu-repo/besu-1.4.0.zip true - 36937e2717da41de15b9a033ff1377ad diff --git a/besu-appsody-stacks/java-besu-plugins/image/Dockerfile-stack b/besu-appsody-stacks/java-besu-plugins/image/Dockerfile-stack index 782449c..489066c 100644 --- a/besu-appsody-stacks/java-besu-plugins/image/Dockerfile-stack +++ b/besu-appsody-stacks/java-besu-plugins/image/Dockerfile-stack @@ -27,9 +27,9 @@ ENV APPSODY_WATCH_REGEX="^(build.gradle|.*(.java))$" ENV APPSODY_PREP="/project/user-app/gradlew --gradle-user-home=/gradle --console=plain installBesu" # Run: Build project, create plugins directory, copy jar to plugins directory, start Besu -ENV APPSODY_RUN="/project/user-app/gradlew --gradle-user-home=/gradle --console=plain build && mkdir build/besu-1.4.0-beta3/plugins && cp build/libs/*.jar build/besu-1.4.0-beta3/plugins && build/besu-1.4.0-beta3/bin/besu --config-file=demo-options.toml" +ENV APPSODY_RUN="/project/user-app/gradlew --gradle-user-home=/gradle --console=plain build && mkdir build/besu-1.4.0/plugins && cp build/libs/*.jar build/besu-1.4.0/plugins && build/besu-1.4.0/bin/besu --config-file=demo-options.toml" # On source change: Build project, copy jar to plugins directory, start Besu -ENV APPSODY_RUN_ON_CHANGE="/project/user-app/gradlew --gradle-user-home=/gradle --console=plain build && cp build/libs/*.jar build/besu-1.4.0-beta3/plugins && build/besu-1.4.0-beta3/bin/besu --config-file=demo-options.toml" +ENV APPSODY_RUN_ON_CHANGE="/project/user-app/gradlew --gradle-user-home=/gradle --console=plain build && cp build/libs/*.jar build/besu-1.4.0/plugins && build/besu-1.4.0/bin/besu --config-file=demo-options.toml" ENV APPSODY_RUN_KILL=true ENV APPSODY_DEBUG= diff --git a/besu-appsody-stacks/java-besu-plugins/templates/demo/build.gradle b/besu-appsody-stacks/java-besu-plugins/templates/demo/build.gradle index 630bf83..8d89802 100644 --- a/besu-appsody-stacks/java-besu-plugins/templates/demo/build.gradle +++ b/besu-appsody-stacks/java-besu-plugins/templates/demo/build.gradle @@ -26,13 +26,13 @@ dependencies { compileOnly 'info.picocli:picocli:3.9.5' compileOnly 'org.apache.logging.log4j:log4j-api:2.12.0' compileOnly 'org.apache.logging.log4j:log4j-core:2.12.0' - compileOnly 'org.hyperledger.besu:plugin-api:1.4.0-beta3-SNAPSHOT' + compileOnly 'org.hyperledger.besu:plugin-api:1.4.0' testImplementation 'junit:junit:4.12' } task installBesu(type: Copy) { - def dependency = project.dependencies.create('hyperledger-org:besu-repo:besu-1.4.0-beta3@zip') + def dependency = project.dependencies.create('hyperledger-org:besu-repo:besu-1.4.0@zip') def config = project.configurations.detachedConfiguration(dependency) File resolvedFile; diff --git a/besu-maven-archetype/README.md b/besu-maven-archetype/README.md index d1007be..a37f098 100644 --- a/besu-maven-archetype/README.md +++ b/besu-maven-archetype/README.md @@ -22,7 +22,7 @@ Prerequisites: `mvn clean install` 2. Start Hyperledger Besu: -`target/besu-1.3.8/bin/besu --config-file=config.toml` +`target/besu-1.4.0/bin/besu --config-file=config.toml` 3. Wait until you see `Ethereum main loop is up` diff --git a/besu-maven-archetype/src/main/resources/archetype-resources/pom.xml b/besu-maven-archetype/src/main/resources/archetype-resources/pom.xml index f91367b..c83beb6 100644 --- a/besu-maven-archetype/src/main/resources/archetype-resources/pom.xml +++ b/besu-maven-archetype/src/main/resources/archetype-resources/pom.xml @@ -75,9 +75,8 @@ wget - https://bintray.com/api/ui/download/hyperledger-org/besu-repo/besu-1.3.8.zip + https://bintray.com/api/ui/download/hyperledger-org/besu-repo/besu-1.4.0.zip true - 36937e2717da41de15b9a033ff1377ad From 484109927b124c7ff50c2ad7aa09813304b86508 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Sat, 29 Feb 2020 23:44:58 -0500 Subject: [PATCH 2/2] Add link to plugin API docs --- besu-appsody-stacks/java-besu-plugins/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/besu-appsody-stacks/java-besu-plugins/README.md b/besu-appsody-stacks/java-besu-plugins/README.md index ba5c178..6270a44 100644 --- a/besu-appsody-stacks/java-besu-plugins/README.md +++ b/besu-appsody-stacks/java-besu-plugins/README.md @@ -1,6 +1,6 @@ # Appsody Stack for Hyperledger Besu Plugins -[Appsody](https://appsody.dev/) stack for developers writing Java plugins using the Hyperledger Besu Plugins API. +[Appsody](https://appsody.dev/) stack for developers writing Java plugins using the [Hyperledger Besu Plugin API](https://besu.hyperledger.org/en/stable/Reference/Plugin-API-Interfaces/). Developers can initialize a sample project based on [PluginsAPIDemo](https://github.com/PegaSysEng/PluginsAPIDemo) with a single command, and use another command to start their development runtime entirely on a container. Once the project is running, iterative development is enabled which will update the plugin when source changes are detected.