三.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
•Please modify the yaml file as the figure below.
•Recall the "output" of the database stack
展开全文
▪Value of DatabaseClientSecurityGroup from the output -> AdditionalSecurityGroups of the yaml file
•Recall the "output" of the database stack
▪Value of DatabaseHost & DatabasePort -> Uri
-This URI must be formatted as host:port
•Recall the "output" of the database stack
▪Value of DatabaseAdminUser -> Username
▪Value of DatabaseSecretArn -> PasswordSecretArn
•After the modification of yaml file, the contents should be:
(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
•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.
•After the status of stack "MDXCluster" is CREATE_COMPLETE, click "HeadNode" under "Resources"
•Get the public IP of head node
(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
•Click "Upload"
•Click "Add Files" and select Moldex3D Portable Linux package file for CentOS 7
•Permissions -> Predefined ACLs ->
▪Select Grant public-read access ->
-Check I understand the risk of granting public-read access to the specified objects.
•Click "Upload"
•After the upload is done, click "Copy URL" to get the URL of Moldex3D Portable Linux package file.
(7) Setup Moldex3D at head node of Linux cluster on AWS
•Open PuTTY -> Enter Public IP of head node
•Please remember to set the SSH private key: awsparallelcluster.ppk
•Go back to ?�Session??and press ?�Open??/text>
•Login as -> centos
•Enter passphrase for private key: awsparallelcluster.ppk
•Download Moldex3D Portable Linux package file from AWS S3
▪Enter: wget [URL for the file]
•Extract Moldex3D Portable Linux package file
▪Enter: tar zxvf Moldex3DLinux_2023R1_el7_64Bit_Portable.tar.gz
•Set environment variable :
•Enter: echo "export MDX_2023_BIN=/home/centos/Moldex3D/2023/x64/Bin/" >> /home/centos/.bashrc
(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.
(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.
•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.
•Submit a job with 16 tasks
•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.
•When Moldex3D analysis is done, 4 compute nodes will be terminated after a period of time (about 10 minutes) defined by SLURM.
(10) Delete the Linux cluster on AWS
•Go to AWS console -> CloudFormation -> Delete Stack by the following sequence
▪MDXCluster -> pcluster-slurm-db -> parallelclsuternetworking-xxxxxxxx
•Go to AWS console -> S3 -> select the bucket named parallelcluster-xxxxxxx
▪Empty the bucket
▪Delete the bucket
•Go to AWS console -> VPC -> Select the VPC named ParalleclusterVPC-xxxxx
▪Delete VPN connection
▪Delete Virtual Network gateway
▪Delete Customer gateway
•Delete VPC
标签: ParallelCluster AWS Moldex3D Connect