From 230f2d2822c74c4a4e832c73890c30858839128f Mon Sep 17 00:00:00 2001 From: Bala Desinghu Date: Thu, 6 May 2021 23:29:42 +0000 Subject: [PATCH 1/6] adding readme --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 8ee9d50..6ca22b6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # CLASS-HPC-GCP Internet2 CLASS Capstone Project, HPC-GCP Team + +t 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, the variables and scripts can be fine tuned 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. + + From d4ade677fc568511f4f6fd3afdc68c01ce8236e7 Mon Sep 17 00:00:00 2001 From: Bala Desinghu Date: Thu, 6 May 2021 19:31:27 -0400 Subject: [PATCH 2/6] Update README.md --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 6ca22b6..ac40c9c 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,18 @@ Internet2 CLASS Capstone Project, HPC-GCP Team t 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, the variables and scripts can be fine tuned 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. +* 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. From eae611ab5cac904237cb1545c45b7f82a317597b Mon Sep 17 00:00:00 2001 From: Bala Desinghu Date: Thu, 6 May 2021 19:33:51 -0400 Subject: [PATCH 3/6] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ac40c9c..9a85247 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # CLASS-HPC-GCP Internet2 CLASS Capstone Project, HPC-GCP Team -t 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, the variables and scripts can be fine tuned to fit your needs. +t 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 @@ -18,4 +18,6 @@ t is convenient to deploy an HPC cluster on the GCP cloud using terraform script 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 + From 50c1c4af3a65a51ca517203709271534d56b6729 Mon Sep 17 00:00:00 2001 From: Bala Desinghu Date: Thu, 6 May 2021 19:34:36 -0400 Subject: [PATCH 4/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a85247..e348ecc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # CLASS-HPC-GCP Internet2 CLASS Capstone Project, HPC-GCP Team -t 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. +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 From 532c27be4308e0ddcb1d86f0306e2e655e229d77 Mon Sep 17 00:00:00 2001 From: Bala Desinghu Date: Mon, 10 May 2021 10:49:26 -0400 Subject: [PATCH 5/6] Create install_singularity.sh --- install_singularity.sh | 67 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 install_singularity.sh diff --git a/install_singularity.sh b/install_singularity.sh new file mode 100644 index 0000000..c4768f8 --- /dev/null +++ b/install_singularity.sh @@ -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}" < Date: Mon, 10 May 2021 10:50:19 -0400 Subject: [PATCH 6/6] Update install_singularity.sh --- install_singularity.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_singularity.sh b/install_singularity.sh index c4768f8..9164ec0 100644 --- a/install_singularity.sh +++ b/install_singularity.sh @@ -63,5 +63,5 @@ module-whatis "Sets the environment for using Singularity ${VERSION}" set topdir /apps/singularity/${SINGULARITY_VERSION} set version ${SINGULARITY_VERSION} set sys linux86 -prepend-path PATH \$topdir/bin +prepend-path PATH /apps/singularity/${SINGULARITY_VERSION}/bin SINGULARITY_MODULEFILE