Skip to content

Commit

Permalink
Add demo workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jonlamb-gh committed Mar 10, 2023
1 parent d140de7 commit d80dbca
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Demo
on: [workflow_dispatch]

env:
MODALITY_URL: "http://localhost:14181/v1/"
MODALITY_WORKSPACE: "demo"

jobs:
demo:
name: Demo System
timeout-minutes: 30
runs-on: ubuntu-22.04
steps:
- name: Print Environment
run: |
echo "GITHUB_WORKFLOW=$GITHUB_WORKFLOW"
echo "GITHUB_RUN_ID=$GITHUB_RUN_ID"
echo "GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER"
echo "GITHUB_JOB=$GITHUB_JOB"
echo "GITHUB_ACTION=$GITHUB_ACTION"
echo "GITHUB_ACTOR=$GITHUB_ACTOR"
echo "GITHUB_REF=$GITHUB_REF"
- name: Checkout Sources
uses: actions/checkout@v3

- name: Install Auxon Packages
run: |
wget --no-verbose --quiet https://get.keygen.sh/auxon-io/auxon.deb -O /tmp/auxon.deb
sudo apt-get install -y /tmp/auxon.deb
sudo apt-get update
sudo apt-get install -y --no-install-recommends modalityd modality-client modality-reflector bridge-utils
- name: Setup Modality Server
run: |
sudo systemctl stop modalityd
echo 'license-key = "'"${{secrets.MODALITY_LICENSE_KEY}}"'"' | sudo tee -a /etc/modalityd/config.toml
sudo systemctl start modalityd
sudo systemctl status modalityd --no-pager --full
- name: Setup Initial Modality Configuration
run: |
modality config --modalityd ${{env.MODALITY_URL}}
modality user create admin
modality user create --use ci
modality user mint-auth-token --allow-http-api --allow-ingest --allow-mutation /tmp/auth-token
echo "MODALITY_AUTH_TOKEN=$(cat /tmp/auth-token)" >> $GITHUB_ENV
modality workspace create --use ${{env.MODALITY_WORKSPACE}} config/workspace.toml
- name: Update Reflector Plugins
run: |
sudo wget --no-verbose --quiet https://github.com/auxoncorp/modality-ctf-plugins/releases/latest/download/modality-lttng-live-collector -O /usr/lib/modality-reflector-plugins/collectors/modality-lttng-live-collector
sudo wget --no-verbose --quiet https://github.com/auxoncorp/modality-trace-recorder-plugin/releases/latest/download/modality-trace-recorder-tcp-collector -O /usr/lib/modality-reflector-plugins/collectors/modality-trace-recorder-tcp-collector
- name: Configure Modality Client
env:
MODALITY_AUTH_TOKEN: ${{env.MODALITY_AUTH_TOKEN}}
run: |
modality config --modalityd ${{env.MODALITY_URL}}
modality workspace use ${{env.MODALITY_WORKSPACE}}
- name: Run System
env:
MODALITY_AUTH_TOKEN: ${{env.MODALITY_AUTH_TOKEN}}
DEMO_HEADLESS: 1
run: |
sudo ./scripts/setup-network.sh &
sleep 1
./scripts/run-until-contact.sh
- name: Inspect Data
env:
MODALITY_AUTH_TOKEN: ${{env.MODALITY_AUTH_TOKEN}}
run: |
modality segment list
modality workspace list
modality workspace inspect ${{env.MODALITY_WORKSPACE}}

0 comments on commit d80dbca

Please sign in to comment.