Skip to content
This repository has been archived by the owner on Jul 9, 2022. It is now read-only.

Latest commit

 

History

History
844 lines (402 loc) · 12.5 KB

REFERENCE.md

File metadata and controls

844 lines (402 loc) · 12.5 KB

Reference

Table of Contents

Classes

Defined types

Tasks

  • conf_control_repo: Configures control repo
  • echo: A short description of this task
  • provision: Provisions demo Puppet infrastructure
  • purge_nodes: purges all nodes with names matching pattern. Use with caution!

Classes

awskit

awskit

Provides a central place to configure parameters using hiera. Also selects the right AMI ids based on current region.

Examples

include awskit

Parameters

The following parameters are available in the awskit class.

key_name

Data type: String

Name of the AWS keypair, this is region-dependent.

region

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)

vpc

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.

availability_zone

Data type: String

The availability zone the instances should go into. Should be configured in %{::aws_region}/common.yaml.

subnet

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.

tags

Data type: Hash

AWS instance tags. Provided in common.yaml. The created_by tag can be provided in %{::user}.yaml and deep merged.

master_ip

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.

amis

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.

agent_sc_name

Data type: String

The name of the AWS security group for the agents

master_sc_name

Data type: String

The name of the AWS security group for the master

disco_sc_name

Data type: String

The name of the AWS security group for the Puppet Discovery instances

windc_sc_name

Data type: String

The name of the AWS security group for the Windows Domain Controller

wsus_sc_name

Data type: String

The name of the AWS security group for the WSUS machine

cd4pe_sc_name

Data type: String

The name of the AWS security group for the CD4PE instances

wsus_ip

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: ''

master_name

Data type: String

The name of the puppetmaster.

Default value: 'master.inf.puppet.vm'

ssh_ingress_cidrs

Data type: Array[String]

The ingress CIDR for ssh access of the master.

Default value: ['0.0.0.0/0']

awskit::create_cd4pe

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.

Examples

Using in a manifest
include awskit::create_cd4pe
Using with provision.sh task
tasks/provision.sh cd4pe

Parameters

The following parameters are available in the awskit::create_cd4pe class.

instance_type

Data type: Any

user_data

Data type: Any

Default value: lookup('awskit::create_linux_node::user_data')

instance_name

Data type: Any

Default value: 'awskit-cd4pe'

count

Data type: Any

Default value: 1

awskit::create_discovery

awskit::create_discovery

This class creates an instance in AWS for Puppet Discovery to be installed on

Examples

include awskit::create_discovery

Parameters

The following parameters are available in the awskit::create_discovery class.

instance_type

Data type: Any

user_data

Data type: Any

count

Data type: Any

Default value: 1

instance_name

Data type: Any

Default value: 'awskit-disco'

awskit::create_discovery_nodes

awskit::create_discovery_nodes

This class creates 9 instances in AWS for Puppet Discovery to forage

Examples

include awskit::create_discovery_nodes

Parameters

The following parameters are available in the awskit::create_discovery_nodes class.

instance_type

Data type: Any

user_data

Data type: Any

count

Data type: Any

Default value: 9

instance_name

Data type: Any

Default value: 'awskit-disconode'

awskit::create_linux_node

awskit::create_linux_node

Creates a number of Linux nodes

Examples

include awskit::create_linux_node

Parameters

The following parameters are available in the awskit::create_linux_node class.

instance_type

Data type: Any

user_data

Data type: Any

role

Data type: Any

Default value: undef

environment

Data type: Any

Default value: undef

instance_name

Data type: Any

Default value: 'awskit-linux'

count

Data type: Any

Default value: 1

awskit::create_linux_role

awskit::create_linux_role

Creates a number of Linux nodes with a role

Examples

include awskit::create_linux_role

Parameters

The following parameters are available in the awskit::create_linux_role class.

role

Data type: Any

instance_type

Data type: Any

Default value: lookup('awskit::create_linux_node::instance_type')

user_data

Data type: Any

Default value: lookup('awskit::create_linux_node::user_data')

instance_name

Data type: Any

Default value: 'awskit-linux'

count

Data type: Any

Default value: 1

awskit::create_master

awskit::create_master

Provision a Puppetmaster in AWS

Examples

include awskit::create_master

Parameters

The following parameters are available in the awskit::create_master class.

instance_type

Data type: Any

user_data

Data type: Any

Default value: ''

count

Data type: Any

Default value: 1

instance_name

Data type: Any

Default value: 'awskit-pm'

awskit::create_windc

awskit::create_windc

This class creates an instance in AWS for a Windows Domain Controller to be installed on

Examples

include awskit::create_windc

Parameters

The following parameters are available in the awskit::create_windc class.

instance_type

Data type: Any

user_data

Data type: Any

instance_name

Data type: Any

Default value: 'awskit-windc'

count

Data type: Any

Default value: 1

awskit::create_windows_node

awskit::create_windows_node

Examples

include awskit::create_windows_node

Parameters

The following parameters are available in the awskit::create_windows_node class.

instance_type

Data type: Any

user_data

Data type: Any

count

Data type: Any

Default value: 1

instance_name

Data type: Any

Default value: 'awskit-windows'

awskit::create_wsus

awskit::create

A description of what this class does

Examples

include awskit::create_agents

Parameters

The following parameters are available in the awskit::create_wsus class.

instance_type

Data type: Any

user_data

Data type: Any

count

Data type: Any

Default value: 1

instance_name

Data type: Any

Default value: 'awskit-wsus'

awskit::join_domain

class to make a windows host join a AD domain

awskit::windows_domain

Class: awskit::windows_domain Builds a Windows domain controller and provisions AD resources

Parameters

The following parameters are available in the awskit::windows_domain class.

dn

Data type: Any

localadminpw

Data type: Any

domainname

Data type: Any

domainnbname

Data type: Any

ntdspath

Data type: Any

safemodepw

Data type: Any

Defined types

awskit::create_host

awskit::create_host

Create a host in AWS

Examples

$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'],
  }

Parameters

The following parameters are available in the awskit::create_host defined type.

ami

Data type: Any

instance_type

Data type: Any

user_data

Data type: Any

security_groups

Data type: Any

Default value: 'none'

run_agent

Data type: Any

Default value: true

role

Data type: Any

Default value: undef

environment

Data type: Any

Default value: undef

public_ip

Data type: Any

Default value: undef

Tasks

conf_control_repo

Configures control repo

Supports noop? true

Parameters

control_repo

Data type: String

Url of the control repo to push to local GOGS

public_key_name

Data type: String

Name of the public key to configure for GOGS

public_key_value

Data type: String

Name of the public key to configure for GOGS

echo

A short description of this task

Supports noop? false

Parameters

param

Data type: String

A simple parameter

provision

Provisions demo Puppet infrastructure

Supports noop? true

Parameters

type

Data type: Enum[master, linux_node, windows_node, discovery, windc]

Instance type to create

count

Data type: Integer

Number of instances to create

purge_nodes

purges all nodes with names matching pattern. Use with caution!

Supports noop? false

Parameters

pattern

Data type: String

The grep pattern of node names to be purged

force

Data type: Enum['true', 'false']

If true, nodes are really purged