To use this service:
- deploy redis-example-app
git clone git@github.com:pivotal-cf/cf-redis-example-app.git && \ pushd cf-redis-example-app && \ cf push <app_name> --no-start && \ popd
- clone the repo
git clone git@github.com:connor-rogers/redis-cg-release.git
- cd into the repo
cd redis-cg-release
- Create a release
bosh create-release --force
- upload-release
bosh upload-release
- edit the manifest
- add it to the release section
releases: - name: redis-cg version: latest
- add an instance group
instance_groups: - name: redis-master instances: 1 azs: - z1 jobs: - name: redis-server release: redis-cg properties: port: <port> password: <password> vm_type: small-highmem stemcell: default persistent_disk_type: 10GB networks: - name: default
- deploy CF with the new manifest
bosh -d cf deploy <path-to-manifest>
- create ASG
- create ASG definition
to get the service ip run[ { "protocol": "tcp", "destination": "<service_ip>/32", "ports": "<port>", "description": "Exposes the Redis VM to the app" } ]
bosh vms | grep redis-master | awk '{ print $4 }'
- create ASG
cf create-security-group <asg-name> security.json
- bind ASG to org
cf bind-security-group <asg-name> <org-name> <space-name>
- create user provided service definition
cf create-user-provided-service redis -p '{"host":"<service_ip>","port":"<port>","password":"<password>"}'
- start the app
cf start <app_name>
- test the app
$ curl -X PUT http://<route_to_app>/foo -d "data=bar" $ curl -X GET http://<route_to_app>/foo bar