Automate your bare metal data center with Colony
Colony is Konstruct’s new bare metal product that gives you the ability to repurpose your data center hardware into new operating systems and Kubernetes clusters.
So that you can see Colony in action, we've built a project that lets you create a virtual data center rack, with a spine-leaf network architecture, virtual switches, an exit node, a set of 6 tiny virtual servers, virtual cabling, with internet connectivity, all running on a single 2X Large machine in your Civo account (more clouds to come). The 0.1 release is an open beta and we'd love your feedback.
It also creates and configures a laptop
VM which has the colony
CLI preinstalled on it, along with a Colony data center instance running in a Kubernetes cluster. This emulates you connected to your data center. With this infrastructure in place, you can use our Colony UI to repurpose your new VMs as new operating systems or Kubernetes clusters. One can only imagine why that should be incredibly useful.
colony
will auto-enroll all PXI bootable hardware that is restarted on the network. This feature is destructive and will wipe the disk devices on restarted servers. It is intended for use only in a controlled network. The upcoming 0.2 release will allow you to disable the auto-enrollment feature.Create a virtual data center
Clone our colony-vagrant git repository, and then start the data center provisioner
git clone https://github.com/konstructio/colony-vagrant
cd colony-vagrant
make dc
select > create datacenter
When prompted, provide your Civo token, your Colony API key, a name for your VM, and watch a virtual data center provision before your very eyes.
Initialize Colony in your new data center
The process above leaves you on the virtual laptop
VM with the colony
CLI already installed on it. To initialize Colony, run the following command as shown:
colony init \
--apiKey="$COLONY_API_KEY" \
--apiURL="https://colony-api-virtual.konstruct.io"
Then exit the laptop to return to the data center VM
exit
Boot, auto-discover, and auto-register your 6 virtual servers
To see the power of the Colony auto-discovery and auto-registration process, run the following script to boot up 6 servers.
bash virtual-datacenter/power-on.sh
If you're logged into colony, as these machines come online, you'll see these servers begin to appear in your assets list.
Create a Kubernetes cluster on your discovered hardware
Navigate to the Clusters section and let's create our first Talos Kubernetes cluster.
Select Clusters -> Kubernetes -> Talos
Give it any name you like. For the Global Gateway IP
enter value 10.0.10.1
.
Configure the Control Plane
Select a machine (or more) to serve as your Kubernetes control plane. Give it a unique Static IP
value of 10.0.10.20/24
.
Configure the Nodes
Next select a machine to serve as a Kubernetes node for the cluster. Give it a unique Static IP Value of 10.0.10.21/24
.
Connecting to your Kubernetes cluster
In the Colony UI, once the cluster has been successfully created, you'll be able to download your kubeconfig
file that's associated with your new cluster. You can then copy this kubeconfig
content to your laptop
VM, and use your new cluster.
To begin, download your kubeconfig
file from the Colony UI and copy its content to your clipboard.
Connect to laptop with vagrant ssh laptop
.
Create a new talos-kubeconfig
file and paste your config into it
vi /home/vagrant/talos-kubeconfig
Then configure the kubectl
client to use it
export KUBECONFIG=/home/vagrant/talos-kubeconfig
Now test your connectivity with your new Talos Kubernetes cluster by viewing your nodes and pods.
kubectl get nodes -owide
kubectl get pods -A
Cleanup
The Civo instance that hosts this virtual environment costs just under $1 to run for 4 hours, which is plenty of time to create some new bare metal Kubernetes clusters and throw a hello world in them. When you're done with your assessment, you'll want to destroy it so it doesn't continue to accumulate cloud costs.
To destroy your data center, run the exit
command in your terminal to log off of the laptop
. Then run the exit
command again to leave the datacenter
.
This will drop you back into the interactive colony-vagrant
shell which will allow you to select option > destroy datacenter
. Hit enter to clean up your virtual data center in the cloud.
If you have any trouble with the new Colony automation, you can also delete the instance directly in your Civo dashboard. That instance is the only cloud resource that we create when you run this demo.
Discover more with the Konstruct community
At Konstruct, we've dedicated the last 5+ years to lowering the barrier to the complex technologies that power your business. We've built a community with hundreds of engineers who want to be working with these transformative technologies the same ways.
If you have any trouble getting started with your new Colony virtual data center, pop into our Konstruct slack workspace and let us know what you need in the #helping-hands channel.
If you'd like to talk to us about using Colony in your data center to manage your infrastructure automation with a fresh new cloud native approach, book some time with us today.