Skip to content

Instantly share code, notes, and snippets.

View duncan-brown's full-sized avatar

Duncan Brown duncan-brown

View GitHub Profile
## Keys
[root@sugwg-scitokens conf]# openssl pkcs12 -export -out hostcert.pkcs12 -in hostcert.pem -inkey hostkey.pem
Enter Export Password:
Verifying - Enter Export Password:
[root@sugwg-scitokens conf]# keytool -genkey -keyalg RSA -alias empty -keystore keystore.jks
Enter keystore password:
Re-enter new password:
What is your first and last name?
duncan-brown /
Last active September 19, 2019 02:05
scitokens server installation

Setting up a scitokens server

Install Java

yum install java-1.8.0-openjdk.x86_64

Install Tomcat

duncan-brown /
Last active April 19, 2019 02:43
COmanage Docker Container

Setting up COmanage Using a Docker Image


As root, stop apache as COmanage will hijack these ports:

systemctl stop httpd
systemctl disable httpd
# max_iterations sleep_time
10 5
duncan-brown / my.input
Last active February 15, 2019 20:52
Condor checkpointing example
# max_iterations sleep_time
5 60
duncan-brown / token-test.sub
Created January 18, 2019 18:42
Condor submit script for stashcp test
universe = vanilla
output = scitokens_test.$(cluster).$(process).out
error = scitokens_test.$(cluster).$(process).err
log = scitokens_test.$(cluster).log
executable =
transfer_executable = True
request_memory = 100M
duncan-brown /
Last active January 18, 2019 19:56
Script to test stashcp read and writes
#!/bin/bash -v
# read from xrootd
python /home/dbrown/bin/ --cache="" --token=${_CONDOR_CREDS}/scitoken.use --debug stash:///osg/sugwg/user/dbrown/hello.txt `pwd`/hello.txt
cat hello.txt
# create a test file
echo "Hello, World! I am ${TMPFILE}" > ${TMPFILE}.in
duncan-brown /
Last active January 28, 2022 02:59
Description of how SciTokens was set up in Syracuse

Syracuse SciTokens Setup

Install software

Switch to Condor 8.8 in /etc/yum.repos.d/htcondor-stable-rhel7.repo then upgrade Condor with

systemctl stop condor
yum upgrade condor
systemctl start condor
duncan-brown /
Last active October 4, 2018 14:05
Modified version of HTCondor MPI scripts for pycbc_inference. Put the file in ${HOME}/bin and adjust the SSHD_SH variable in openmpiscript to give it the explicit path as ${HOME} may not be expanded properly. Even better, list it as one of the input files to be transferred.
#! /bin/bash -v
set -x
echo "Using ${pycbc_config_file} as configuration file"
echo "Writing output to ${pycbc_output_file}"