3.6 KiB
First steps
The following steps will guide you through the process of creating a cluster and deploying a sample app. This example assumes that you have successfully installed and set up Constellation.
Create a cluster
-
Create the configuration file for your selected cloud provider.
On Azure you also need a user-assigned managed identity with the correct permissions.
Then execute:
constellation config generate azure
constellation config generate gcp
This creates the file
constellation-conf.yaml
in your current working directory. Edit this file to set your cloud subscription IDs and optionally customize further options of your Constellation cluster. All configuration options are documented in this file.For more details, see the reference section.
-
Download the measurements for your configured image.
constellation config fetch-measurements
This command is necessary to download the latest trusted measurements for your configured image.
For more details, see the verification section.
-
Create the cluster with one control-plane node and two worker nodes.
constellation create
uses options set inconstellation-conf.yaml
automatically.constellation create azure --control-plane-nodes 1 --worker-nodes 2 --instance-type Standard_D4a_v4 -y
constellation create gcp --control-plane-nodes 1 --worker-nodes 2 --instance-type n2d-standard-2 -y
This should give the following output:
$ constellation create ... Your Constellation cluster was created successfully.
-
Initialize the cluster
constellation init
This should give the following output:
$ constellation init Creating service account ... Your Constellation cluster was successfully initialized. Constellation cluster's identifier g6iMP5wRU1b7mpOz2WEISlIYSfdAhB0oNaOg6XEwKFY= Kubernetes configuration constellation-admin.conf You can now connect to your cluster by executing: export KUBECONFIG="$PWD/constellation-admin.conf"
The cluster's identifier will be different in your output. Keep
constellation-mastersecret.json
somewhere safe. This will allow you to recover your cluster in case of a disaster. -
Configure kubectl
export KUBECONFIG="$PWD/constellation-admin.conf"
Deploy a sample application
-
Deploy the emojivoto app
kubectl apply -k github.com/BuoyantIO/emojivoto/kustomize/deployment
-
Expose the frontend service locally
kubectl wait --for=condition=available --timeout=60s -n emojivoto --all deployments kubectl -n emojivoto port-forward svc/web-svc 8080:80 & curl http://localhost:8080 kill %1
Terminate your cluster
constellation terminate
This should give the following output:
$ constellation terminate
Terminating ...
Your Constellation cluster was terminated successfully.