Skip to content

Commit

Permalink
unfurl version
Browse files Browse the repository at this point in the history
  • Loading branch information
milesstoetzner authored Mar 4, 2024
1 parent 70961b0 commit 3543994
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/docs/orchestrators.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ vintner orchestrators attest --orchestrator xopera-wsl
## Unfurl

We install Unfurl using the following command.
This will install Unfurl v0.9.1 in a virtual environment.
This will install Unfurl v1.0.0 in a virtual environment.
For a manual installation see [the documentation](https://docs.unfurl.run/README.html#installation){target=_blank}.

```shell linenums="1"
Expand Down
4 changes: 4 additions & 0 deletions examples/unfurl-artifacts/lib/gcp_database.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
tosca_definitions_version: tosca_simple_yaml_1_3

imports:
- repository: unfurl
file: tosca_plugins/artifacts.yaml

node_types:
gcp.database:
derived_from: unfurl.nodes.Installer.Terraform
Expand Down
4 changes: 4 additions & 0 deletions examples/unfurl-artifacts/lib/gcp_dbms.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
tosca_definitions_version: tosca_simple_yaml_1_3

imports:
- repository: unfurl
file: tosca_plugins/artifacts.yaml

node_types:
gcp.dbms:
derived_from: unfurl.nodes.Installer.Terraform
Expand Down
4 changes: 4 additions & 0 deletions examples/unfurl-artifacts/lib/gcp_runtime.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
tosca_definitions_version: tosca_simple_yaml_1_3

imports:
- repository: unfurl
file: tosca_plugins/artifacts.yaml

node_types:
gcp.runtime:
derived_from: unfurl.nodes.Installer.Terraform
Expand Down
4 changes: 4 additions & 0 deletions examples/unfurl-artifacts/lib/os_vm.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
tosca_definitions_version: tosca_simple_yaml_1_3

imports:
- repository: unfurl
file: tosca_plugins/artifacts.yaml

node_types:
os.vm:
derived_from: unfurl.nodes.Installer.Terraform
Expand Down
2 changes: 1 addition & 1 deletion examples/unfurl-artifacts/scripts/configuration.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TEMPLATE_NAME="artifacts"
VINTNER="yarn vintner"
VINTNER="node ../../../build/cli/index.js"
DEPLOYMENT_VARIANT="community"
3 changes: 2 additions & 1 deletion examples/unfurl-artifacts/scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ source configuration.sh
$VINTNER templates import --template ${TEMPLATE_NAME} --path ${TEMPLATE_DIR}
$VINTNER instances init --instance ${TEMPLATE_NAME} --template ${TEMPLATE_NAME}
$VINTNER instances resolve --instance ${TEMPLATE_NAME} --presets ${DEPLOYMENT_VARIANT}
$VINTNER instances deploy --instance ${TEMPLATE_NAME} --inputs ${TEMPLATE_DIR}/deployment-inputs.ignored.yaml
$VINTNER instances validate --instance ${TEMPLATE_NAME} --inputs ${TEMPLATE_DIR}/deployment-inputs.ignored.yaml
# $VINTNER instances deploy --instance ${TEMPLATE_NAME} --inputs ${TEMPLATE_DIR}/deployment-inputs.ignored.yaml
5 changes: 3 additions & 2 deletions examples/unfurl-artifacts/scripts/reimport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ $VINTNER templates delete --template ${TEMPLATE_NAME}

$VINTNER templates import --template ${TEMPLATE_NAME} --path ${TEMPLATE_DIR}
$VINTNER instances init --instance ${TEMPLATE_NAME} --template ${TEMPLATE_NAME}
$VINTNER instances resolve --instance ${TEMPLATE_NAME} --inputs ${TEMPLATE_DIR}/tests/${DEPLOYMENT_VARIANT}/inputs.yaml
$VINTNER instances deploy --instance ${TEMPLATE_NAME} --inputs ${TEMPLATE_DIR}/deployment-inputs.ignored.yaml
$VINTNER instances resolve --instance ${TEMPLATE_NAME} --presets ${DEPLOYMENT_VARIANT}
$VINTNER instances validate --instance ${TEMPLATE_NAME} --inputs ${TEMPLATE_DIR}/deployment-inputs.ignored.yaml
#$VINTNER instances deploy --instance ${TEMPLATE_NAME} --inputs ${TEMPLATE_DIR}/deployment-inputs.ignored.yaml
6 changes: 3 additions & 3 deletions examples/unfurl-artifacts/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ set -e
source configuration.sh

$VINTNER setup init
$VINTNER orchestrators init unfurl-wsl
$VINTNER orchestrators enable --orchestrator unfurl-wsl
$VINTNER orchestrators attest --orchestrator unfurl-wsl
$VINTNER orchestrators init unfurl
$VINTNER orchestrators enable --orchestrator unfurl
$VINTNER orchestrators attest --orchestrator unfurl
3 changes: 0 additions & 3 deletions examples/unfurl-artifacts/tests/business/expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ tosca_definitions_version: tosca_simple_yaml_1_3
imports:
- repository: unfurl
file: tosca_plugins/artifacts.yaml

- lib/shop_app.yaml

- lib/node_runtime.yaml
- lib/sqlite.yaml
- lib/os_vm.yaml

- lib/gcp_runtime.yaml
- lib/gcp_database.yaml
- lib/gcp_dbms.yaml
Expand Down
17 changes: 7 additions & 10 deletions examples/unfurl-artifacts/variable-service-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@ tosca_definitions_version: tosca_variability_1_0
imports:
- repository: unfurl
file: tosca_plugins/artifacts.yaml

- file: lib/shop_app.yaml

- file: lib/node_runtime.yaml
- file: lib/sqlite.yaml
- file: lib/os_vm.yaml

- file: lib/gcp_runtime.yaml
- file: lib/gcp_database.yaml
- file: lib/gcp_dbms.yaml
- lib/shop_app.yaml
- lib/node_runtime.yaml
- lib/sqlite.yaml
- lib/os_vm.yaml
- lib/gcp_runtime.yaml
- lib/gcp_database.yaml
- lib/gcp_dbms.yaml

topology_template:
variability:
Expand Down
4 changes: 4 additions & 0 deletions examples/unfurl-aware/lib/gcp_dbms.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
tosca_definitions_version: tosca_simple_yaml_1_3

imports:
- repository: unfurl
file: tosca_plugins/artifacts.yaml

node_types:
gcp.dbms:
derived_from: unfurl.nodes.Installer.Terraform
Expand Down
4 changes: 4 additions & 0 deletions examples/unfurl-aware/lib/gcp_runtime.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
tosca_definitions_version: tosca_simple_yaml_1_3

imports:
- repository: unfurl
file: tosca_plugins/artifacts.yaml

node_types:
gcp.runtime:
derived_from: unfurl.nodes.Installer.Terraform
Expand Down
4 changes: 4 additions & 0 deletions examples/unfurl-aware/lib/os_compute.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
tosca_definitions_version: tosca_simple_yaml_1_3

imports:
- repository: unfurl
file: tosca_plugins/artifacts.yaml

node_types:
os.compute:
derived_from: unfurl.nodes.Installer.Terraform
Expand Down
2 changes: 1 addition & 1 deletion examples/unfurl-aware/scripts/configuration.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TEMPLATE_NAME="aware"
VINTNER="yarn cli"
VINTNER="node ../../../build/cli/index.js"
DEPLOYMENT_VARIANT="cloud"
2 changes: 1 addition & 1 deletion src/assets/scripts/install-unfurl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ cd "${VENV_DIR}"
python3 -m venv .venv && . .venv/bin/activate

# Install Unfurl
pip install unfurl==0.9.1 openstacksdk==0.61 python-openstackclient==6.0.0 ansible==4.10.0
pip install unfurl==1.0.0 openstacksdk==0.61 python-openstackclient==6.0.0 ansible==4.10.0
1 change: 0 additions & 1 deletion src/resolver/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ export default class Transformer {
this.clean(definition)

// Minimize
// TODO: is this dirty?
if (
!check.isString(definition) &&
Object.keys(definition).length === 1 &&
Expand Down

0 comments on commit 3543994

Please sign in to comment.