diff --git a/slurm-gcp/Makefile b/slurm-gcp/Makefile index 085c39a..4210f20 100644 --- a/slurm-gcp/Makefile +++ b/slurm-gcp/Makefile @@ -1,20 +1,33 @@ # -# # I2 Capstone Project # Allissa Dillman, Ananya Ravipati, Bala Desinghu, Tony Cricell, John Hicks, Timothy Middelkoop # -.PHONY: init plan apply destroy -init: +# Location of https://github.com/SchedMD/slurm-gcp scripts folder +SCRIPTS=../../slurm-gcp/scripts + +.PHONY: scripts init validate plan apply destroy + +scripts: ${SCRIPTS}/custom-controller-install ${SCRIPTS}/custom-compute-install + +# Customizations of the build scripts. +${SCRIPTS}/custom-controller-install: scripts/custom-controller-install.sh + ln -sfn $$PWD/scripts/custom-controller-install.sh ${SCRIPTS}/custom-controller-install + +# Login node uses the custom-compute-install script +${SCRIPTS}/custom-compute-install: scripts/custom-compute-install.sh + ln -sfn $$PWD/scripts/custom-compute-install.sh ${SCRIPTS}/custom-compute-install + +init: scripts terraform init -validate: +validate: scripts terraform validate -plan: +plan: scripts terraform plan -var-file=basic.tfvars -var-file=local.tfvars -out terraform.tfplan -apply: +apply: scripts terraform apply -var-file=basic.tfvars -var-file=local.tfvars -auto-approve destroy: diff --git a/slurm-gcp/scripts/custom-compute-install.sh b/slurm-gcp/scripts/custom-compute-install.sh new file mode 100644 index 0000000..da094f5 --- /dev/null +++ b/slurm-gcp/scripts/custom-compute-install.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +## Run on the CLASS Slurm Compute node on build. + +echo "=== custom-compute-install.sh $(hostname) $(date)" + +echo "+++ spack" +cat >> /etc/profile.d/spack.sh <> /etc/profile.d/spack.sh <