This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install hiera-eyaml | |
eyaml createkeys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chown -R puppet:puppet /var/lib/puppet/keys | |
chmod -R 0500 /var/lib/puppet/keys | |
chmod 0400 /var/lib/puppet/keys/*.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:backends: | |
- eyaml | |
- yaml | |
:yaml: | |
:datadir: '/etc/puppet/hieradata' | |
:eyaml: | |
:datadir: '/etc/puppet/hieradata' | |
# If using the pkcs7 encryptor (default) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ln -s /etc/hiera.yaml /etc/puppet/hiera.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
pkcs7_private_key: '/var/lib/puppet/keys/private_key.pkcs7.pem' | |
pkcs7_public_key: '/var/lib/puppet/keys/public_key.pkcs7.pem' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eyaml encrypt -s 'secretpassword' -l 'parameter-lookup' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hiera_config=/some/other/path/hiera.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://<private-git>/codebattles | |
git checkout -b dstark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import boto3 | |
import json | |
import base64 | |
def headers_to_go_style(headers): | |
retval = {} | |
for k, v in headers.items(): | |
retval[k] = [v] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_ip_of_peer_instances_and_write_to_settings_file(self): | |
''' | |
This is run on the source EC2 instance as part of UserData bootstrapping | |
1) Look at the peer(s)' VPC CloudFormation Stack's Outputs for a list of subnets, public or private as defined | |
in the constructor. | |
2) Find instances in those subnets created by this library | |
3) Get the Private IP address of target instances and write it to a local configuration file | |
''' | |
# Query for peer CloudFormation, get instances |
OlderNewer