Skip to content

Commit

Permalink
xopera venv
Browse files Browse the repository at this point in the history
  • Loading branch information
milesstoetzner committed Nov 4, 2023
1 parent 9d8ee72 commit 71fe2f5
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 14 deletions.
83 changes: 73 additions & 10 deletions .github/workflows/night.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,24 @@ jobs:
python-version: 3.10.13
cache: pip

- name: (PREPARE) Install xOpera
run: sudo ./src/assets/scripts/install-xopera.sh
- name: (PREPARE) Cache Unfurl
uses: actions/cache@v3
with:
path: /home/runner/.opera
key: xopera

#- name: (PREPARE) Cache Unfurl
# uses: actions/cache@v3
# with:
# path: /home/runner/.unfurl_home
# key: unfurl-home
- name: (PREPARE) Install xOpera
run: |
mkdir /home/runner/.opera
cd /home/runner/.opera
python3 -m venv .venv && . .venv/bin/activate
pip install --upgrade pip
pip install openstacksdk==0.61 pyyaml==5.3.1 opera==0.6.9
# TODO: ./src/assets/scripts/install-unfurl.sh installs unfurl for root and not for "runner"
- name: (PREPARE) Install Unfurl
run: pip install unfurl==0.9.1

# - name: (PREPARE) Set up Unfurl
# run: yes | unfurl home --init

###################################################
#
# Installation
Expand Down Expand Up @@ -116,6 +118,66 @@ jobs:
- name: (VINTNER) Test resolver
run: vintner setup benchmark --seeds 10 250

###################################################
#
# xOpera Motivation
#
###################################################
- name: (XOPERA-MOTIVATION) Deploy the production variant of xopera-motivation on GCP
run: |
vintner setup clean --force
vintner setup init
vintner orchestrators init xopera --dir /home/runner/.opera
vintner orchestrators enable --orchestrator xopera
vintner orchestrators attest --orchestrator xopera
vintner templates import --template motivation --path examples/xopera-motivation
vintner instances init --instance motivation --template motivation
vintner instances resolve --instance motivation --presets prod
vintner instances validate --instance motivation
cp examples/xopera-motivation/deployment-inputs.example.yaml examples/xopera-motivation/deployment-inputs.ignored.yaml
sed -i "/gcp_service_account_file:/c\gcp_service_account_file: $(pwd)/gcp-credentials.json" examples/xopera-motivation/deployment-inputs.ignored.yaml
vintner instances deploy --instance motivation --inputs examples/xopera-motivation/deployment-inputs.ignored.yaml
- name: (XOPERA-MOTIVATION) Test the production variant of xopera-motivation on GCP
run: curl --fail-with-body https://application-dot-stoetzms-387808.ey.r.appspot.com

- name: (XOPERA-MOTIVATION) Undeploy the production variant of xopera-motivation on GCP
run: vintner instances undeploy --instance motivation
if: always()

###################################################
#
# xOpera Pruning
#
###################################################

- name: (XOPERA-PRUNING) Deploy the elastic variant of xopera-pruning on GCP
run: |
vintner setup clean --force
vintner setup init
vintner orchestrators init xopera --dir /home/runner/.opera
vintner orchestrators enable --orchestrator xopera
vintner orchestrators attest --orchestrator xopera
vintner templates import --template pruning --path examples/xopera-pruning
vintner instances init --instance pruning --template pruning
vintner instances resolve --instance pruning --presets elastic
vintner instances validate --instance pruning
echo "gcp_service_account_file: $(pwd)/gcp-credentials.json" > examples/xopera-pruning/deployment-inputs.ignored.yaml
vintner instances deploy --instance pruning --inputs examples/xopera-pruning/deployment-inputs.ignored.yaml
- name: (XOPERA-PRUNING) Test the elastic variant of xopera-pruning on GCP
run: curl --fail-with-body https://shop-dot-stoetzms-387808.ey.r.appspot.com

- name: (XOPERA-PRUNING) Undeploy the elastic variant of xopera-pruning on GCP
run: vintner instances undeploy --instance pruning
if: always()

###################################################
#
# Unfurl Artifacts
Expand All @@ -129,6 +191,7 @@ jobs:
vintner orchestrators init unfurl --no-venv
vintner orchestrators enable --orchestrator unfurl
vintner orchestrators attest --orchestrator unfurl
vintner templates import --template artifacts --path examples/unfurl-artifacts
vintner instances init --instance artifacts --template artifacts
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/orchestrators.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ vintner orchestrators attest --orchestrator xopera-wsl
## Unfurl

You can install Unfurl using the following command.
This will install Unfurl v0.7.1 system-wide using pip.
This will install Unfurl v0.9.1 system-wide using pip.
For a manual installation see [the documentation](https://docs.unfurl.run/README.html#installation){target=_blank}.

```shell linenums="1"
Expand Down Expand Up @@ -105,4 +105,4 @@ The orchestrators provide more features than we integrated, thus, checkout [TOSS
[#257](https://github.com/xlab-si/xopera-opera/issues/257){target=_blank},
[#258](https://github.com/xlab-si/xopera-opera/issues/258){target=_blank}, and
[#261](https://github.com/xlab-si/xopera-opera/issues/261){target=_blank}.
- xOpera deletes attribute assignments during updates, see [issue #262](https://github.com/xlab-si/xopera-opera/issues/262){target=_blank}.
- xOpera deletes attribute assignments during updates, see [issue #262](https://github.com/xlab-si/xopera-opera/issues/262){target=_blank}.
3 changes: 1 addition & 2 deletions src/assets/scripts/install-unfurl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ if which unfurl &>/dev/null; then
exit 0
fi

pip install unfurl==0.7.1
yes | unfurl home --init
pip install unfurl==0.9.1

0 comments on commit 71fe2f5

Please sign in to comment.