Moldex3D AWS-Connect之AWS ParallelCluster-3

三.AWS ParallelCluster

4. Workflow to create Linux cluster on AWS

(4) Modify AWS ParallelCluster configuration file for creating Linux cluster

?Go to console of EC2 instance: amazonlinux

?Edit cluster configuration file

-Enter: nano -w ~/cluster-config.yaml

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖1

?Please modify the yaml file as the figure below.

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖2

?Recall the "output" of the database stack

?Value of DatabaseClientSecurityGroup from the output -> AdditionalSecurityGroups of the yaml file

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖3

?Recall the "output" of the database stack

?Value of DatabaseHost & DatabasePort -> Uri

-This URI must be formatted as host:port

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖4

?Recall the "output" of the database stack

?Value of DatabaseAdminUser -> Username

?Value of DatabaseSecretArn -> PasswordSecretArn

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖5

?After the modification of yaml file, the contents should be:

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖6

(5) Create Linux cluster via AWS ParallelCluster

?Run the command to deploy cluster via AWS CloudFormation

?Enter:  pcluster create-cluster --cluster-name MDXCluster --cluster-configuration cluster-config.yaml

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖7

?Go to AWS console -> CloudFormation -> Check stack named "MDXCluster"

?Please wait until the status becomes "CREATE_COMPLETE", and then you may stop EC2 instance "amazonlinux" which runs AWS ParallelCluster.

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖8

?After the status of stack "MDXCluster" is CREATE_COMPLETE, click "HeadNode" under "Resources"

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖9

?Get the public IP of head node

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖10

(6) Upload Moldex3D Linux package to AWS S3

?Go to AWS console -> S3

?You may have several buckets. Please find the bucket with name: parallelcluster-XXXX

?Click to enter the bucket

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖11

?Click "Upload"

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖12

?Click "Add Files" and select Moldex3D Portable Linux package file for CentOS 7

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖13

?Permissions -> Predefined ACLs ->

?Select Grant public-read access ->

-Check I understand the risk of granting public-read access to the specified objects.

?Click "Upload"

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖14

?After the upload is done, click "Copy URL" to get the URL of Moldex3D Portable Linux package file.

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖15

(7) Setup Moldex3D at head node of Linux cluster on AWS

?Open PuTTY -> Enter Public IP of head node

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖16

?Please remember to set the SSH private key: awsparallelcluster.ppk

?Go back to ??Session??and press ??Open??/text>

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖17

?Login as -> centos

?Enter passphrase for private key: awsparallelcluster.ppk

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖18

?Download Moldex3D Portable Linux package file from AWS S3

?Enter: wget [URL for the file]

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖19

?Extract Moldex3D Portable Linux package file

?Enter: tar zxvf Moldex3DLinux_2023R1_el7_64Bit_Portable.tar.gz

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖20

?Set environment variable :

?Enter: echo "export MDX_2023_BIN=/home/centos/Moldex3D/2023/x64/Bin/" >> /home/centos/.bashrc

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖21

(8) Check the connection between head node of Linux cluster on AWS and LM server on-premises

?Run Moldex3D LM Utility for Linux at HeadNode

?Enter: ~/Moldex3D/2023/x64/Bin/MDX3DLMUtil -licstatxml -host 192.168.130.52 -port 2556

?If the site-to-site VPN connection is ok, you will see the output as below.

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖22

(9) Submit Moldex3D job to Linux cluster on AWS

?At your computer on-premises, open Moldex3D Computing Manager -> Add new server

?Scheduler -> SLURM

?IP/Hostname -> Public IP of HeadNode

?Port -> 22

?Account -> centos

?Logon Type -> Private Key

?Private Key -> awsparallelcluster.pem

?Specified by -> Core Per Node

?Core Per Node -> 4

-Because the instance type used for Compute node is t3a.xlarge (vCPU=4) in this slide.

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖23

?You may see that the max task. is 40

?Because the cluster configuration defines that instance type of compute node is t3a.xlarge (vCPU=4) and Maximum instance count is 10.

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖24

?Submit a job with 16 tasks

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖25

?After the job submission, you may see in AWS console that there are 4 compute nodes launched. After the compute nodes are ready, the Moldex3D analysis will start.

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖26

?When Moldex3D analysis is done, 4 compute nodes will be terminated after a period of time (about 10 minutes) defined by SLURM.

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖27

(10) Delete the Linux cluster on AWS

?Go to AWS console -> CloudFormation -> Delete Stack by the following sequence

?MDXCluster -> pcluster-slurm-db -> parallelclsuternetworking-xxxxxxxx

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖28

?Go to AWS console -> S3 -> select the bucket named parallelcluster-xxxxxxx

?Empty the bucket

?Delete the bucket

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖29

?Go to AWS console -> VPC -> Select the VPC named ParalleclusterVPC-xxxxx

?Delete VPN connection

?Delete Virtual Network gateway

?Delete Customer gateway

?Delete VPC

Moldex3D AWS-Connect之AWS ParallelCluster-3的圖30

登錄后免費(fèi)查看全文
立即登錄
App下載
技術(shù)鄰APP
工程師必備
  • 項(xiàng)目客服
  • 培訓(xùn)客服
  • 平臺(tái)客服

TOP

2
1