-
Notifications
You must be signed in to change notification settings - Fork 312
Use an Existing Elastic IP
Hanwen edited this page Sep 17, 2021
·
3 revisions
Note: Starting with ParallelCluster 3.x, using an existing Elastic IP is supported without the need for customizing CloudFormation template. Please see ElasticIp
parameter for details.
- Clone the repo:
$ git clone https://github.com/aws/aws-parallelcluster.git
$ cd aws-parallelcluster/
- Modify the template
cloudformation/aws-parallelcluster.cfn.json
to include a parameter:
"ElasticIpId": {
"Description": "The Id of the elastic IP to associate with the master instance.",
"Type": "String"
},
- Modify #L4568 to reference that parameter:
"AssociateEIP": {
"Type": "AWS::EC2::EIPAssociation",
"Properties": {
"AllocationId": {
"Ref": "ElasticIpId"
},
"NetworkInterfaceId": {
"Ref": "MasterENI"
}
},
"Condition": "MasterPublicIp"
},
- Remove
MasterEIP
Resource #L1921:
Remove this block:
"MasterEIP": {
"Type": "AWS::EC2::EIP",
"Properties": {
"Domain": "vpc"
},
"Condition": "MasterPublicIp"
},
- Upload the template:
$ util/uploadTemplate.sh --bucket [your s3 bucket] --srcdir . --region [aws region]
Reference the custom template from your cluster's config:
[cluster your_cluster]
template_url = https://s3.amazonaws.com/seaam-pcluster/template/aws-parallelcluster.cfn.2.3.1.json