-
Notifications
You must be signed in to change notification settings - Fork 312
Public Private Networking
Several networking scenarios call for having a public and private subnet pair with a NAT gateway. For example:
This is useful if you want to set the use_public_ips = false
flag. This flag turns off elastic ip's, which have a low default limit of 5
, limiting the number of clusters a customer can create without raising this limit. If you follow this guide, you'll only need 1 Elastic IP for the NAT gateway.
Note: this parameter is only in ParallelCluster 2.x. With ParallelCLuster 3.x, please use ElasticIp
parameter to control the setting.
To use the AWS Batch integration, you'll need to use a public, private subnet pair setup with a NAT Gateway. See AWS Batch networking for more information.
pcluster configure
helps you create VPC and subnets automatically.
If you wish to create the VPC and subnets manually, follow the guide below:
To make this work, you'll need a public and private subnet, the private subnet routes through a NAT gateway. To create these subnets do:
- In the VPC Dashboard , click "VPC Wizard"
- Select the second tab "VPC with Public and Private Subnets"
- Create the VPC, giving it a name, like
public-private
:
- Enable "Auto-assign public ip's" on the
Public Subnet
.
- From your
~/.parallelcluster/config
file add a vpc section that includes your newly created vpc and subnets, and reference it in your cluster section:
[cluster mycluster]
...
vpc_settings = public-private
[vpc public-private]
vpc_id = [VPC you created]
master_subnet_id = [Public Subnet]
compute_subnet_id = [Private Subnet]
use_public_ips = false
- Create the cluster! When you ssh in, you'll need to grab the public ip from the EC2 console, rather than
pcluster ssh cluster
. Update This will be fixed in version>= 2.3.1
:-)