Classes
awskit
: Placeholder for hiera parametersawskit::create_gitlab
: Installs AWS instance for Gitlab installation. Auto-configuresawskit::create_cd4pe
: Installs AWS instance for CD4PE installation. Auto-configures the rolecd4pe_server
which is available in the control repo.awskit::create_discovery
: Installs AWS instance for Puppet Discovery installationawskit::create_discovery_nodes
: Deploys 9 AWS instances for Puppet Discovery to forageawskit::create_linux_node
: Creates $count Linux nodesawskit::create_linux_role
: Creates $count Linux nodes with a roleawskit::create_master
: Provision a Puppetmaster in AWSawskit::create_dockerhost
: Provision a base demo docker host on which containerized stacks can be auto-configured via custom user_data. Includes docker-composeawskit::create_windc
: Installs AWS instance for Windows Domain Controller installationawskit::create_windows_node
: Creates a number of Windows nodesawskit::create_wsus
: A short summary of the purpose of this classawskit::join_domain
: class to make a windows host join a AD domainawskit::windows_domain
: Class: awskit::windows_domain Builds a Windows domain controller and provisions AD resources
Defined types
awskit::create_host
: This define creates a host with given parameters
Tasks
conf_control_repo
: Configures control repoecho
: A short description of this taskprovision
: Provisions demo Puppet infrastructurepurge_nodes
: purges all nodes with names matching pattern. Use with caution!
awskit
Provides a central place to configure parameters using hiera. Also selects the right AMI ids based on current region.
include awskit
The following parameters are available in the awskit
class.
Data type: String
Name of the AWS keypair, this is region-dependent.
Data type: String
this is the AWS region, looked up in hiera. Hiera gets it from the aws_region fact
which you can set with the FACTER_aws_region
environment variable.
Also recommended to set the AWS_REGION
enviroinment variable to the same
region since this speeds up the puppetlabs/aws module considerably)
Data type: String
The VPC the instances should go into. awskit currently does not create VPCs or subnets,
these should be present in the region and configured in %{::aws_region}/common.yaml
. Note that the VPC
in AWS needs to have a name so if it doesn't, you need to provide that using the AWS console.
Data type: String
The availability zone the instances should go into. Should be
configured in %{::aws_region}/common.yaml
.
Data type: String
The subnet the instances should go into. Should be configured
in %{::aws_region}/common.yaml
. Note that the subnet in AWS needs to have a name
so if it doesn't you need to provide that using the AWS console.
Data type: Hash
AWS instance tags. Provided in common.yaml. The created_by tag can be provided
in %{::user}.yaml
and deep merged.
Data type: String
AWS PM master IP address. Since this address should not change across instance restarts, you would need an Elastic IP address for this. See README for the AWS cli command to create one.
Data type: Hash
The central hash of AMIs, which lives on common.yaml
. Rather than providing AMIs per region,
they are all in the same hash for easier maintenance. This class creates variables with the correct AMIs based on the region.
Data type: String
The name of the AWS security group for the agents
Data type: String
The name of the AWS security group for the master
Data type: String
The name of the AWS security group for the Puppet Discovery instances
Data type: String
The name of the AWS security group for the Windows Domain Controller
Data type: String
The name of the AWS security group for the WSUS machine
Data type: String
The name of the AWS security group for the CD4PE instances
Data type: String
The IP address for the WSUS server, if you use it in your environment. Also needs an EIP (see master_ip
).
Default value: ''
Data type: String
The name of the puppetmaster.
Default value: 'master.inf.puppet.vm'
Data type: Array[String]
The ingress CIDR for ssh access of the master.
Default value: ['0.0.0.0/0']
awskit::create_cd4pe
This class creates an instance in AWS for hosting a cd4pe docker host.
- Note The cd4pe_server role was added in the tse control repo as of 10/2018. The cd4pe server that is provisioned will automatically be classfied.
include awskit::create_cd4pe
tasks/provision.sh cd4pe
The following parameters are available in the awskit::create_cd4pe
class.
Data type: Any
Data type: Any
Default value: lookup('awskit::create_linux_node::user_data')
Data type: Any
Default value: 'awskit-cd4pe'
Data type: Any
Default value: 1
awskit::create_discovery
This class creates an instance in AWS for Puppet Discovery to be installed on
include awskit::create_discovery
The following parameters are available in the awskit::create_discovery
class.
Data type: Any
Data type: Any
Data type: Any
Default value: 1
Data type: Any
Default value: 'awskit-disco'
awskit::create_discovery_nodes
This class creates 9 instances in AWS for Puppet Discovery to forage
include awskit::create_discovery_nodes
The following parameters are available in the awskit::create_discovery_nodes
class.
Data type: Any
Data type: Any
Data type: Any
Default value: 9
Data type: Any
Default value: 'awskit-disconode'
awskit::create_linux_node
Creates a number of Linux nodes
include awskit::create_linux_node
The following parameters are available in the awskit::create_linux_node
class.
Data type: Any
Data type: Any
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: 'awskit-linux'
Data type: Any
Default value: 1
awskit::create_linux_role
Creates a number of Linux nodes with a role
include awskit::create_linux_role
The following parameters are available in the awskit::create_linux_role
class.
Data type: Any
Data type: Any
Default value: lookup('awskit::create_linux_node::instance_type')
Data type: Any
Default value: lookup('awskit::create_linux_node::user_data')
Data type: Any
Default value: 'awskit-linux'
Data type: Any
Default value: 1
awskit::create_master
Provision a Puppetmaster in AWS
include awskit::create_master
The following parameters are available in the awskit::create_master
class.
Data type: Any
Data type: Any
Default value: ''
Data type: Any
Default value: 1
Data type: Any
Default value: 'awskit-pm'
awskit::create_windc
This class creates an instance in AWS for a Windows Domain Controller to be installed on
include awskit::create_windc
The following parameters are available in the awskit::create_windc
class.
Data type: Any
Data type: Any
Data type: Any
Default value: 'awskit-windc'
Data type: Any
Default value: 1
awskit::create_windows_node
include awskit::create_windows_node
The following parameters are available in the awskit::create_windows_node
class.
Data type: Any
Data type: Any
Data type: Any
Default value: 1
Data type: Any
Default value: 'awskit-windows'
awskit::create
A description of what this class does
include awskit::create_agents
The following parameters are available in the awskit::create_wsus
class.
Data type: Any
Data type: Any
Data type: Any
Default value: 1
Data type: Any
Default value: 'awskit-wsus'
class to make a windows host join a AD domain
Class: awskit::windows_domain Builds a Windows domain controller and provisions AD resources
The following parameters are available in the awskit::windows_domain
class.
Data type: Any
Data type: Any
Data type: Any
Data type: Any
Data type: Any
Data type: Any
awskit::create_host
Create a host in AWS
$user_data = @("USERDATA"/L)
#! /bin/bash
echo "${master_ip} master.inf.puppet.vm master" >> /etc/hosts
curl -k ${master_url} | bash -s agent:certname=${instance_name} extension_requests:pp_role=${role}
| USERDATA
aws::create_host { 'centos-demo-host':
$ami = 'ami-ee6a718a',
$instance_type = 't2.small',
$user_data = $user_data,
$security_groups = ['awskit-agent'],
}
The following parameters are available in the awskit::create_host
defined type.
Data type: Any
Data type: Any
Data type: Any
Data type: Any
Default value: 'none'
Data type: Any
Default value: true
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Data type: Any
Default value: undef
Configures control repo
Supports noop? true
Data type: String
Url of the control repo to push to local GOGS
Data type: String
Name of the public key to configure for GOGS
Data type: String
Name of the public key to configure for GOGS
A short description of this task
Supports noop? false
Data type: String
A simple parameter
Provisions demo Puppet infrastructure
Supports noop? true
Data type: Enum[master, linux_node, windows_node, discovery, windc]
Instance type to create
Data type: Integer
Number of instances to create
purges all nodes with names matching pattern. Use with caution!
Supports noop? false
Data type: String
The grep pattern of node names to be purged
Data type: Enum['true', 'false']
If true, nodes are really purged