ec2hostname
Version information
This version is compatible with:
- ,
Start using this module
Add this module to your Puppetfile:
mod 'evenup-ec2hostname', '0.2.2'
Learn more about managing modules with a PuppetfileDocumentation
#ec2hostname
####Table of Contents
- Overview
- Module Description
- Setup
- Usage - Configuration options and additional functionality
- Limitations
- Development
- Release Notes
- License
- Acknowledgements
##Overview
Adds hostname registration for AWS VPC nodes to a private Route53 zone.
##Module Description
This module installs an init script that handles start, restart, stop, and status. Starting (or restarting) the init script will ensure the node exists in the private zone specified. Stopping the module will remove it from the zone.
##Setup
###What ec2hostname affects
- Adds an init script for name registration
###Setup Requirements
- aws-sdk ruby gem (can be installed by the module with the install_gem parameter)
- stdlib puppet module
- nodes using this module must be in an EC2 VPC
- IAM policy allowing Route53 updates (see Usage) ###Beginning with ec2hostname
To install the module: puppet module install evenup-java
Required parameters are: aws_key, aws_secret, and zone. See Usage for descriptions.
##Usage
###Parameters
#####aws_key
The AWS key used to make Route53 updates
#####aws_secret
The AWS secret for aws_key
#####zone
The Hosted Zone ID for the private zone to update
#####install_gem
'
Whether or not the aws-sdk ruby gem should be installed. Valid values are true and false. The default value is false
#####hostname
The hostname that should be used for this node. The default value is 'hostname' from facter.
#####domain
The domain name that should be appended to the hostname. The default value is 'domain' from facter.
#####ttl
The TTL (in seconds) that should be associated with this record. Valid values are integers. The default value is 60.
#####type
The type of record that should be added for this node. Valid values are A and CNAME. The default value is CNAME.
#####target
The answer portion of the record entry. Typically this would be an IP address for an A record or an A record for a CNAME.
If this is set to 'local-hostname' (the default), the AWS meta-data service will be queried for the local-hostname parameter.
If this is set to 'local-ipv4, the AWS meta-data service will be queried for the local-ipv4 parameter.
#####service
Whether or not the ec2hostname service should be running. Valid values are true or false. The default is true.
#####enable
Whether or not the ec2hostname service should be enabled at boot. Valid values are true or false. The default is true.
###IAM Config It is HIGHLY recommeded to use an IAM user with limited to access for this service. The permissions needed for this user are:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1415820843000",
"Effect": "Allow",
"Action": [
"route53:ChangeResourceRecordSets",
"route53:GetHostedZone",
"route53:ListResourceRecordSets"
],
"Resource": [
"arn:aws:route53:::hostedzone/<your hosted zone id>"
]
}
]
}
##Limitations
CentOS/RHEL 6 tested
##Development
Pull requests are greatly appreciated!
- Fork it
- Create a topic branch
- Improve/fix (with spec tests)
- Push new topic branch
- Submit a PR
Release Notes
See the CHANGELOG
License
Released under the Apache 2.0 license
Acknowledgements
The init script used here is based heavily on a gist by @kixorz.
20150128 - v0.2.2 Correctly set TTL to integer 20150128 - v0.2.1 Correct puppet pathing 20150127 - v0.2.0 Add systemd support Move script out of init script 20150105 - v0.1.1 Add acceptance tests 20141112 - v0.1.0 Initial release
Dependencies
- puppetlabs/stdlib (>=3.2.0 <5.0.0)
Copyright 2013 EvenUp Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.