Nanocloud / nanocloud

http://nanocloud.com
GNU Affero General Public License v3.0
25 stars 16 forks source link

RFE: assign custom security groups #508 #509

Open patlachance opened 7 years ago

patlachance commented 7 years ago

508 Handling Security Groups and Security Group IDs for AWS

To attach custom security groups to your "nanocloud exec servers", proceed as follow:

From AWS console or using the aws-cli tool

Then, configure your Nanocloud environment using the values just found by changing config/env/development or creating a config/local.js file

Sample config/local.js file:

module.exports = {
  nanocloud: {
    awsMachineSubnet: 'subnet-1a2b3c4d',
    awsSecurityGroupIds: ['sg-1a2b3c4d']
  }

You must choose Security Group(s) or Security Groups ID(s) that are define within the VPC containing the subnet referred to by the awsMachineSubnet parameter.

Configure only one of the two parameters. Setting both is useless and might result in provisioning error if they don't match.

Please note that using Security Group name(s) is only supported in EC2-Classic or in the default VPC, not in user-created VPCs. From AWS EC2 'runInstances' SDK function documentation (http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/EC2.html#runInstances-property)

Default: Amazon EC2 uses the default security group.

Default: Amazon EC2 uses the default security group.

Notes:

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 70.542% when pulling bc591995dbcfb8db861fe1fb5149cca966425375 on patlachance:feature-508-assign-custom-security-groups into eaf00b4fd712f6a10e88941381120d421012a7b8 on Nanocloud:master.