当前位置: 首页 > 资讯

Moldex3D AWS-Connect之AWS ParallelCluster-2 环球播报

来源:软服之家 发布时间:2023-05-09 15:31:17 分享至:

三.AWS ParallelCluster

3. Installaing AWS ParallelCluster

•Reference: https://docs.aws.amazon.com/parallelcluster/latest/ug/install-v3-parallelcluster.html


【资料图】

•Install AWS ParallelCluster in a virtual environment

•Update Python3 PIP

▪Enter: python3 -m pip install –upgrade pip

•Install virtualenv module for Python3

▪Enter: python3 -m pip install –user –upgrade virtualenv

•Create a virtual environment and name it.

▪Enter: python3 -m virtualenv ~/apc-ve

•Activate your new virtual environment.

▪Enter: source ~/apc-ve/bin/activate

•Install AWS ParallelCluster into your virtual environment.

▪Enter: python3 -m pip install –upgrade “aws-parallelcluster”

•Install Node Version Manager and the latest Long-Term Support (LTS) Node.js version. AWS Cloud Development Kit (AWS CDK) (AWS CDK) requires Node.js for CloudFormation for template generation.

▪Enter: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

▪Enter: chmod ug+x ~/.nvm/nvm.sh

▪Enter: source ~/.nvm/nvm.sh

▪Enter: nvm install –lts=Gallium

▪Enter: node ???ersion

•Verify that AWS ParallelCluster is installed correctly.

▪Enter: pcluster version

▪The version should be 3.3.0.

▪The installation of AWS ParallelCluster is finished.

Set required policy for the IAM user to run AWS

ParallelCluster

•Reference:https://docs.aws.amazon.com/parallelcluster/latest/ug/iam-roles-in-parallelcluster-v3.html#iam-roles-in-parallelcluster-v3-example-user-policies

▪Please refer toBase user policy required to invoke AWS ParallelCluster features.

•You may also use administrator IAM user for for your convenience.

4. Workflow to create Linux cluster on AWS

1.Configuring AWS ParallelCluster

•At the end of configuring STEPS, a new VPC is created, and the related network environment is deployed.

2.Create database for SLURM accounting via AWS console

3.Create site-to-site VPN via AWS console

4.Modify AWS ParallelCluster configuration file for creating Linux cluster

5.Create Linux cluster via AWS ParallelCluster

6.Upload moldex3d Linux package to AWS S3

7.Setup Moldex3D at head node of Linux cluster on AWS

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

9.Submit Moldex3D job to Linux cluster on AWS

10.Delete the Linux cluster on AWS

(1) Configuring AWS ParallelCluster

•Reference:https://docs.aws.amazon.com/parallelcluster/latest/ug/install-v3-configuring.html

•Configure AWS CLI Tool v2

▪Enter: aws configure

Enter the AWS Access Key ID, AWS Secret Access Key of the IAM account to use for AWS ParallelCluster.

•Create the configuration for the cluster to deploy. In this step, the VPC will be created and related network environment will be deployed.

▪Enter: pcluster configure –config cluster-config.yaml

-Select the region to create the cluster.

▪Select the AWS key pair to create the cluster.

▪Select 1. slurm for job scheduler.

▪Select 2. centos7 for Operating System.

▪Head node instance type –> t3a.large (You may enter other types of instances.)

▪Number of queues –> 1

▪Name of queue 1 –> queue1

▪Number of compute resources for queue1 –> 1

▪Compute instance type –> t3a.xlarge (You may enter other types of instances.)

▪Maximum instance count –> 10 (it means you will have 10 compute nodes at most.)

▪Automate VPC creation –> y

▪Select availability zone

▪Network Configuration –> Please select

-2. Head node and compute fleet in the same public subnet.

oSince all nodes are in the same public subnet, you do not need NAT gateway or Endpoints which will charge additional cost.

▪AWS ParallelCluster is now creating VPC and deploy the network environment

▪You may go to CloudFormation and check the newly created stack

After this step, the VPC is created and basic network environment for cluster is deployed.

(2)Create database for SLURM accounting via AWS console

•Please go to https://docs.aws.amazon.com/parallelcluster/latest/ug/tutorials_07_slurm-accounting-v3.html

