c2b720ca56
Co-authored-by: Markus Rudy <mr@edgeless.systems> |
||
---|---|---|
.. | ||
azure-terraform | ||
README.md | ||
setup-miniconstellation.sh |
Quick setup for a mini cluster running the cloud
Prerequisites
-
Install the Azure CLI to authenticate with Azure:
az login
Instructions
Through the Terraform template for Azure it's easy to set up a MiniConstellation cluster on a remote VM.
-
Clone the Constellation repository:
git clone https://github.com/edgelesssys/constellation.git
-
Set up the remote Azure VM through Terraform:
By default, the
Standard_D8s_v5
machine type is selected which supports nested virtualization, but you can also set another supported machine type in Terraform (machine_type
) by referring to the Azure docs. Then run:cd constellation/dev-docs/miniconstellation/azure-terraform ./create-vm.sh
After execution, you should be connected with the remote machine through SSH. If you accidentally lose connection, you can reconnect via
ssh -i id_rsa adminuser@$INSERT_VM_IP_ADDRESS
-
Prepare the VM for
constellation mini up
Once logged into the machine, install the Constellation CLI:
echo "Installing Constellation CLI" curl -LO <https://github.com/edgelesssys/constellation/releases/latest/download/constellation-linux-amd64> sudo install constellation-linux-amd64 /usr/local/bin/constellation
and start the Docker service and make sure that it's running:
sudo systemctl start docker.service && sudo systemctl enable docker.service # verify that it is active systemctl is-active docker
At last, create the Constellation cluster in a workspace directory:
mkdir constellation_workspace && cd constellation_workspace constellation mini up
The cluster creation takes about 15 minutes.
For convenience, there is a script that does these steps automatically:
./setup-miniconstellation.sh
-
Verify the Kubernetes cluster
Running:
export KUBECONFIG="$PWD/constellation-admin.conf" kubectl get nodes
should show both one control-plane and one worker node.
-
Clean up cloud resources
Exit the SSH connection (Ctrl+D) and run:
terraform destroy