Commit 9a1988bd authored by Ryan Dawson's avatar Ryan Dawson

initial setup

parent 1fcbdfbb
target
/local
# Netbeans and IntelliJ files
!.gitignore
/nbproject
/*.ipr
/*.iws
*.iml
.idea
# Repository wide ignore mac DS_Store files
.DS_Store
# Eclipse
.project
.classpath
.settings
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
# activiti-cloud-config-repo
\ No newline at end of file
# activiti-cloud-config-repo
Config repository to provide config files for some Activiti cloud projects. A spring cloud config server can be pointed at this repo to host the config files contained here.
Can be hosted using a standard spring cloud config server e.g. docker image https://hub.docker.com/r/hyness/spring-cloud-config-server/ and using environment variable SPRING_CLOUD_CONFIG_SERVER_GIT_URI=https://github.com/ryandawsonuk/activiti-cloud-config-repo
Each client will need to have a bootstrap.properties and the spring-cloud-starter-config dependency. The bootstrap.properties needs to provide at least spring.application.name (which should match to the property file in the config server) and the spring.cloud.config.uri to find the config server. The client will look for the config server very early in its startup.
Let's say we run the config server using name activiti-cloud-config-server on port 8888 (similar to https://github.com/hyness/spring-cloud-config-server/blob/master/docker-compose.yml). Then we could use this value in all of the bootstrap.properties:
spring.cloud.config.uri=http://activiti-cloud-config-server:8888
And in each of the client's its own application name will feature in the bootstrap.properties:
spring.application.name=${ACT_RB_APP_NAME:runtime-bundle1}
spring.application.name=${ACT_GATEWAY_APP_NAME:gateway}
spring.application.name=${ACT_REGISTRY_APP_NAME:registry
spring.application.name=${ACT_AUDIT_APP_NAME:audit}
spring.application.name=${ACT_QUERY_APP_NAME:query}
Note that if a new runtime bundle (or any other app) is deployed with a new name (e.g. runtime-bundle2) then it will only find a config file in the repo if it is named runtime-bundle2.properties (or otherwise matches the convention based on app name and profile name).
\ No newline at end of file
server.port=${ACT_AUDIT_PORT:8181}
spring.application.name=${ACT_AUDIT_APP_NAME:audit}
spring.cloud.stream.bindings.auditConsumer.destination=${ACT_AUDIT_CONSUMER_DEST:engineEvents}
spring.cloud.stream.bindings.auditConsumer.group=${ACT_AUDIT_CONSUMER_GROUP:audit}
spring.cloud.stream.bindings.auditConsumer.contentType=${ACT_AUDIT_CONSUMER_CONTENT_TYPE:application/json}
spring.jackson.serialization.fail-on-unwrapped-type-identifiers=${ACT_AUDIT_JACKSON_FAIL_ON_UNWRAPPED_IDS:false}
keycloak.auth-server-url=${ACT_KEYCLOAK_URL:http://activiti-cloud-sso-idm:8180/auth}
keycloak.realm=${ACT_KEYCLOAK_REALM:springboot}
keycloak.resource=${ACT_KEYCLOAK_RESOURCE:activiti}
keycloak.ssl-required=${ACT_KEYCLOAK_SSL_REQUIRED:none}
keycloak.public-client=${ACT_KEYCLOAK_CLIENT:true}
keycloak.security-constraints[0].authRoles[0]=${ACT_KEYCLOAK_ROLES:user}
keycloak.security-constraints[0].securityCollections[0].patterns[0]=${ACT_KEYCLOAK_PATTERNS:/*}
keycloak.principal-attribute=${ACT_KEYCLOAK_PRINCIPAL_ATTRIBUTE:preferred-username}
# see https://issues.jboss.org/browse/KEYCLOAK-810 for configuration options
keycloakadminclientapp=${ACT_KEYCLOAK_CLIENT_APP:admin-cli}
keycloakclientuser=${ACT_KEYCLOAK_CLIENT_USER:client}
keycloakclientpassword=${ACT_KEYCLOAK_CLIENT_PASSWORD:client}
# this user needs to have the realm management roles assigned
spring.rabbitmq.host=${ACT_RABBITMQ_HOST:rabbitmq}
eureka.client.serviceUrl.defaultZone=${ACT_EUREKA_URL:http://activiti-cloud-registry:8761/eureka/}
#hostname as declared to eureka
eureka.instance.hostname=${ACT_AUDIT_HOST:activiti-cloud-audit}
eureka.client.enabled=${ACT_AUDIT_EUREKA_CLIENT_ENABLED:true}
\ No newline at end of file
server.port=${ACT_GATEWAY_PORT:8080}
spring.application.name=${ACT_GATEWAY_APP_NAME:gateway}
management.security.enabled=${ACT_GATEWAY_MANAGEMENT_SECURITY:false}
spring.rabbitmq.host=${ACT_RABBITMQ_HOST:rabbitmq}
eureka.client.serviceUrl.defaultZone=${ACT_EUREKA_URL:http://activiti-cloud-registry:8761/eureka/}
hystrix.command.default.execution.timeout.enabled=${ACT_GATEWAY_HYSTRIX_TIMEOUT_ENABLED:false}
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=${ACT_GATEWAY_HYSTRIX_TIMEOUT:210000}
zuul.sensitive-headers=${ACT_GATEWAY_SENSITIVE_HEADERS:Cookie,Set-Cookie}
keycloak.auth-server-url=${ACT_KEYCLOAK_URL:http://activiti-cloud-sso-idm:8180/auth}
keycloak.realm=${ACT_KEYCLOAK_REALM:springboot}
keycloak.resource=${ACT_KEYCLOAK_RESOURCE:activiti}
keycloak.public-client=${ACT_KEYCLOAK_CLIENT:true}
keycloak.security-constraints[0].authRoles[0]=${ACT_KEYCLOAK_ROLES:user}
keycloak.security-constraints[0].securityCollections[0].patterns[0]=${ACT_KEYCLOAK_PATTERNS:/*}
keycloak.principal-attribute=${ACT_KEYCLOAK_PRINCIPAL_ATTRIBUTE:preferred-username}
# see https://issues.jboss.org/browse/KEYCLOAK-810 for configuration options
#hostname as declared to eureka
eureka.instance.hostname=${ACT_GATEWAY_HOST:activiti-cloud-gateway}
eureka.client.enabled=${ACT_GATEWAY_EUREKA_CLIENT_ENABLED:true}
activiti.cors=${ACT_GATEWAY_CORS:false}
keycloak.cors=${ACT_KEYCLOAK_CORS:true}
keycloak.cors-max-age=${ACT_KEYCLOAK_CORS_MAX_AGE:1000}
keycloak.cors-allowed-methods=${ACT_KEYCLOAK_CORS_METHODS:POST,PUT,DELETE,GET}
keycloak.cors-allowed-headers=${ACT_KEYCLOAK_CORS_HEADERS:Access-Control-Allow-Origin,Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Authorization}
keycloak.ssl-required=${ACT_KEYCLOAK_SSL_REQUIRED:none}
\ No newline at end of file
server.port=${ACT_QUERY_PORT:8182}
spring.application.name=${ACT_QUERY_APP_NAME:query}
spring.cloud.stream.bindings.producer.destination=${ACT_QUERY_PRODUCER_DEST:engineEvents}
spring.cloud.stream.bindings.producer.contentType=${ACT_QUERY_PRODUCER_CONTENT_TYPE:application/json}
spring.cloud.stream.bindings.queryConsumer.destination=${ACT_QUERY_CONSUMER_DEST:engineEvents}
spring.cloud.stream.bindings.queryConsumer.group=${ACT_QUERY_CONSUMER_GROUP:query}
spring.cloud.stream.bindings.queryConsumer.contentType=${ACT_QUERY_CONSUMER_CONTENT_TYPE:application/json}
spring.jackson.serialization.fail-on-unwrapped-type-identifiers=${ACT_QUERY_JACKSON_FAIL_ON_UNWRAPPED_IDS:false}
keycloak.auth-server-url=${ACT_KEYCLOAK_URL:http://activiti-cloud-sso-idm:8180/auth}
keycloak.realm=${ACT_KEYCLOAK_REALM:springboot}
keycloak.resource=${ACT_KEYCLOAK_RESOURCE:activiti}
keycloak.public-client=${ACT_KEYCLOAK_CLIENT:true}
keycloak.ssl-required=${ACT_KEYCLOAK_SSL_REQUIRED:none}
keycloak.security-constraints[0].authRoles[0]=${ACT_KEYCLOAK_ROLES:user}
keycloak.security-constraints[0].securityCollections[0].patterns[0]=${ACT_KEYCLOAK_PATTERNS:/*}
keycloak.principal-attribute=${ACT_KEYCLOAK_PRINCIPAL_ATTRIBUTE:preferred-username}
# see https://issues.jboss.org/browse/KEYCLOAK-810 for configuration options
keycloakadminclientapp=${ACT_KEYCLOAK_CLIENT_APP:admin-cli}
keycloakclientuser=${ACT_KEYCLOAK_CLIENT_USER:client}
keycloakclientpassword=${ACT_KEYCLOAK_CLIENT_PASSWORD:client}
# this user needs to have the realm management roles assigned
spring.rabbitmq.host=${ACT_RABBITMQ_HOST:rabbitmq}
eureka.client.serviceUrl.defaultZone=${ACT_EUREKA_URL:http://activiti-cloud-registry:8761/eureka/}
#hostname as declared to eureka
eureka.instance.hostname=${ACT_QUERY_HOST:activiti-cloud-query}
eureka.client.enabled=${ACT_QUERY_EUREKA_CLIENT_ENABLED:true}
\ No newline at end of file
server.port=${ACT_REGISTRY_PORT:8761}
eureka.client.register-with-eureka=${ACT_REGISTRY_REGISTER_WITH_EUREKA:false}
eureka.client.fetch-registry=${ACT_REGISTRY_FETCH:false}
\ No newline at end of file
#currently having fix port as eureka otherwise uses port 0 as with 11jan comment on https://github.com/spring-cloud/spring-cloud-config/issues/93 and in https://stackoverflow.com/questions/33270996/with-spring-cloud-brixton-m1-random-port-not-registered-with-eureka
server.port=${ACT_RB_PORT:8081}
spring.application.name=${ACT_RB_APP_NAME:runtime-bundle1}
spring.cloud.stream.bindings.auditProducer.destination=${ACT_RB_AUDIT_PRODUCER_DEST:engineEvents}
spring.cloud.stream.bindings.auditProducer.contentType=${ACT_RB_AUDIT_PRODUCER_CONTENT_TYPE:application/json}
spring.cloud.stream.bindings.myCmdResults.destination=${ACT_RB_COMMAND_RESULTS_DEST:commandResults}
spring.cloud.stream.bindings.myCmdResults.group=${ACT_RB_COMMAND_RESULTS_GROUP:myCmdGroup}
spring.cloud.stream.bindings.myCmdResults.contentType=${ACT_RB_COMMAND_RESULTS_CONTENT_TYPE:application/json}
spring.cloud.stream.bindings.myCmdProducer.destination=${ACT_RB_COMMAND_RESULTS_DEST:commandConsumer}
spring.cloud.stream.bindings.myCmdProducer.contentType=${ACT_RB_COMMAND_RESULTS_CONTENT_TYPE:application/json}
spring.jackson.serialization.fail-on-unwrapped-type-identifiers=${ACT_RB_JACKSON_FAIL_ON_UNWRAPPED_IDS:false}
keycloak.auth-server-url=${ACT_KEYCLOAK_URL:http://activiti-cloud-sso-idm:8180/auth}
keycloak.realm=${ACT_KEYCLOAK_REALM:springboot}
keycloak.resource=${ACT_KEYCLOAK_RESOURCE:activiti}
keycloak.public-client=${ACT_KEYCLOAK_CLIENT:true}
keycloak.security-constraints[0].authRoles[0]=${ACT_KEYCLOAK_ROLES:user}
keycloak.security-constraints[0].securityCollections[0].patterns[0]=${ACT_KEYCLOAK_PATTERNS:/*}
keycloak.principal-attribute=${ACT_KEYCLOAK_PRINCIPAL_ATTRIBUTE:preferred-username}
# see https://issues.jboss.org/browse/KEYCLOAK-810 for configuration options
keycloakadminclientapp=${ACT_KEYCLOAK_CLIENT_APP:admin-cli}
keycloakclientuser=${ACT_KEYCLOAK_CLIENT_USER:client}
keycloakclientpassword=${ACT_KEYCLOAK_CLIENT_PASSWORD:client}
# this user needs to have the realm management roles assigned
#change this for prod envs
keycloak.ssl-required=${ACT_KEYCLOAK_SSL_REQUIRED:none}
spring.rabbitmq.host=${ACT_RABBITMQ_HOST:rabbitmq}
eureka.client.serviceUrl.defaultZone=${ACT_EUREKA_URL:http://activiti-cloud-registry:8761/eureka/}
#hostname as declared to eureka
eureka.instance.hostname=${ACT_RB_HOST:activiti-cloud-runtime-bundle}
spring.datasource.driverClassName=${ACT_RB_DB_DRIVER:org.postgresql.Driver}
spring.datasource.url=${ACT_RB_DB_URI:jdbc:postgresql://rb-postgres:5432/activitidb}
spring.datasource.username=${ACT_RB_DB_USER:postgres}
spring.datasource.password=${ACT_RB_DB_PASS:password}
spring.jpa.database-platform=${ACT_RB_DB_PLATFORM:org.hibernate.dialect.PostgreSQLDialect}
spring.jpa.generate-ddl=${ACT_RB_GENERATEDDL:true}
spring.jpa.hibernate.ddl-auto=${ACT_RB_DDLAUTO:create}
#env variable or /processes/ fallback - or if below is removed classpath:/processes/ is used as per ActivitiProperties class
spring.activiti.process-definition-location-prefix=file:${ACT_RB_PROCESSES_PATH:/processes/}
eureka.client.enabled=${ACT_RB_EUREKA_CLIENT_ENABLED:true}
loader.path=${ACT_RB_LIBDIR:lib/}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment