Compare commits

...

5 Commits

Author SHA1 Message Date
Tom Alexander
6bde027c48
Add a script to update git aurutil packages. 2023-07-14 14:29:03 -04:00
Tom Alexander
cd6d8f3f69
Switch to using bash traps to destroy bhyve vms. 2023-07-14 14:28:36 -04:00
Tom Alexander
fb759470f5
Make poudboot service file not hang startup by launching with daemon. 2023-07-14 14:28:36 -04:00
Tom Alexander
c61d4bdc75
Update kx and ks aliases to use kubeswitch. 2023-07-14 14:28:36 -04:00
Tom Alexander
41397cb7d5
Update rust. 2023-07-14 14:28:35 -04:00
9 changed files with 72 additions and 35 deletions

View File

@ -73,25 +73,25 @@
- sudo
- doas
- users
# - package_manager
# - zfs
# - zrepl
# - zsh
# - network
# - sshd
# - base
- package_manager
- zfs
- zrepl
- zsh
- network
- sshd
- base
- firewall
# - cpu
# - ntp
# - nvme
# - hosts
# - build
# - devfs
# - jail
# - bhyve
# - wireguard
# - plainmacs
# - mrmanager
- cpu
- ntp
- nvme
- hosts
- build
- devfs
- jail
- bhyve
- wireguard
- emacs
- mrmanager
- hosts: admin_git:public_dns
vars:

View File

@ -35,6 +35,33 @@ if [ "$VERBOSE" = "YES" ]; then
set -x
fi
############## Setup #########################
function cleanup {
for vm in "${vms[@]}"; do
log "Destroying bhyve vm $f"
bhyvectl "--vm=$vm" --destroy
log "Destroyed bhyve vm $f"
done
}
vms=()
for sig in EXIT INT QUIT HUP TERM; do
trap "set +e; cleanup" "$sig"
done
function die {
local status_code="$1"
shift
(>&2 echo "${@}")
exit "$status_code"
}
function log {
(>&2 echo "${@}")
}
############## Program #########################
function main {
local cmd="$1"
shift 1
@ -122,6 +149,7 @@ function start_vm {
if [ "$VNC_ENABLE" = "YES" ]; then
additional_args+=("-s" "29,fbuf,tcp=$VNC_LISTEN,w=1920,h=1080")
fi
vms+=("$name")
while true; do
set -x
set +e
@ -156,9 +184,6 @@ function start_vm {
break
fi
done
bhyvectl "--vm=$name" --destroy
echo "Destroyed bhyve vm."
}
function detect_available_link {

View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
#
# Update packages in aurutils with -git suffix.
#
# This has to be done manually because aurutils does not check for new git commits every time we run an update.
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pacman -Slq custom | grep -E -- '-git$' | xargs aurutils-sync --no-ver --reset "$@"

View File

@ -113,6 +113,8 @@
dest: /usr/local/bin/aurutils-purge
- src: aurutils-sync
dest: /usr/local/bin/aurutils-sync
- src: aurutils-update-devel-packages
dest: /usr/local/bin/
- name: build aurutils inside aurutils
become_user: "{{ build_user.name }}"

View File

@ -4,4 +4,4 @@ set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
exec kubens "$@"
exec switcher namespace "$@"

View File

@ -4,4 +4,4 @@ set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
exec kubectx "$@"
exec switcher "$@"

View File

@ -21,7 +21,6 @@
name:
- yamllint
- stern
- kubectx
- kubeswitch
- flux-scm
- kubectl-minio

View File

@ -1,23 +1,24 @@
#!/bin/sh
# /usr/local/etc/rc.d/poudboot
#
# REQUIRE: FILESYSTEM kld
# PROVIDE: poudboot
# REQUIRE: FILESYSTEM kld
# AFTER: netif
# KEYWORD: shutdown
. /etc/rc.subr
name=poudboot
rcvar=${name}_enable
start_cmd="${name}_start"
stop_cmd="${name}_stop"
desc="Poudriere Loop"
load_rc_config $name
poudboot_start() {
PATH="${PATH}:/usr/local/bin" /usr/local/bin/poudboot start
}
: ${poudboot_enable:=YES}
poudboot_stop() {
PATH="${PATH}:/usr/local/bin" /usr/local/bin/poudboot stop
}
command=/usr/sbin/daemon
pidfile=/var/run/${name}.pid
command_args="-p $pidfile -u root -f -S -T $name poudboot start"
export PATH="${PATH}:/usr/local/bin"
run_rc_command "$1"

View File

@ -1,2 +1,2 @@
# Check that rust-analyzer is valid for date on https://rust-lang.github.io/rustup-components-history/
rust_date: "2023-04-14"
rust_date: "2023-07-13"