Conditional Deployment Technologies¶
This document holds the step-by-step guide to deploy the Kubernetes deployment variant of the Online Boutique application to showcase the automated selection of deployment technologies. The application can be deployed in the following deployment variants.
- static on a single virtual machine on a local OpenStack (OS) instance
- elastic on Google Cloud Platform (GCP)
- elastic on Kubernetes
Requirements¶
We need to fulfill the following requirements to follow this step-by-step tutorial.
- Linux machine, e.g., Ubuntu 22.04
- Access to a Kubernetes cluster, e.g., minikube
Preparation¶
First, we install OpenTOSCA Vintner. For more information see Installation.
Next, we install Unfurl.
Next, we configure Unfurl as the orchestrator that should be used for the deployment.
Next, we attest that Vintner can use unfurl.
Enrich the Template¶
Next, we clone the repository.
Next, we make a copy of the Variability4TOSCA template.
Next, we enrich the Variability4TOSCA template. This will automatically generate conditional deployment technology assignments.
Resolve the Template¶
We want to deploy the Kubernetes variant with the all features enabled. Therefore, we first create the following file.
/tmp/variability-inputs.yaml | |
---|---|
Next, we resolve the variability and generate a TOSCA model. This will automatically select deployment technologies.
Next, we generate the Deployment Technology-Specific Models.
Import the Template¶
Next, we import the TOSCA template.
Then, we initialize an application instance.
Deploy the Application¶
Next, we need a Kubernetes cluster. We can start a development one locally using minikube.
Next, we provide deployment inputs, e.g., credentials to Kubernetes.
These inputs are specified in topology_template.inputs
of the TOSCA-compliant model.
The following inputs must be defined.
/tmp/deployment-inputs.yaml | |
---|---|
In case of minikube, the following deployment inputs should be fitting.
Note, you need to resolve $(minikube ip)
and $HOME
first.
k8s_host
:http://$(minikube ip):8443
k8s_ca_cert_file
:$HOME/.minikube/ca.crt
k8s_client_cert_file
:$HOME/.minikube/profiles/minikube/client.crt
k8s_client_key_file
:$HOME/.minikube/profiles/minikube/client.key
Next, we start the deployment. The deployment will take around 1-2 minutes.
Test the Application¶
Next, we can test that the application is correctly working. Therefore, find out the endpoint assigned by the ingress. In case of minikube, this can be done as follows.
Next, we can manually test the application in the browser.
Next, we can start the load generator.
We can observe the following.
Thus, we conclude that the application has been deployed as desired.
Undeploy the Application¶
Afterward, we can undeploy the application.
We can also optionally remove the instance or cleanup the filesystem. Note, cleaning up the filesystem removes any vintner data including, e.g., all imported templates and created instances.