Skip to content

Instantly share code, notes, and snippets.

View ryanycoleman's full-sized avatar

Ryan Coleman ryanycoleman

  • Stackery
  • Portland, OR
View GitHub Profile
@ryanycoleman
ryanycoleman / cfn-custom-resource.yaml
Created November 19, 2020 16:45
A snippet of a Lambda function that uses cfn-custom-resource to respond appropriately to CloudFormation when invoking a Lambda on deployment
# For more info, read:
## https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html
## https://www.npmjs.com/package/cfn-custom-resource?activeTab=readme
AWS = require('aws-sdk');
const ECS = new AWS.ECS({ region: "us-west-2" });
const SM = new AWS.SecretsManager({ region: "us-west-2" })
const cfnCR = require('cfn-custom-resource');
const { sendSuccess, sendFailure, CREATE, UPDATE, DELETE } = cfnCR;
exports.handler = async (event, context) => {
@ryanycoleman
ryanycoleman / 1-stackery-canvas.html
Last active July 10, 2020 04:22
Stackery's public design canvas can be embedded as an iframe to provide an interactive version of any AWS SAM template. https://app.stackery.io/editor
<iframe title='Stackery canvas of SAM template'
width='100%'
height='500'
frameBorder='0'
src='https://app.stackery.io/editor/design?owner=stackery&repo=quickstart-dotnet&file=template.yaml'>
</iframe>
<!-- The URL params assume GitHub today, where owner is the GH org, repo is the repository name, and file is the SAM template to be rendered -->
<!-- E.g. https://github.com/stackery/quickstart-dotnet/blob/master/template.yaml -->
Send your Puppet Enterprise reports and inventory to Satellite: https://forge.puppetlabs.com/puppetlabs/satellite_pe_tools/readme
Blog post about the PE<->Satellite Integration: https://puppetlabs.com/blog/puppet-enterprise-and-red-hat-satellite-available-now
Blog post about the support agreement between RedHat and Puppet Labs: https://puppetlabs.com/blog/puppet-enterprise-integrates-red-hat-satellite
@ryanycoleman
ryanycoleman / transfer_to_community.md
Created February 4, 2015 14:33
transfer_to_community.md

Advice for migrating existing [Forge] modules to Puppet-Community

Basics

Transferring a module to another owner is pretty simple when you break it down. See puppetlabs-nginx for an example.

Basically, you want to avoid surprising existing users of your module by raising a number of signals that will get their notice. It's as easy as 1-2-3!

  1. Transfer the GitHub repository to the puppet-community organization
  2. Prepare and release the "warning" Forge release to the existing namespace
@ryanycoleman
ryanycoleman / a_puppet.sh
Last active August 29, 2015 14:07
POODLE remediation for Puppet Enterprise 3.3.x based on instructions found on the Puppet Labs blog: http://puppetlabs.com/blog/impact-assessment-sslv3-vulnerability-poodle-attack
/opt/puppet/bin/puppet module install herculesteam-augeasproviders_apache
/opt/puppet/bin/puppet apply puppetmaster.pp
/opt/puppet/bin/puppet apply puppetdashboard.pp
/opt/puppet/bin/puppet apply jetty.pp
@ryanycoleman
ryanycoleman / links
Last active March 28, 2018 17:44
links from 2014 puppetconf contributor summit lightning talks
@ryanycoleman
ryanycoleman / tuesday.txt
Created September 19, 2014 18:51
Ryan's PuppetConf Picks
puppetconf { '2014':
ensure => busy,
website => 'puppetconf.com',
venue => 'sfo',
live_streaming => 'available',
}
11:10am - 11:50am
Getting Started with Puppet - Michael Stahnke, Puppet Labs - http://sched.co/1kR7leZ
Writing and Publishing Puppet Modules - Colleen Murphy, Puppet Labs - http://sched.co/1kR50kp
Monitor association changes string to array on one side, but other side is still a string. Causes a constantly change attempt:
-----
monitor_association changed '{"type"=>"MONITOR_RULE_TYPE_SINGLE", "quorum"=>"0", "monitor_templates"=>"/Common/MyMonitor"}' to '{"type"=>"MONITOR_RULE_TYPE_SINGLE", "monitor_templates"=>["/Common/MyMonitor"], "quorum"=>"0"}'

The pe-easy-agent.sh script mentioned in the instance_defaults hash is available at pe-easy-agent.sh

# puppet module install domcleal-augeasproviders
# puppet resource sshd_config
# cp /etc/ssh/sshd_config /etc/ssh/sshd_config.good
# puppet apply sshd_config.pp
resources { 'sshd_config':
purge => true,
}