Skip to content

Instantly share code, notes, and snippets.

@enolfc
Created April 18, 2017 12:53
Show Gist options
  • Save enolfc/89efee6b6a76992339d38b366d989ae4 to your computer and use it in GitHub Desktop.
Save enolfc/89efee6b6a76992339d38b366d989ae4 to your computer and use it in GitHub Desktop.
ELIXIR VO setup on macOS
#!/bin/bash
# Configure vo.elixir-europe.org on macos into your $HOME directory
# use voms-proxy-init with --vomsdir $HOME/.voms/vomsdir and --certdir $HOME/.voms/certificates
brew install fetch-crl voms
BASE_DIR=$HOME/.voms
# Trust anchors
mkdir -p $BASE_DIR/certificates
# CAs to download: Classic and IOTA (RCAuth)
CA_BUNDLE="https://dist.eugridpma.info/distribution/igtf/current/accredited/igtf-preinstalled-bundle-classic.tar.gz https://dist.eugridpma.info/distribution/igtf/current/accredited/igtf-preinstalled-bundle-iota.tar.gz"
for CA in $CA_BUNDLE; do
curl -s $CA | tar -xz -C $BASE_DIR/certificates
done
# Update the crls
/usr/local/sbin/fetch-crl -v -l $BASE_DIR/certificates
# VOMS .lsc files
mkdir -p $BASE_DIR/vomsdir/vo.elixir-europe.org
cat > $BASE_DIR/vomsdir/vo.elixir-europe.org/voms1.grid.cesnet.cz.lsc << EOF
/DC=org/DC=terena/DC=tcs/C=CZ/ST=Hlavni mesto Praha/L=Praha 6/O=CESNET/CN=voms1.grid.cesnet.cz
/C=NL/ST=Noord-Holland/L=Amsterdam/O=TERENA/CN=TERENA eScience SSL CA 3
EOF
cat > $BASE_DIR/vomsdir/vo.elixir-europe.org/voms2.grid.cesnet.cz.lsc << EOF
/DC=org/DC=terena/DC=tcs/C=CZ/ST=Hlavni mesto Praha/L=Praha 6/O=CESNET/CN=voms2.grid.cesnet.cz
/C=NL/ST=Noord-Holland/L=Amsterdam/O=TERENA/CN=TERENA eScience SSL CA 3
EOF
# VOMS configuration
cat > $HOME/.voms/vomses << EOF
"vo.elixir-europe.org" "voms2.grid.cesnet.cz" "15032" "/DC=org/DC=terena/DC=tcs/C=CZ/ST=Hlavni mesto Praha/L=Praha 6/O=CESNET/CN=voms2.grid.cesnet.cz" "vo.elixir-europe.org"
"vo.elixir-europe.org" "voms1.grid.cesnet.cz" "15032" "/DC=org/DC=terena/DC=tcs/C=CZ/ST=Hlavni mesto Praha/L=Praha 6/O=CESNET/CN=voms1.grid.cesnet.cz" "vo.elixir-europe.org"
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment