Skip to content

Commit

Permalink
Fixing for CF
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudnativedata committed Jun 5, 2024
1 parent f01a60c commit f91765e
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
applications:
- name: jdbc-sql-console-app
memory: 14000M
memory: 1400M
log-rate-limit-per-second: -1
services:
- retail-sql
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
applications:
- name: retail-analytics-app
memory: 14000M
memory: 1400M
log-rate-limit-per-second: -1
services:
- retail-rabbitmq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ applications:
log-rate-limit-per-second: -1
services:
- retail-rabbitmq
- retail-gf-redis
- retail-gemfire
env:
JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 17.+}}'
SPRING_PROFILES_ACTIVE: 'gemfire'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
applications:
- name: retail-source-app
memory: 14000M
memory: 1400M
log-rate-limit-per-second: -1
services:
- retail-rabbitmq
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
applications:
- name: retail-cache-sink-app
memory: 14000M
memory: 1400M
log-rate-limit-per-second: -1
services:
- retail-gf-redis
- retail-gemfire
env:
spring.profiles.active: gemfire
JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 17.+}}'
retail.customer.id: 'nyla'
67 changes: 53 additions & 14 deletions deployments/cloud/cloudFoundry/scripts/cf-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,36 @@

cf marketplace

## GemFire for Redis
## GemFire

#small
cf create-service p-cloudcache extra-small retail-gf-redis -c '{"gemfire_for_redis_enabled":"true","gemfire_for_redis_redundant_copies":2,"gemfire_for_redis_region_name": "GF_REDIS"}' -t redis
cf create-service p-cloudcache extra-small retail-gemfire -t gemfire

## SQL

cf create-service postgres on-demand-postgres-small retail-sql
cf create-service postgres on-demand-postgres-db retail-sql

cf create-service p.mysql db-small retail-scdf-sql


## RabbitMQ

cf create-service p.rabbitmq single-node retail-rabbitmq
cf create-service p.rabbitmq on-demand-plan retail-rabbitmq

#cf create-service p.rabbitmq single-node retail-rabbitmq -c '{ "plugins": { "rabbitmq_stream": true, "rabbitmq_stream_management": true } }'

#cf update-service retail-rabbitmq -c '{ "plugins": { "rabbitmq_stream": true, "rabbitmq_stream_management": true } }'

# Prometheus

cf push prometheus --docker-image prom/prometheus --var PORT=9090
# ----------------
# SCDF DataFlow

cf create-service p-dataflow standard scdf

-c '{"services": ["retail-scdf-sql","retail-rabbitmq"] }'

# -----------------------------
# WAIT FOR SERVICE to be available

Expand All @@ -52,41 +64,62 @@ do
done


gemfire_status=`cf service retail-gf-redis | grep status:`
gemfire_status=`cf service retail-gemfire | grep status:`
echo "Waiting for gemfire, current status:" $gemfire_status
while [[ "$gemfire_status" != *"create succeeded"* ]]
do
echo "Waiting for gemfire, current status:" $gemfire_status
gemfire_status=`cf service retail-gf-redis | grep status:`
gemfire_status=`cf service retail-gemfire | grep status:`
sleep 1
done


mysql_status=`cf service retail-scdf-sql | grep status:`
echo "Waiting for retail-scdf-sql, current status:" $mysql_status
while [[ "$mysql_status" != *"create succeeded"* ]]
do
echo "Waiting for retail-scdf-sql, current status:" $mysql_status
mysql_status=`cf service retail-scdf-sql | grep status:`
sleep 1
done


data_flow_status=`cf service data-flow | grep status:`
echo "Waiting for data-flow, current status:" $data-flow_status
while [[ "$data-flow_status" != *"create succeeded"* ]]
do
echo "Waiting for retail-scdf-sql, current status:" $data-flow_status
data_flow_status=`cf service data-flow | grep status:`
sleep 1
done



#--------------------
# Push Applications
cf push retail-cache-sink-app -f deployments/cloud/cloudFoundry/apps/retail-cache-sink-app/retail-cache-sink-app.yaml -p applications/retail-cache-sink-app/target/retail-cache-sink-app-0.0.1-SNAPSHOT.jar
cf push retail-cache-sink-app -f deployments/cloud/cloudFoundry/apps/retail-cache-sink-app/retail-cache-sink-app.yaml -p applications/retail-cache-sink-app/target/retail-cache-sink-app-0.1.2-SNAPSHOT.jar

# retail-source-app
cf push retail-source-app -f deployments/cloud/cloudFoundry/apps/retail-source-app/retail-source-app.yaml -p applications/retail-source-app/target/retail-source-app-0.0.1-SNAPSHOT.jar
cf push retail-source-app -f deployments/cloud/cloudFoundry/apps/retail-source-app/retail-source-app.yaml -p applications/retail-source-app/target/retail-source-app-0.0.2-SNAPSHOT.jar


# retail-web-app
cf push retail-web-app -f deployments/cloud/cloudFoundry/apps/retail-web-app/retail-web-app.yaml -p applications/retail-web-app/target/retail-web-app-0.0.1-SNAPSHOT.jar
cf push retail-web-app -f deployments/cloud/cloudFoundry/apps/retail-web-app/retail-web-app.yaml -p applications/retail-web-app/target/retail-web-app-0.1.0-SNAPSHOT.jar


# retail-analytics-app
cf push retail-analytics-app -f deployments/cloud/cloudFoundry/apps/retail-analytics-app/retail-analytics-app.yaml -p applications/retail-analytics-app/target/retail-analytics-app-0.0.3-SNAPSHOT.jar
cf push retail-analytics-app -f deployments/cloud/cloudFoundry/apps/retail-analytics-app/retail-analytics-app-postgres.yaml -p applications/retail-analytics-app/target/retail-analytics-app-0.0.3-SNAPSHOT.jar


# jdbc-sql-console-app
cf push jdbc-sql-console-app -f deployments/cloud/cloudFoundry/apps/jdbc-sql-console-app/jdbc-sql-console-app.yaml -p applications/jdbc-sql-console-app/target/jdbc-sql-console-app-0.0.1-SNAPSHOT.jar
cf push jdbc-sql-console-app -f deployments/cloud/cloudFoundry/apps/jdbc-sql-console-app/jdbc-sql-console-app.yaml -p applications/jdbc-sql-console-app/target/jdbc-sql-console-app-0.0.2-SNAPSHOT.jar

#-------------------
# Create a service key GemFire
cf create-service-key retail-gf-redis retail-gf-redis-key
cf create-service-key retail-gemfire retail-gemfire-key

# Inspect the service key:
cf service-key retail-gf-redis retail-gf-redis-key
cf service-key retail-gemfire retail-gemfire-key


#-------------------
Expand All @@ -98,8 +131,14 @@ cf service-key retail-rabbitmq retail-rabbitmq-key


#-------------------
# Create a service key MySQL
# Create a service key SQL
cf create-service-key retail-sql retail-sql-key

# Inspect the service key:
cf service-key retail-sql retail-sql-key


./deployments/cloud/cloudFoundry/apps/gemfire-gideon-console/cf-push.sh



0 comments on commit f91765e

Please sign in to comment.