Skip to content

Instantly share code, notes, and snippets.

@rzezeski
Created December 8, 2021 17:33
Show Gist options
  • Save rzezeski/b5d607638281a8fde83529150de60278 to your computer and use it in GitHub Desktop.
Save rzezeski/b5d607638281a8fde83529150de60278 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -eu
#OMICRON_HOME=~/oxidecomputer/omicron
OMICRON_HOME=~/omi-integration-2/omicron
MY_ORG=all-lucky-sevens
MY_PROJ=remake
trap "kill 0" EXIT
pushd $OMICRON_HOME
# Build the "packaging" binary.
echo "=== BUILD PACKAGING BINARY START"
cargo build --release --package omicron-package --bin omicron-package
echo "=== BUILD PACKAGING BINARY END"
# Build all the packages describes in omicron/package-manifest.toml.
# This includes Sled Agent, Nexus, Oximeter, Propolis Server.
echo "=== BUILD PACKAGES START"
./target/release/omicron-package package
echo "=== BUILD PACKAGES END"
# Run the databases in the background.
echo "=== RUN DATABASES START"
cargo run --bin=omicron-dev -- db-run &> /dev/null &
cargo run --bin=omicron-dev -- ch-run &> /dev/null &
echo "=== RUN DATABASES END"
# Installs all the built services to your machine (within /opt/oxide),
# *starts* Sled Agent. Sled Agent unpacks/starts all other services.
echo "=== INSTALL SERVICES START"
pfexec ./target/release/omicron-package install
echo "=== INSTALL SERVICES END"
echo "Sled Agent and Nexus Online"
sleep 12
echo "=== CREATE ORGS + PROJECTS START"
./tools/oxapi_demo organization_create_demo $MY_ORG
./tools/oxapi_demo project_create_demo $MY_ORG $MY_PROJ
echo "=== CREATE ORGS + PROJECTS END"
echo "RUNNING OMICRONG FROM: $OMICRON_HOME"
wait
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment