Skip to content

Instantly share code, notes, and snippets.

@treydock
treydock / deployment.yaml
Last active April 3, 2024 16:30
Harvest deployment example
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: harvest-demo
namespace: harvesttest
spec:
selector:
matchLabels:
app: harvest-demo
#!/bin/bash
#
# interactive: Obtain interactive shell with slurm allocation
#
# Basically simulates:
#
# salloc -n1 srun --x11 --pty bash
# defaults
readonly DEF_NUM_NODES=1
@treydock
treydock / epilog-metrics.sh
Last active October 11, 2021 15:42
SLURM GPU metrics
#!/bin/bash
source /etc/slurm/prolog-epilog.config
GPU_INFO_PROM=${METRICS_DIR}/slurm_job_gpu_info-${SLURM_JOB_ID}.prom
rm -f $GPU_INFO_PROM
exit 0
@treydock
treydock / configmap.yaml
Last active July 27, 2021 12:40
pod-groups-validation
apiVersion: v1
kind: ConfigMap
metadata:
namespace: k8-ldap-configmap
name: user-gids-map
data:
user-tdockendorf: '[5356, 5509]'
@treydock
treydock / Keycloak Client
Created June 9, 2021 14:00
XDMOD and Keycloak
{
"id" : "43fc6a27-d53c-4593-87ab-ef1730f82b89",
"clientId" : "<XDMOD Client ID>",
"surrogateAuthRequired" : false,
"enabled" : true,
"alwaysDisplayInConsole" : false,
"clientAuthenticatorType" : "client-secret",
"redirectUris" : [ "https://<XDMOD server name>/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp" ],
"webOrigins" : [ "https://<XDMOD server name>" ],
"notBefore" : 0,
<VirtualHost *:443>
ServerName prometheus.DOMAIN
<Location "/">
<RequireAny>
Require claim groups:oscall
</RequireAny>
AuthType openid-connect
</Location>
var app_ident = require('../app_ident.js');
var map_helpers = require('../map_helpers.js');
module.exports = function(config) {
var appident = app_ident(config.applicationDefn);
var getHardwareConfig = function (setting, default_val) {
var val = config.hardware;
var props = setting.split('.');
for (let i = 0; i < props.length; i++) {
{
"resources": [
{
"resource": "owens",
"resource_id": 1,
"enabled": true,
"datasetmap": "prometheus-osc",
"hardware": {
"gpfs": "scratch",
"network": "eth0"
{
// Configuration settings for job data input
// The database configuration below assumes everything on the same host and
// XDMoD is installed on the host too.
//
// It is not necessary for all databases to run locally. A more complex
// configuration could have multiple hosts and different credentials for
// each DB.
"xdmodroot": "/etc/xdmod",
"datawarehouse": {
@treydock
treydock / main.go
Created November 11, 2020 16:08
Test SSH expect
package main
import (
"log"
"os"
"regexp"
"time"
expect "github.com/google/goexpect"
)