This post is a combination of information available elsewhere (links are included) and can be used to get mysql in the marketplace on your local Cloud Foundry.
Tip! Run startupcf.sh from my quickly set environment for local cloud foundry post.
Follow http://operator-workshop.cloudfoundry.org/labs/services. But first peek below 😉
git clone https://github.com/cloudfoundry/cf-mysql-release.git ~/workspace/cf-mysql-release cd ~/workspace/cf-mysql-release git checkout tags/v36.10.0 ./scripts/update bosh create-release bosh upload-release git clone https://github.com/EngineerBetter/cf-mysql-deployment.git ~/workspace/cf-mysql-deployment cd ~/workspace/cf-mysql-deployment # edit operations/register-proxy-route.yml manually # edit cloud-config manually bosh -d cf-mysql deploy \ cf-mysql-deployment.yml --vars-store mysql-creds.yml \ -o ./operations/add-broker.yml \ --vars-file bosh-lite/default-vars.yml \ --var cf_mysql_external_host=p-mysql.$SYSTEM_DOMAIN \ --var cf_mysql_host=$BOSH_ENVIRONMENT \ --var cf_admin_password=$CF_ADMIN_PASSWORD \ --var cf_api_url=https://api.$SYSTEM_DOMAIN \ --var cf_skip_ssl_validation=true
I ran into some trouble with the deployment. The url in the register-proxy-route.yml was not working; so I downloaded the file and changed the url in register-proxy-route.yml to my local copy.
In the lab you must find out how to edit the cloud-config. Here’s our take:
# download the cloud-config to a local file bosh cloud-config > cloud.yml # edit the local file with vs code # add massive to vm_types (see cloud.yml below) code cloud.yml # upload the cloud-config bosh update-cloud-config cloud.yml
... vm_types: - name: minimal - name: small - name: small-highmem - name: default - name: massive
After deployment of MySql to Bosh you’ll need to register it in Cloud Foundry. It is in the lab, but we’ve added it for completeness.
bosh deployments bosh errands -d cf-mysql bosh run-errand -d cf-mysql broker-registrar
Now you’ll have MySql in the Marketplace