-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/bala-exp' into main
- Loading branch information
Showing
2 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,23 @@ | ||
| # CLASS-HPC-GCP | ||
| Internet2 CLASS Capstone Project, HPC-GCP Team | ||
|
|
||
| It is convenient to deploy an HPC cluster on the GCP cloud using terraform scripts. The scripts are inside the directory slurm-gcp. You need to edit the scripts - basic.tfvars and main.tf. For a basic deployment, it is sufficient to redefine a few variables such as project name, cluster name, etc. Of course, you can fine tune the variables and scripts to fit your needs. | ||
|
|
||
| * Create a GCP Project (for example, class-capstone) | ||
| * Go to API services and enable the API for compute engines and deployment manager | ||
| * Start the cloud shell (If you set up the environment for gcloud shell or sdk on your laptop, you can use your development environment in place of cloud shell) | ||
| * Clone the gcp repo: git clone https://github.com/SchedMD/slurm-gcp.git | ||
| * Go to the directory slurm-gcp/tf/examples | ||
| * Make a copy of the basic example. `cp basic.tfvar.example basic.tfvar` | ||
| * Edit the basics.tfvar file. Add a line “project = class-capstone” (or any name you like) | ||
| * Open main.tf, and make sure that the bash variable `source` refers to the correct path | ||
| * Initialize terraform `terraform init` | ||
| * Start the HPC cluster. `terraform apply -var-file=basic.tfvars`. | ||
| * Go to your GCP dashboard and check the compute engines. You should see the controller and the login node up and running. | ||
| * SSH into the login node and check the slurm status (`sinfo`) or run some test jobs. | ||
|
|
||
| Note that the minimal disk-size is 20 GB to accommodate the size of the VM. If you wan’t more than 20 GB, that’s okay. | ||
|
|
||
| The above steps are explained in the document page: https://cloud.google.com/architecture/deploying-slurm-cluster-compute-engine | ||
|
|
||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| yum groupinstall -y 'Development Tools' | ||
| yum install -y \ | ||
| openssl-devel \ | ||
| libuuid-devel \ | ||
| libseccomp-devel \ | ||
| wget \ | ||
| squashfs-tools \ | ||
| cryptsetup | ||
|
|
||
| export GOLANG_VERSION=1.16.4 | ||
| export SINGULARITY_VERSION=3.7.0 | ||
|
|
||
| mkdir -p /opt/go/${GOLANG_VERSION} | ||
| mkdir -p /opt/singularity/${SINGULARITY_VERSION} | ||
|
|
||
| export OS=linux | ||
| export ARCH=amd64 | ||
|
|
||
| cd /opt/go/${GOLANG_VERSION} | ||
|
|
||
| wget https://golang.org/dl/go1.16.4.linux-amd64.tar.gz | ||
| tar -xzf go1.16.4.linux-amd64.tar.gz | ||
| rm go1.16.4.linux-amd64.tar.gz | ||
| #rm go$GOLANG_VERSION.$OS-$ARCH.tar.gz | ||
|
|
||
| export GOPATH=/var/tmp/go | ||
| export GOCACHE=/var/tmp/go/.cache/go-build | ||
| mkdir -p ${GOPATH}/{bin,pkg,src} | ||
|
|
||
| cd /opt/singularity/${SINGULARITY_VERSION} | ||
| #wget https://github.com/hpcng/singularity/releases/download/v3.7.0/singularity-3.7.0.tar.gz | ||
| wget https://github.com/hpcng/singularity/releases/download/v${SINGULARITY_VERSION}/singularity-${SINGULARITY_VERSION}.tar.gz | ||
| tar -xzf singularity-${SINGULARITY_VERSION}.tar.gz | ||
| rm -xzf singularity-${SINGULARITY_VERSION}.tar.gz | ||
| cd singularity | ||
|
|
||
| mkdir -p /apps/singularity/${SINGULARITY_VERSION} | ||
| export PATH=/opt/go/${GOLANG_VERSION}/go/bin:$PATH | ||
|
|
||
| ./mconfig --prefix=/apps/singularity/${SINGULARITY_VERSION} | ||
| make -C ./builddir | ||
| make -C ./builddir install | ||
|
|
||
| rm -rf ${GOPATH} | ||
|
|
||
| mkdir /apps/modulefiles/singularity | ||
|
|
||
| bash -c "cat > /apps/modulefiles/singularity/${SINGULARITY_VERSION}" <<SINGULARITY_MODULEFILE | ||
| #%Module1.0##################################################################### | ||
| ## | ||
| ## modules singularity/${SINGULARITY_VERSION}. | ||
| ## | ||
| ## modulefiles/singularity/${SINGULARITY_VERSION}. | ||
| ## | ||
| proc ModulesHelp { } { | ||
| global version modroot | ||
| puts stderr "singularity/${SINGULARITY_VERSION} - sets the environment for Singularity ${SINGULARITY_VERSION}" | ||
| } | ||
| module-whatis "Sets the environment for using Singularity ${VERSION}" | ||
| # for Tcl script use only | ||
| set topdir /apps/singularity/${SINGULARITY_VERSION} | ||
| set version ${SINGULARITY_VERSION} | ||
| set sys linux86 | ||
| prepend-path PATH /apps/singularity/${SINGULARITY_VERSION}/bin | ||
| SINGULARITY_MODULEFILE |