constellation/dev-docs/miniconstellation
2024-02-26 13:38:33 +01:00
..
azure-terraform deps: update all terraform providers 2024-02-26 13:38:33 +01:00
README.md docs: how to set up MiniConstellation on Azure (#1999) 2023-07-07 15:14:13 +02:00
setup-miniconstellation.sh remove deprecated constellation create flags (#2325) 2023-09-08 21:15:02 +02:00

Quick setup for a mini cluster running the cloud

Prerequisites

Instructions

Through the Terraform template for Azure it's easy to set up a MiniConstellation cluster on a remote VM.

  1. Clone the Constellation repository:

    git clone https://github.com/edgelesssys/constellation.git
    
  2. 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
    
  3. 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
    
  4. Verify the Kubernetes cluster

    Running:

    export KUBECONFIG="$PWD/constellation-admin.conf"
    kubectl get nodes
    

    should show both one control-plane and one worker node.

  5. Clean up cloud resources

    Exit the SSH connection (Ctrl+D) and run:

    terraform destroy