diff --git a/CHANGELOG.md b/CHANGELOG.md index c9606f1..acf87b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,17 @@ tf_hachef CHANGELOG This file is used to list changes made in each version of the tf_hachef Terraform plan. +v0.2.6 (2016-08-11) +------------------- +- Updated root device to use gp2 on backends +- Added map `instance_store` with reasonable defaults +- Now using local node instance storage for backends +- Large documentation overhaul + v0.2.5 (2016-08-10) ------------------- -- Adding `postgresql.md5_auth_cidr_addresses` to `chef-backend.rb` before joining cluster no longer breaks chef-backend +- Adding `postgresql.md5_auth_cidr_addresses` to `chef-backend.rb` before +joining cluster no longer breaks chef-backend - attributes-json.tpl -> backend-attributes-json.tpl for consistency v0.2.4 (2016-08-10) diff --git a/README.md b/README.md index 2a63af8..ca94071 100644 --- a/README.md +++ b/README.md @@ -79,133 +79,656 @@ These resources will incur charges on your AWS bill. It is your responsibility to delete the resources. -## Input variables +## Recommendations +The defaults set forth in the [variables.tf](variables.tf) file have been set +for good reasons. Please note that a good amount of testing went into defining +these defaults and necessary inputs are defined, for your convenience in +[terraform.tfvars.example](terraform.tfvars.example) -* `provider`: AWS provider settings - * `access_key`: Your AWS key, usually referred to as `AWS_ACCESS_KEY_ID` - * `region`: AWS region you want to deploy to. Default: `us-east-1` - * `secret_key`: Your secret for your AWS key, usually referred to as `AWS_SECRET_ACCESS_KEY` -* `vpc`: AWS VPC settings - * `cidr`: CIDR block for VPC creation. Default: `10.20.30.0/24` - * `dns_hostnames`: Support DNS hostnames (required). Default: `true` - * `dns_support`: Support DNS in VPC (required). Default: `true` - * `tags_desc`: AWS Name tag for VPC. Default: `Chef HA VPC` - * `tenancy`: AWS instance tenancy. Default: `default` -* `subnets`: AWS subnet settings - * This map is a dynamic map. Please read below: - * `KEY`: You create the key labeled as the availability zone (i.e us-east-1a) - * Default keys: `us-east-1a`, `us-east-1c`, `us-east-1d`, `us-east-1e` - * `VALUE`: Value is the CIDR subnet to create in that availability zone - * Default values: `10.20.30.0/26`, `10.20.30.64/26`, `10.20.30.128/26`, `10.20.30.192/26` -* `subnets_public`: Subnet map defaulting the public IP assignment in that availability zone's subnet - * `KEY`: Must have the same keys as `subnets`. Default: reference `subnets` - * `VALUE`: Can be `true` or `false`. Default: `true` -* `ssh_cidrs`: List of CIDR ranges allowed SSH access. Default: `["0.0.0.0/0"]` -* `ami`: AMI map for selecting the AMI - * The `KEY` is comprised of the `os`-`instance["(frontend|backend)_type"]`-`provider["region"]` - * The `value` is a mapping based on AMIs found publicly available as of 2016-03-14 -* `os`: The operating system for the deployed instance. Default: `ubuntu14` -* `ami_user`: Mapping of `os` to a default user for the instance. Default: `ubuntu14 = "ubuntu"` -* `ssl_certificate`: SSL Certificate information for chef-server-core installation - * `cert_file`: Full path to certificate file (usually `.crt` or `.pem` file) - * `key_file`: Full path to the certificate key file (usually `.key` file) -* `elb`: AWS ELB settings - * `certificate`: The uploaded identifier for the SSL certificate to use with AWS ELB - * `hostname`: Basename for the hostname. Default: `chefelb` - * `tags_desc`: Default tag for ELB. Default: `Created using Terraform` -* `chef_backend`: Chef backend settings - * `count`: Count of chef-backend instances to deploy. Default: `4` - * `version`: Chef backend version to install. Default: `1.1.2` -* `chef_client`: Chef client version to install. Default: `12.12.15` -* `chef_mlsa`: Indicate acceptance of the Chef MLSA. Must update to `true`. Default: `false` -* `chef_org`: Chef organization settings - * `short`: Chef organization to create. Default: `chef` - * `long`: Chef long organization name. Default: `Chef Organization` -* `chef_server`: Chef server core settings - * `count`: Chef server core instance count. Default: `4` - * `version`: Chef server core version to install. Default: `12.8.0` -* `chef_user`: Chef initial user settings - * `username`: Chef username to create. Default: `chef` - * `email`: Chef user e-mail address. Default: `chef@domain.tld` - * `first_name`: Chef user first name. Default: `Chef` - * `last_name`: Chef user last name. Default: `User` -* `instance`: Map of various AWS instance settings (backend and frontend) - * `backend_flavor`: Backend default instance type. Default: `r3.xlarge` - * `backend_iops`: Backend root volume IOPs (when using `io1`). Default: `6000` - * `backend_public`: Backend default association to public ip. Default: `true` - * `backend_size`: Backend root volume size in gigabytes. Default: `200` - * `backend_term`: Delete root volume on VM termination. Default: `true` - * `backend_type`: Backend root volume type: Default `io1` - * `ebs_optimized`: Deploy EBS optimized root volume. Default `true` - * `frontend_flavor`: Frontend default instance type. Default: `r3.xlarge` - * `frontend_iops`: Frontend root volume IOPs (when using `io1`). Default: `6000` - * `frontend_public`: Frontend default association to public ip. Default: `true` - * `frontend_size`: Frontend root volume size in gigabytes. Default: `200` - * `frontend_term`: Delete root volume on VM termination. Default: `true` - * `frontend_type`: Frontend root volume type: Default `io1` - * `tags_desc` = "Created using Terraform" -* `instance_hostname`: Map of frontend and backend base hostnames - * `backend`: Chef backend base hostname. Default: `chefbe` - * `frontend`: Chef server core base hostname. Default: `chefbe` -* `instance_keys`: Map of SSH key settings to deploy and access AWS instances - * `key_name`: The private key pair name on AWS to use (String) - * `key_file`: The full path to the private kye matching `instance_keys["key_name"]` public key on AWS -* `domain`: Domain name for instances and ELB. Default: `localdomain` -* `r53_zones`: AWS Route53 zone settings - * `internal`: Route53 internal zone ID - * `external`: Route53 external zone ID -* `r53_ttls`: AWS Route53 TTL default settings - * `internal`: Time to live setting for internal zone route53 records. Default: `180` - * `external`: Time to live setting for external zone route53 records. Default: `180` - - -### AMI map and customizing - -The below mapping variables construct selection criteria - -* `ami`: AMI selection map comprised of `os`, `instance["(frontend|backend)_type"]` and `aws_region` -* `ami_user`: Default username selection map based off `ami_os` - -To override this, construct the maps in the following manner: -``` +## Input variables + + +
Variable | +Key | +Description | +Type | +Default Value | +
---|---|---|---|---|
provider | ++ | AWS provider map | +map | ++ |
+ | access_key | +AWS access key | +string | ++ |
+ | region | +AWS region for deployment | +string | +us-east-1 | +
+ | secret_key | +AWS secret | +string | ++ |
vpc | ++ | AWS VPC settings map | +map | ++ |
+ | cidr | +CIDR block for VPC | +string | +10.20.30.0/24 | +
+ | dns_hostnames | +Support DNS hostnames (required) | +boolean | +true | +
+ | dns_support | +Support DNS in VPC (required) | +boolean | +true | +
+ | tags_desc | +Description tag | +string | +Chef HA VPC | +
+ | tenancy | +AWS instance tenancy | +string | +default | +
subnets | ++ | AWS subnet settings | +map | ++ |
+ | `key` | +AWS AZ to create subnet | +string | +us-east-1a us-east-1c us-east-1d us-east-1e |
+
+ | `value` | +Subnet to configure for `key` | +string | +10.20.30.0/26 10.20.30.64/26 10.20.30.128/26 10.20.30.192/26 |
+
ssh_cidrs | ++ | List of CIDRs allowing SSH | +list | +0.0.0.0/0 | +
ami | ++ | AWS AMI map | +map | ++ |
+ | `key` | +Key comprised of of os-type-region | +string | +View [variables.tf](variables.tf) | +
+ | `value` | +AWS AMI identifier | +string | +View [variables.tf](variables.tf) | +
os | ++ | AWS AMI operating system | +string | +ubuntu14 | +
ami_user | ++ | Mapping of AMI OS to AMI username | +map | +ubuntu | +
+ | `key` | +AMI OS | +string | +centos7 centos6 ubuntu16 ubuntu14 ubuntu12 |
+
+ | `value` | +Username for `key` | +string | +centos centos ubuntu ubuntu ubuntu |
+
ssl_certificate | ++ | SSL certificate information | +map | ++ |
+ | cert_file | +Full path to SSL certificate file | +string | ++ |
+ | key_file | +Full path to SSL certificate key file | +string | ++ |
elb | ++ | AWS ELB settings | +map | ++ |
+ | certificate | +AWS identifier for SSL certificate | +string | ++ |
+ | hostname | +Base hostname for AWS ELB | +string | +chefelb | +
+ | tags_desc | +Description tag | +string | +Created using Terraform | +
chef_backend | ++ | Chef backend settings | +map | ++ |
+ | count | +Count of chef-backend instances | +integer | +3 | +
+ | version | +Version of chef-backend to install | +string | +1.1.2 | +
chef_client | ++ | Version of chef-client to install | +string | +12.12.15 | +
chef_mlsa | ++ | Chef MLSA licese acceptance | +string | +false | +
chef_org | ++ | Chef server organization settings | +map | ++ |
+ | short | +Chef server organization short name | +string | +chef | +
+ | long | +Chef server organization long name | +Chef Organization | +string | +
chef_server | ++ | Chef server core settings | +map | ++ |
+ | count | +Count of chef-server-core instances | +integer | +2 | +
+ | version | +Version of chef-server-core to install | +string | +12.8.0 | +
chef_user | ++ | Chef initial user settings | +map | ++ |
+ | Chef user e-mail address | +string | +chef@domain.tld | +|
+ | first_name | +Chef user first name | +string | +Chef | +
+ | last_name | +Chef user last name | +string | +User | +
+ | username | +Chef user username | +string | +chef | +
instance | ++ | AWS instance settings | +map | ++ |
+ | backend_flavor | +AWS instance type for chef-backend | +string | +r3.xlarge | +
+ | backend_iops | +Root volume IOPs on chef-backend instance (`io1`) | +integer | +0 | +
+ | backend_public | +Associate public IP to chef-backend instance | +boolean | +true | +
+ | backend_size | +Root volume size (GB) on chef-backend instance | +integer | +40 | +
+ | backend_term | +Root volume delete on chef-backend instance termination | +boolean | +true | +
+ | backend_type | +Root volume type on chef-backend instance | +string | +gp2 | +
+ | ebs_optimized | +Deploy EBS optimized root volume | +boolean | +true | +
+ | frontend_flavor | +AWS instance type for chef-server-core | +string | +m4.large | +
+ | frontend_iops | +Root volume IOPs on chef-server-core instance (`io1`). | +integer | +0 | +
+ | frontend_public | +Associate public IP to chef-server-core instance | ++ | true | +
+ | frontend_size | +Root volume size (GB) on chef-server-core instance | +integer | +40 | +
+ | frontend_term | +Root volume delete on chef-server-core instance termination | ++ | true | +
+ | frontend_type | +Root volume type on chef-server-core instance | +string | +gp2 | +
+ | tags_desc | +Description name tag for instances. | ++ | Created using Terraform | +
instance_hostname | ++ | AWS instance base hostname | +map | ++ |
+ | backend | +Chef backend base hostname | +string | +chefbe | +
+ | frontend | +Chef server core base hostname | +string | +chefbe | +
instance_keys | ++ | AWS SSH key settings | +map | ++ |
+ | key_name | +AWS key pair | +string | ++ |
+ | key_file | +Full path to matching private key | +string | ++ |
instance_store | ++ | AWS instance store settings | +map | ++ |
+ | device | +AWS instance store device name | +string | +xvdb | +
+ | enabled | +Use AWS instance store | +boolean | +true | +
+ | filesystem | +AWS instance store filesystem | +string | +ext4 | +
+ | mount | +AWS instance store mount point | +string | +/mnt/xvdb | +
+ | mount_options | +AWS instance store mount options | +string | +defaults,noatime,errors=remount-ro | +
domain | ++ | Domain name | +string | +localdomain | +
r53_zones | ++ | AWS Route53 zone settings | +map | ++ |
+ | internal | +AWS Route53 internal zone ID | +string | ++ |
+ | external | +AWS Route53 external zone ID | +string | ++ |
r53_ttls | ++ | AWS Route53 TTL settings | +map | ++ |
+ | internal | +Internal record TTL setting | +integer | +180 | +
+ | external | +External record TTL setting | +integer | +180 | +
Key | +Value | +
---|---|
centos7 | +centos | +
centos6 | +centos | +
ubuntu16 | +ubuntu | +
ubuntu14 | +ubuntu | +
ubuntu12 | +ubuntu | +