▪For Step 2, please click the link ?�CloudFormation quick create template??/text>

•You will be redirect to the “Create stack” page

•Please make sure the region at the right top corner is the same as the region where the VPC is located. If not, please change the region.

•Please set administrator password for the database

•For VPC ID, please select the VPC named ParallelClusterVPC-XXXXXX

•CIDR block for the first subnet: Please enter 10.0.20.0/24

•CIDR block for the second subnet: Please enter 10.0.21.0/24

•Press “Create stack”

•Please wait until the status becomes “CREATE_COMPLETE”

•Before deploying the cluster, please make sure the status of database stack is CREATE_COMPLETE.

•Please switch to “Output”

▪DatabaseAdminUser, DatabaseClientSecurityGroup, DatabaseHost, DatabasePort, DatabaseSecretArn will be used in the configuration file of cluster.

(3)Create site-to-site VPN connection via AWS console

•Go to AWS console -> VPC (please confirm the region at upper right corner of AWS console)

▪We have to configureCustomer gateways,Virtual private gateways,andSite-to-Site VPN connections.

•Create customer gateway

▪Name tag -> customer-gateway

▪BGP ASN -> Use the default value

▪IP address -> Enter the public IP of your VPN device on-premises

▪Certificate ARN -> Leave blank

▪Press “Create customer gateway”

•After the customer gateway is created, the state will be “Available”.

•Create virtual private gateway

▪Name tag -> vgw

▪Autonomous System Number (ASN) -> Amazon default ASN

▪Press “Create virtual private gateway”

•After the virtual private gateway is created, its state is “Detached”.

•Click “Attach to VPC” in Actions

•Select the VPC with name:ParallelClusterVPC-XXXXX

•Press “Attach to VPC”

•Wait until the virtual private gateway is attached to VPC.

•Create VPN connection

▪Name tag -> vpn

▪Target gateway type -> Virtual private gateway

-Select “vgw” created in previous step.

▪Customer gateway -> Existing

-Select “customer-gateway” created in previous step.

•Create VPN connection

▪Routing options -> Static

▪Static IP prefixes

-Because the IP of my LM server on-premises is 192.168.130.52, therefore I type “192.168.130.0/24” in the field.

▪Local IPv4 network CIDR -> Leave blank

▪Remote IPv4 network CIDR -> Leave blank

•Create VPN connection

▪Tunnel 1 options

-Inside IPv4 CIDR for tunnel 1 -> Leave blank (Generated by Amazon)

-Pre-shared key for tunnel 1

•Enter the key (Please confirm this with IT department.)

-Advanced options for tunnel 1 -> Use default options

▪You may configure the Tunnel 2 options if your VPN device on-premises supports two tunnels.

▪Press “Create VPN connection”

•After VPN connection is established, the tunnel 1 status is “Down”.

▪Since we only configure tunnel 1, the status of tunnel 2 is always “Down”

▪Go to AWS console -> VPC -> Select VPC named ParalleClusterVPC-XXXX

-Select subnets -> select parallelcluster:public-subnet

•Please note that public subnet IPv4 CIDR is 10.0.0.0/20. You need to notify your IT department this CIDR for on-premises VPN configuration.

▪After the on-premises VPN configuration is done, the tunnel 1 status will become ?�Up??

•Go to AWS console -> VPC -> Select VPC named ParalleClusterVPC-XXXX

▪Select subnets -> select parallelcluster:public-subnet -> select Route table

-You may see that there is no route to 192.168.130.0/24 on-premises.

•Go to AWS console -> VPC -> Select VPC named ParalleClusterVPC-XXXX

▪Select Route tables -> select parallelcluster:route-table-public -> select Routes

-Click “Edit routes”

•Click “Add route”

•Destination -> 192.168.130.0/24

•Target -> select virtual private gateway -> select “vgw-xxxxxx”

•Click “Save changes”

•Go back to the subnet -> route table

▪You may see that the route to 192.168.130.0/24 on-premises is by vgw.

关键词:

Copyright   2015-2023 港澳礼仪网 版权所有  备案号:京ICP备2023022245号-31   联系邮箱:435 226 40 @qq.com