Skip to content

Instantly share code, notes, and snippets.

@hartzell
hartzell / step-by-step.md
Last active April 24, 2019 02:10
Spack singularity package debugging session

I've fetched/merged your branch and am at commit ec296438fd41b18ea310ea83acf534e8f295a25a.

Here is the definition of source_path for a stage:

Here's the interesting bit, it's returning the first thing that it finds in the output of os.listdir that is a directory (order of things returned by listdir is unspecified):

@hartzell
hartzell / doit.sh
Created February 4, 2019 03:38
Quick/dirty poudriere config to build audio/logitechmediaserver
cp usr_local_etc_poudriere.d_make.conf /usr/local/etc/poudriere.d/make.conf
cp usr_local_etc_poudriere.conf /usr/local/etc/poudriere.conf
echo 'audio/logitechmediaserver' > ./pkglist
sudo mkdir /usr/ports/distfiles
sudo zfs create zroot/poudriere
sudo poudriere jail -c -j 11amd64 -v 11.2-RELEASE
sudo poudriere ports -c -p local
sudo poudriere bulk -f ./pkglist -j 11amd64 -p local
@hartzell
hartzell / doit.sh
Created February 4, 2019 03:38
Quick/dirty poudriere config to build audio/logitechmediaserver
cp usr_local_etc_poudriere.d_make.conf /usr/local/etc/poudriere.d/make.conf
cp usr_local_etc_poudriere.conf /usr/local/etc/poudriere.conf
echo 'audio/logitechmediaserver' > ./pkglist
sudo mkdir /usr/ports/distfiles
sudo zfs create zroot/poudriere
sudo poudriere jail -c -j 11amd64 -v 11.2-RELEASE
sudo poudriere ports -c -p local
sudo poudriere bulk -f ./pkglist -j 11amd64 -p local
@hartzell
hartzell / session.md
Created January 27, 2019 01:37
Adding local networks for Plex in jail
root@helium[/mnt/storage/home/hartzell]# cat /mnt/storage/iocage/jails/plex/root/Plex\ Media\ Server/Preferences.xml
<?xml version="1.0" encoding="utf-8"?>
<Preferences OldestPreviousVersion="1.14.1.5488-cc260c476" MachineIdentifier="7cd0df33-f7a9-48bc-a855-1ea65f46f8b0" ProcessedMachineIdentifier="85517e6e530782f318f9b9b6de5c76baabba18d6" AnonymousMachineIdentifier="514d266b-4d7e-41b0-b1de-935bcc00e5e5" MetricsEpoch="1" allowedNetworks="192.168.42.0/255.255.255.0" AcceptedEULA="1" FriendlyName="helium-plex" PublishServerOnPlexOnlineKey="1" LastAutomaticMappedPort="0"/>
@hartzell
hartzell / app-init.sh
Created January 16, 2019 23:42
A script to initialize a user's environment to use a tree of Spack packages
# -*- mode: sh -*-
# vim: set ft=sh
#
# The typical user's .bash_profile would include:
#
# APPS_MODULES="emacs git htop the-silver-searcher" # and etc....
# source /moose/apps/init.sh
#
# Even setting APPS_MODULES is optional if user is ok with default list...
#
@hartzell
hartzell / aurora_cluster.tf
Last active April 6, 2020 16:11 — forked from sandcastle/aurora_cluster.tf
Creates a AWS RDS Aurora Cluster with Terraform
########################
## Variables
########################
variable "environment_name" {
description = "The name of the environment"
}
variable "vpc_id" {
@hartzell
hartzell / singularity-fix-suid.md
Last active July 6, 2018 23:36
Touch up a non-root singularity install

These steps will touch up a non-root install...

libexec_bin=$(spack location -i singularity)/libexec/singularity/bin
suid_files=(action-suid start-suid mount-suid)

for f in "${suid_files[@]}"
do
    sudo chown root:root "${libexec_bin}/${f}"
 sudo chmod 4755 "${libexec_bin}/${f}"
@hartzell
hartzell / spack-install.sh
Last active July 6, 2018 21:12
A script to configure a spack tree and build some things.
#!/bin/sh
set -e
# ask the spack executable the location of root of its tree
export SPACK_ROOT=$(spack location -r)
# having an app tree set up messes up the build. Clear the field.
if [[ $(type -t module) == "function" ]]; then
module purge
fi
@hartzell
hartzell / configparser-is-broken.md
Last active June 20, 2018 17:38
The python module "configparser" is broken.

Importing configparser

The backported configparser is a P.I.T.A..

I tripped across this when trying to use py-jupyter-notebook with my Spack PR that adds dependencies via site.addsitedir(). It fails immediately. That package appears to work if you use "normal" Spack and PYTHONPATH, but it turns out that the only bit that uses configparser is jupyter-nbconvert and that does fail.

@hartzell
hartzell / script-console-job-definition.groovy
Created April 15, 2018 20:56
Demonstration of defining a job interactively from the Jenkins script console
// I end up recreating this every time I need it, so, notes...
// This will run in the Jenkins script console and define a job.
//
import javaposse.jobdsl.dsl.DslScriptLoader
import javaposse.jobdsl.plugin.JenkinsJobManagement
def workspace = new File('.')
def jobManagement = new JenkinsJobManagement(System.out, [:], workspace)