Skip to content

Commit

Permalink
fix night workflow: upgrade openstacksdk at xopera (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
milesstoetzner committed Sep 25, 2024
1 parent 9d8ec3a commit 4345ec4
Show file tree
Hide file tree
Showing 40 changed files with 378 additions and 51 deletions.
3 changes: 0 additions & 3 deletions .github/actions/vintner-resolve/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ inputs:
preset:
required: false

orchestrator:
required: true

runs:
using: 'composite'
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/case-study-unfurl-technology.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# TODO: migrate this

name: Case Study "Unfurl Technology"
on:
workflow_dispatch:

concurrency: unfurl-technology
jobs:
###################################################
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/night.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# We dot not introduce one big "vintner-case-study" action due to better logging.defaults:
# See https://github.com/orgs/community/discussions/21276

# TODO: fix OpenStack problem when using xOpera

name: Night
on:
workflow_dispatch:
Expand All @@ -14,6 +12,7 @@ on:
push:
branches:
- fix-night-workflow

concurrency: night
jobs:
###################################################
Expand Down Expand Up @@ -148,7 +147,6 @@ jobs:
xopera-motivation-dev:
name: xOpera Motivation Dev
runs-on: ubuntu-22.04
if: false
env:
ORCHESTRATOR: xopera
EXAMPLE: xopera-motivation
Expand Down Expand Up @@ -217,7 +215,6 @@ jobs:
xopera-motivation-prod:
name: xOpera Motivation Prod
runs-on: ubuntu-22.04
if: false
env:
ORCHESTRATOR: xopera
EXAMPLE: xopera-motivation
Expand Down Expand Up @@ -413,7 +410,6 @@ jobs:
xopera-pruning-static:
name: xOpera Pruning Static
runs-on: ubuntu-22.04
if: false
concurrency: xopera-pruning-static
env:
ORCHESTRATOR: xopera
Expand Down Expand Up @@ -483,7 +479,6 @@ jobs:
xopera-pruning-elastic:
name: xOpera Pruning Elastic
runs-on: ubuntu-22.04
if: false
concurrency: xopera-pruning-elastic
env:
ORCHESTRATOR: xopera
Expand Down Expand Up @@ -548,7 +543,6 @@ jobs:
xopera-pruning-mode-static:
name: xOpera Pruning Mode "Consistent Loose" Static
runs-on: ubuntu-22.04
if: false
concurrency: xopera-pruning-static
env:
ORCHESTRATOR: xopera
Expand Down Expand Up @@ -618,7 +612,6 @@ jobs:
xopera-pruning-mode-elastic:
name: xOpera Pruning Mode "Consistent Loose" Elastic
runs-on: ubuntu-22.04
if: false
concurrency: xopera-pruning-elastic
env:
ORCHESTRATOR: xopera
Expand Down Expand Up @@ -680,7 +673,9 @@ jobs:
#
###################################################

# TODO: Disabled for now. Out of nowhere, github workflow cant deploy the application (works on my machine)
unfurl-artifacts-community:
if: false
name: Unfurl Artifacts Community
runs-on: ubuntu-22.04
env:
Expand Down Expand Up @@ -811,7 +806,9 @@ jobs:
#
###################################################

# TODO: Disabled for now. Out of nowhere, github workflow cant deploy the application (works on my machine)
unfurl-aware-local:
if: false
name: Unfurl Aware Local
runs-on: ubuntu-22.04
env:
Expand Down
2 changes: 1 addition & 1 deletion examples/unfurl-artifacts/scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ $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 validate --instance ${TEMPLATE_NAME} --inputs ${TEMPLATE_DIR}/deployment-inputs.ignored.yaml
# $VINTNER instances deploy --instance ${TEMPLATE_NAME} --inputs ${TEMPLATE_DIR}/deployment-inputs.ignored.yaml
$VINTNER instances deploy --instance ${TEMPLATE_NAME} --inputs ${TEMPLATE_DIR}/deployment-inputs.ignored.yaml
Empty file modified examples/unfurl-artifacts/scripts/undeploy.sh
100644 → 100755
Empty file.
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="node ../../../build/cli/index.js"
DEPLOYMENT_VARIANT="cloud"
DEPLOYMENT_VARIANT="local"
2 changes: 1 addition & 1 deletion examples/unfurl-aware/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 --no-venv
$VINTNER orchestrators init unfurl
$VINTNER orchestrators enable --orchestrator unfurl
$VINTNER orchestrators attest --orchestrator unfurl
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@
- name: Set attributes
set_stats:
data:
private_address: '{{ server_info.server.private_v4 }}'
public_address: '{{ server_info.server.public_v4 }}'
private_address: '{{ server_info.server.addresses[network][0].addr }}'
public_address: '{{ server_info.server.addresses[network][0].addr }}'
id: '{{ server_info.server.id }}'

- name: Create temporary inventory for ssh wait
add_host:
name: server
groups: vms
ansible_host: '{{ server_info.server.public_v4 }}'
ansible_host: '{{ server_info.server.addresses[network][0].addr }}'
ansible_user: '{{ ssh_user }}'
ansible_ssh_private_key_file: '{{ ssh_key_file }}'
ansible_ssh_common_args: >
Expand Down
11 changes: 11 additions & 0 deletions examples/xopera-motivation/scripts/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /usr/bin/bash
set -e

# Set working directory
cd "$(dirname "$0")"

# Load configuration
source configuration.sh

# Clean
$VINTNER setup clean --force
11 changes: 11 additions & 0 deletions examples/xopera-motivation/scripts/code.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /usr/bin/bash
set -e

# Set working directory
cd "$(dirname "$0")"

# Load configuration
source configuration.sh

# Open VS Code
$VINTNER instances code --instance ${TEMPLATE_NAME}
5 changes: 5 additions & 0 deletions examples/xopera-motivation/scripts/configuration.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TEMPLATE_NAME="xopera-motivation"
VINTNER="node ../../../build/cli/index.js"
#VINTNER="../../../task vintner"
ORCHESTRATOR="xopera"
VARIANT="dev"
36 changes: 36 additions & 0 deletions examples/xopera-motivation/scripts/configuration.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#! /usr/bin/bash
set -e

# Set working directory
cd "$(dirname "$0")"

# Load configuration
source configuration.env

# Check that TEMPLATE_NAME is defined
if [[ -z ${TEMPLATE_NAME} ]]; then
echo "TEMPLATE_NAME is not defined"
exit 1
fi

# Check that VINTNER is defined
if [[ -z ${VINTNER} ]]; then
echo "VINTNER is not defined"
exit 1
fi


# Check that VARIANT is defined
if [[ -z ${VARIANT} ]]; then
echo "VARIANT is not defined"
exit 1
fi

# Check that ORCHESTRATOR is defined
if [[ -z ${ORCHESTRATOR} ]]; then
echo "ORCHESTRATOR is not defined"
exit 1
fi

# Set template directory
TEMPLATE_DIR=$(readlink -f $(dirname $0)/../)
11 changes: 11 additions & 0 deletions examples/xopera-motivation/scripts/continue.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /usr/bin/bash
set -e

# Set working directory
cd "$(dirname "$0")"

# Load configuration
source configuration.sh

# Continue deployment
$VINTNER instances continue --instance ${TEMPLATE_NAME} --force
12 changes: 0 additions & 12 deletions examples/xopera-motivation/scripts/demo-prod.sh

This file was deleted.

17 changes: 0 additions & 17 deletions examples/xopera-motivation/scripts/demo.sh

This file was deleted.

15 changes: 15 additions & 0 deletions examples/xopera-motivation/scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#! /usr/bin/bash
set -e

# Set working directory
cd "$(dirname "$0")"

# Load configuration
source configuration.sh

$VINTNER template pull --dir ${TEMPLATE_DIR}
$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 ${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
8 changes: 8 additions & 0 deletions examples/xopera-motivation/scripts/enrich.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

# Load configuration
source configuration.sh

# Enrich
$VINTNER template enrich --template ${TEMPLATE_DIR}/variable-service-template.yaml --output ${TEMPLATE_DIR}/enriched.yaml
9 changes: 9 additions & 0 deletions examples/xopera-motivation/scripts/pull.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /usr/bin/bash
set -e

# Load configuration
source configuration.sh

# Pull dependencies
$VINTNER template pull --dir ${TEMPLATE_DIR}

13 changes: 13 additions & 0 deletions examples/xopera-motivation/scripts/quality.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#! /usr/bin/bash
set -e

# Load configuration
source configuration.sh

# Quality
for dir in ../tests/*/;
#for dir in "../tests/gcp";
do
dir=$(basename $dir)
echo "${dir}: $($VINTNER template quality --template ${TEMPLATE_DIR}/variable-service-template.yaml --inputs ${TEMPLATE_DIR}/tests/${dir}/inputs.yaml)"
done
20 changes: 20 additions & 0 deletions examples/xopera-motivation/scripts/reimport.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! /usr/bin/bash
set -e

# Set working directory
cd "$(dirname "$0")"

# Load configuration
source configuration.sh

$VINTNER instances undeploy --instance ${TEMPLATE_NAME} || true

$VINTNER instances delete --instance ${TEMPLATE_NAME} --force || true
$VINTNER templates delete --template ${TEMPLATE_NAME} || true

$VINTNER template pull --dir ${TEMPLATE_DIR}
$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 ${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
14 changes: 14 additions & 0 deletions examples/xopera-motivation/scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#! /usr/bin/bash
set -e

# Set working directory
cd "$(dirname "$0")"

# Load configuration
source configuration.sh

# Setup
$VINTNER setup init
$VINTNER orchestrators init ${ORCHESTRATOR}
$VINTNER orchestrators enable --orchestrator ${ORCHESTRATOR}
$VINTNER orchestrators attest --orchestrator ${ORCHESTRATOR}
16 changes: 16 additions & 0 deletions examples/xopera-motivation/scripts/swap-lib.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#! /usr/bin/bash
set -e

# Set working directory
cd "$(dirname "$0")"

FS="/c/Users"
if [[ "${OSTYPE}" == "linux-gnu" ]]; then
FS="/home"
fi

# Delete lib in instance
rm -rf ${FS}/stoetzms/.opentosca_vintner/instances/technology-gcp/data/ensemble/lib

# Copy local lib into instance
cp -R ../lib ${FS}/stoetzms/.opentosca_vintner/instances/technology-gcp/data/ensemble
11 changes: 11 additions & 0 deletions examples/xopera-motivation/scripts/undeploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /usr/bin/bash
set -e

# Set working directory
cd "$(dirname "$0")"

# Load configuration
source configuration.sh

# Undeploy application
$VINTNER instances undeploy --instance ${TEMPLATE_NAME}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TEMPLATE_NAME="consistent-loose"
VINTNER="task cli --"
VINTNER="node ../../../build/cli/index.js"
VARIABILITY_PRESET="static"
2 changes: 1 addition & 1 deletion examples/xopera-pruning-consistent-loose/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 xopera --no-venv
$VINTNER orchestrators init xopera
$VINTNER orchestrators enable --orchestrator xopera
$VINTNER orchestrators attest --orchestrator xopera
11 changes: 11 additions & 0 deletions examples/xopera-pruning/scripts/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /usr/bin/bash
set -e

# Set working directory
cd "$(dirname "$0")"

# Load configuration
source configuration.sh

# Clean
$VINTNER setup clean --force
Loading

0 comments on commit 4345ec4

Please sign in to comment.