From 65fabf0fe1670a69358fa99fbcbcc2ba407ddfd1 Mon Sep 17 00:00:00 2001 From: Osman Dandia Date: Mon, 30 Nov 2015 12:11:58 -0800 Subject: [PATCH] Add network configuration section to development.md --- DEVELOPMENT.md | 32 ++++++++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 327d0fa..2c188c9 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -81,6 +81,38 @@ Note that this example extends NetworkBase instead of EnvironmentBase. NetworkBa This should bring up a stack containing all of the configured network resources as well as a bastion host. Try SSHing into the bastion host using the SSH key specified in the config.json to validate that it worked. + +Network Configuration +--------------------- +By default, networkbase will create one public and one private subnet for each availability zone in your VPC. You can modify this configuration by changing the default values in the network block of config: + +```json +"network": { + "network_cidr_base": "10.0.0.0", + "network_cidr_size": "16", + "az_count": 3, + "subnet_types": [ + "public", + "private" + ], + "subnet_config": [ + { + "type": "public", + "size": "18", + "name": "public" + }, + { + "type": "private", + "size": "22", + "name": "private" + }, + ], + }, +``` + +From here, you can change the VPC's address range, the types of subnets in your environment, and the subnet mask size of each subnet. You can define as many subnet tiers as you like in the subnet_config section, each new tier you add will be created in each of the AZs. For example, this default configuration would create a VPC with an address range of 10.0.0.0/16 over three AZs; one public subnet with a CIDR mask of 18 in each AZ; and one private subnet with a CIDR mask of 22 in each AZ, for a total of 6 subnets (2 tiers x 3 AZs). Public subnets get an egress route to the VPC's internet gateway, whereas private subnets communicate to the internet via a highly available NAT instance created in a public subnet within the same AZ. + + Creating your own controller: ----------------------------- diff --git a/README.md b/README.md index 3e057b6..388cd08 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ if __name__ == '__main__': MyEnvClass() ``` -Overriding these two functions allows you to hook into the template generation and stack creation processes of environmentbase to inject the resources and deployment steps for your environment. See the [Development](DEVELOPMENT.md) documentation for more detailed examples. This create_hook() will add a bastion host as a child stack of the environment. +Overriding these two functions allows you to hook into the template generation and stack creation processes of environmentbase to inject the resources and deployment steps for your environment. This create_hook() will add a bastion host as a child stack of the environment. See the [Development](DEVELOPMENT.md) documentation for more detailed examples. See [here](src/examples/) for more examples of using patterns.