Hosting-Aware Pruning¶
This document holds the step-by-step guide to deploy the on-premise deployment variant of a webshop application to showcase the hosting-aware pruning. The webshop application can be deployed in the following deployment variants.
- on-premise/ local: Kubernetes on a single virtual machine on a local OpenStack (OS) instance
- cloud: Google Cloud Platform (GCP)
Requirements¶
We need to fulfill the following requirements to follow this step-by-step guide.
- Linux machine, e.g., Ubuntu 22.04
- Access to an OpenStack instance
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.
Import the Template¶
Next, we import the Variability4TOSCA template.
Then, we initialize an application instance.
We can optionally inspect the Variability4TOSCA model. This model contains all possible elements having conditions assigned. However, due to the hosting-aware pruning, only a handful of condition must be modeled. This is shown in Figure 1.
Resolve Variability¶
We want to deploy the on-premise variant of the webshop application on Kubernetes using OpenStack. We specify this when resolving variability as follows.
You can optionally inspect the generated TOSCA-compliant model. This template contains only the elements required for the on-premise variant, e.g., Kubernetes. This is shown in Figure 2.
Deploy the Application¶
Finally, we can deploy the application.
Therefore, we need to provide deployment inputs, e.g., credentials to OpenStack.
These inputs are specified in topology_template.inputs
of the TOSCA-compliant model.
The following inputs must be defined.
Next, we start the deployment. The deployment will take around 5-10 minutes.
Do not abort the deployment manually. Not even in case of errors. Once the deployment command exits, the deployment can be retried as follows.
Test the Application¶
Next, we can test that the application is correctly working. Therefore, find out the hostname of the provisioned virtual machine.
If no hostname has been assigned, then use the IPv4 address.
This should return the following.
We can observe the following.
- according to
MESSAGE
, the query has been successful - according to
DB_ADDRESS
, the MySQL instance running in Kubernetes has been used
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.
Logs¶
This deployment is also executed in our integration pipeline, which is executed once a week. The logs of the corresponding GitHub action can be accessed here. Relevant jobs start with "Unfurl Aware". Note, a GitHub account is required to access these logs. The raw logs are available without requiring an GitHub account.
Zenodo¶
The assets of this guide can be also found on Zenodo.
Publication¶
This guide is part of our paper published at the CLOSER 2024. Also check our other publications.