Skip to content

Instantly share code, notes, and snippets.

@iliana
Created October 11, 2023 00:08
Show Gist options
  • Save iliana/ee99c93fef65e9468e03a18fff737eb2 to your computer and use it in GitHub Desktop.
Save iliana/ee99c93fef65e9468e03a18fff737eb2 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -euxo pipefail
cd "$HOME"/git/omicron
source "$HOME"/git/omicron/env.sh
if ! [[ out/iliana-prereqs-run -nt .git/logs/HEAD ]]; then
./tools/install_prerequisites.sh -y
touch out/iliana-prereqs-run
fi
[[ -f ./target/release/omicron-package ]] && { yes || :; } | pfexec ./target/release/omicron-package uninstall
for swap in $(swap -l | awk '/^\/dev\/zvol\/dsk\/oxi_/ { print $1 }'); do
pfexec swap -d "$swap"
done
if mount | grep -q ^/var/fm/fmd; then
pfexec svcadm disable fmd
pfexec umount /var/fm/fmd
pfexec svcadm enable fmd
fi
pfexec ./tools/destroy_virtual_hardware.sh
GATEWAY_IP=192.168.1.199 \
PXA_START=192.168.1.20 \
PXA_END=192.168.1.90 \
PHYSICAL_LINK=fake_external_stub0 \
pfexec ./tools/create_virtual_hardware.sh
./tools/create_self_signed_cert.sh
cargo build --release --bin omicron-package
./target/release/omicron-package -t default target create -i standard -m non-gimlet -s softnpu -r single-sled
./target/release/omicron-package package
pfexec ./target/release/omicron-package install
cargo run --release -p end-to-end-tests --bin bootstrap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment