-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d140de7
commit d80dbca
Showing
1 changed file
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |