MoltenCore allows running containerized container platforms on bare-metal in a BOSH native way, using a highly available scale out architecture. The main repo can be found on GitHub. In this blog post, we will walk you through the steps needed to deploy a MoltenCore cluster on Packet.
Clone the project
The packet-molten-core repo contains the terraform we need for the task at hand. Go ahead and clone the repo, we will also copy the vars template which we need in further steps:
git clone https://github.com/starkandwayne/packet-molten-corecd packet-molten-core
cp terraform.tfvars.example terraform.tfvars # futher steps will refer to this file
Create a Packet Account
You can sign up for a Packet.com account here. If you want some perks, please reach out to Brian Wong or Joshua “JC” Boliek at Packet. Say you saw this blog post and let them know Stark & Wayne sent you!
After sign up, create a project and copy your project id into the terraform.tfvars
file:
You will also need to generate a personal (not project) api key into the terraform.tfvars
file:
Optionally customize the defaults
With your Project ID and API Key filled in, you should be good to go, however you might want the change the following defaults in your terraform.tfvars
file:
- packet_facility: the geographic location of the server datacenter full list here.
- node_type: the type of server to use, available types here.
- node_count: number of nodes you want, best to use odd numbers when deploying cf or k8s to keep quorum.
Deploy
Now we can go ahead and deploy our cluster:
terraform init # to retrieve all the modules
terraform plan # to verify all variables
terraform apply # actually deploy a MoltenCore
Using MoltenCore
All management interactions with your MoltenCore cluster are performed from the first node (zone zero, z0
for short). This node also hosts the embedded BUCC. Use the helper script (./utils/ssh
) to access node-z0
by default it will go to z0
other nodes can be reached by passing a number (eg. ./utils/ssh 1
to go the second node)
./utils/ssh # ssh to node-z0
journalctl -f -u bucc.service # wait for BUCC to be deployed
mc shell # start interactive shell for interacting with BUCC
For more things to do with your cluster refer to the molten-core repo.
Cleanup
Terraform can be used to delete your MoltenCore cluster. To do so run the following command:
terraform destroy