Customize processResources build step and configure the Apache Ant ReplaceTokens filter to process all tokens in configuration files and Gfsh shell scripts.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
|
||||
apply plugin: 'io.spring.convention.spring-sample-boot'
|
||||
|
||||
description = "Spring Geode Samples demonstrating the use of Spring Boot Auto-configuration for Apache Geode."
|
||||
@@ -13,3 +15,11 @@ dependencies {
|
||||
compile "org.projectlombok:lombok"
|
||||
|
||||
}
|
||||
|
||||
processResources {
|
||||
filter ReplaceTokens, tokens: [
|
||||
'project-dir' : rootProject.projectDir.path,
|
||||
'project-version' : project.version,
|
||||
'samples-dir' : rootProject.projectDir.path + '/spring-geode-samples/'
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Gfsh shell script used to connect to a secure cluster
|
||||
# Connect to a secure Locator with Authentication and SSL enabled
|
||||
|
||||
connect --security-properties-file=${SBDG_HOME}/spring-geode-samples/boot/configuration/src/main/resources/geode/config/gemfire.properties
|
||||
connect --security-properties-file=${SBDG_HOME}/spring-geode-samples/boot/configuration/build/resources/main/geode/config/gemfire.properties
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Gfsh shell script to set the environment
|
||||
|
||||
set variable --name=SBDG_HOME --value=/Users/jblum/pivdev/spring-boot-data-geode
|
||||
set variable --name=SBDG_HOME --value=@project-dir@
|
||||
echo --string=${SBDG_HOME}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
# Gfsh shell script to start a secure GemFire/Geode cluster
|
||||
|
||||
start locator --name=LocatorOne --classpath=${SBDG_HOME}/apache-geode-extensions/build/libs/apache-geode-extensions-1.0.0.BUILD-SNAPSHOT.jar --properties-file=${SBDG_HOME}/spring-geode-samples/boot/configuration/src/main/resources/geode/config/gemfire.properties
|
||||
set variable --name=CLASSPATH --value=${SBDG_HOME}/apache-geode-extensions/build/libs/apache-geode-extensions-@project-version@.jar
|
||||
set variable --name=GEMFIRE_PROPERTIES --value=${SBDG_HOME}/spring-geode-samples/boot/configuration/build/resources/main/geode/config/gemfire.properties
|
||||
|
||||
start locator --name=LocatorOne --classpath=${CLASSPATH} --properties-file=${GEMFIRE_PROPERTIES}
|
||||
connect --user=test --password=test
|
||||
start server --name=ServerOne --classpath=${SBDG_HOME}/apache-geode-extensions/build/libs/apache-geode-extensions-1.0.0.BUILD-SNAPSHOT.jar --properties-file=${SBDG_HOME}/spring-geode-samples/boot/configuration/src/main/resources/geode/config/gemfire.properties
|
||||
start server --name=ServerOne --classpath=${CLASSPATH} --properties-file=${GEMFIRE_PROPERTIES}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
gfsh -e "run --file=${SBDG_HOME}/spring-geode-samples/boot/configuration/src/main/resources/geode/bin/start-secure-cluster.gfsh"
|
||||
gfsh -e "run --file=@samples-dir@boot/configuration/build/resources/main/geode/bin/start-secure-cluster.gfsh"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
gfsh -e "run --file=${SBDG_HOME}/spring-geode-samples/boot/configuration/src/main/resources/geode/bin/start-simple-cluster.gfsh"
|
||||
gfsh -e "run --file=@samples-dir@boot/configuration/src/main/resources/geode/bin/start-simple-cluster.gfsh"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
gfsh -e "run --file=${SBDG_HOME}/spring-geode-samples/boot/configuration/src/main/resources/geode/bin/stop-cluster.gfsh"
|
||||
gfsh -e "run --file=@samples-dir@boot/configuration/src/main/resources/geode/bin/stop-cluster.gfsh"
|
||||
|
||||
@@ -7,8 +7,8 @@ security-username=test
|
||||
security-password=test
|
||||
ssl-enabled-components=locator,server
|
||||
ssl-require-authentication=false
|
||||
ssl-keystore=/Users/jblum/pivdev/spring-boot-data-geode/spring-geode-samples/boot/configuration/src/main/resources/example-trusted.jks
|
||||
ssl-keystore=@samples-dir@boot/configuration/build/resources/main/example-trusted-keystore.jks
|
||||
ssl-keystore-password=s3cr3t
|
||||
ssl-keystore-type=JKS
|
||||
ssl-truststore=/Users/jblum/pivdev/spring-boot-data-geode/spring-geode-samples/boot/configuration/src/main/resources/example-trusted.jks
|
||||
ssl-truststore=@samples-dir@boot/configuration/build/resources/main/example-trusted-keystore.jks
|
||||
ssl-truststore-password=s3cr3t
|
||||
|
||||
Reference in New Issue
Block a user