Skip to content

Getting Started

In this example, we will deploy a textfile on our local machine which has a different content depending on our input. This is just a simple example without any dependencies, such as a Docker Engine or a cloud. For a more complex scenario including OpenStack and GCP see Motivating Scenario.

First, we install OpenTOSCA Vintner. For more information see Installation.

curl -fsSL https://vintner.opentosca.org/install.sh | sudo bash -

We currently support xOpera and Unfurl. Since both can only be installed on Linux, we provide a WSL integration for both. We configure and enable xOpera. For more information see Installation.

vintner orchestrators init xopera
vintner orchestrators enable --orchestrator xopera

Next, we clone the repository.

1
2
3
4
git clone https://github.com/OpenTOSCA/opentosca-vintner.git
cd opentosca-vintner
git lfs install
git lfs pull

Next, we import the Variability4TOSCA template.

vintner templates import --template getting-started --path examples/xopera-getting-started

Next, we initialize an application instance.

vintner instances init --instance getting-started --template getting-started

The imported template contains the following conditional node templates.

first:
    type: textfile
    conditions: {logic_expression: is_first}
    properties:
        content: 'First Textfile has been selected!'
    requirements:
        - host: 
            node: localhost
            conditions: {logic_expression: is_first}

second:
    type: textfile
    conditions: {logic_expression: is_second}
    properties:
        content: 'Second Textfile has been selected!'
    requirements:
        - host: 
            node: localhost
            conditions: {logic_expression: is_second}

We intend to deploy the first textfile. We specify this when resolving variability.

vintner instances resolve --instance getting-started --presets first

Finally, we deploy the application.

vintner instances deploy --instance getting-started

The deployed textfile has the content as expected.

/tmp/vintner-getting-started.txt
First Textfile has been selected!

Eventually, we undeploy the application.

vintner instances undeploy --instance getting-started

Last update: April 28, 2024