Nov 12, 2019 Deploy Cloud Foundry on MoltenCore
In the previous blog posts we introduced MoltenCore and showed you how to deploy MoltenCore on Packet bare-metal cloud. In this blog post I will walk you through the steps needed to deploy Cloud Foundry on your freshly deployed MoltenCore Cluster.
Since MoltenCore uses BOSH with the docker-bosh-cpi for resources isolation, a Cloud Foundry running on top of MoltenCore could technically be considered a Containerised Cloud Foundry. It however differs from project-quarks by taking a BOSH native instead of Kubernetes native approach.
Get a MoltenCore Cluster
Depending on the download speed and IOPS of your node it takes between 5 - 15 minutes for your BUCC to be deployed. The deployment is managed by systemd so we can use
journalctl to check the status and progress.
# on node-z0 systemctl status bucc.service journalctl -f -u bucc.service
Copy the deploy-cf Concourse pipeline
While we wait, go ahead and clone the
molten-core repo, since we will be using the
deploy-cloudfoundry.yml Concourse pipeline from the examples directory. Also use the
copy-pipeline script to create a copy paste friendly snippet.
git clone https://github.com/starkandwayne/molten-core && cd molten-core ./examples/copy-pipeline cf | xclip -selection clipboard # on linux ./examples/copy-pipeline cf | pbcopy # on macOS
Deploy Cloud Foundry
Once your BUCC is up and running use the
mc (the MoltenCore binary, which was installed onto all nodes during cluster bootstrap) to start a management shell. In this shell, the
fly CLI is already configured to talk to your BUCC, so all you need to do is paste the snippet you generated in the step above.
mc shell root@someuuid:/# < Paste here >
The Concourse pipeline will be paused initially. We can use the
fly CLI to unpause it and to trigger the deployment job. Concourse will use the bosh-deployment-resource to instruct BOSH, to deploy Cloud Foundry using the deployment manifest from the official cf-deployment repo.
fly -t mc unpause-pipeline -p deploy-cf fly -t mc trigger-job -j deploy-cf/deploy-cf --watch
Login to Cloud Foundry
During the deploy, BOSH will instruct CredHub to generate passwords and certificates to protect your installation. The deployment pipeline also includes a task which automates the lookup of the admin password. It outputs a copy-pastable snippet to configure the cf CLI (which can be installed using these instructions), to target your freshly deployed Cloud Foundry.
fly -t mc trigger-job -j deploy-cf/generate-cf-cli-login-snippet --watch
At this point you should have a Cloud Foundry running on a Molten Core Cluster. Which is great for trying out new features (for example, the metric-store). Just add an additional cf-deployment ops files to your local copy of deploy-cloudfoundry.yml, run
copy-pipeline and kick off another deploy.