-
Make sure you have npm installed
-
Install node-lambda
$ npm install -g node-lambda
-
Create a directory somewhere in your home directory or wherever you want to put your
This file contains hidden or 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 bash | |
| usage() { | |
| echo "Usage: `basename $0` <STACK_NAME>" | |
| exit 1 | |
| } | |
| [ "$#" -eq 1 ] || usage | |
| stack_name="$1" |
This file contains hidden or 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 boto | |
| import boto.ec2 | |
| regions = [region.name for region in boto.ec2.regions()] | |
| for region in regions: | |
| print region |
This file contains hidden or 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/python | |
| def sort_nicely(l): | |
| """ Sort the given list in the way that humans expect. | |
| """ | |
| convert = lambda text: int(text) if text.isdigit() else text | |
| alphanum_key = lambda key: [ convert(c) for c in re.split('([0-9]+)', key) ] | |
| l.sort( key=alphanum_key ) |
This file contains hidden or 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
| nubis-builder build --verbose | |
| 1436310877: Loading /Users/limed/nubis/nubis-builder/secrets/variables.json | |
| 1436310877: Loading /Users/limed/nubis/nubis-jumphost/nubis/builder/project.json | |
| 1436310877: Loading /Users/limed/nubis/nubis-jumphost/nubis/builder/provisioners.json | |
| 1436310878: Loading builder amazon-ebs-amazon-linux from /Users/limed/nubis/nubis-builder/packer/builders | |
| 1436310878: Running generate-source-ami-ids --source-project-name nubis-base --build-file /tmp/nubis-builder.json.dpPH8AtG --output-file /tmp/source_ami_ids.json.5ILFpagf | |
| nubis-jumphost: Builder aws_amazon_linux_ebs is using nubis-base 1.44 ebs amazon-linux (ami-49c4c279) | |
| 1436310881: Loading /tmp/source_ami_ids.json.5ILFpagf | |
| 1436310881: Looking for /Users/limed/nubis/nubis-jumphost/nubis/puppet/files | |
| 1436310881: Looking for /Users/limed/nubis/nubis-jumphost/nubis/puppet/files |
This file contains hidden or 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
| diff --git a/nubis/terraform/inputs.tf b/nubis/terraform/inputs.tf | |
| index a8faa09..0ff00df 100644 | |
| --- a/nubis/terraform/inputs.tf | |
| +++ b/nubis/terraform/inputs.tf | |
| @@ -95,6 +95,6 @@ variable "manage_iam" { | |
| description = "IAM roles should be managed in which region" | |
| default = { | |
| us-east-1 = "1" | |
| - us-west-2 = "0" | |
| + us-west-2 = "1" |
This file contains hidden or 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
| # confd -onetime -log-level=debug | |
| 2015-08-21T16:23:31Z okta.limed-okta.sandbox.us-west-2.nubis.allizom.org confd[22009]: INFO Backend set to consul | |
| 2015-08-21T16:23:31Z okta.limed-okta.sandbox.us-west-2.nubis.allizom.org confd[22009]: INFO Starting confd | |
| 2015-08-21T16:23:31Z okta.limed-okta.sandbox.us-west-2.nubis.allizom.org confd[22009]: INFO Backend nodes set to localhost:8500 | |
| 2015-08-21T16:23:31Z okta.limed-okta.sandbox.us-west-2.nubis.allizom.org confd[22009]: DEBUG Loading template resources from confdir /etc/confd | |
| 2015-08-21T16:23:31Z okta.limed-okta.sandbox.us-west-2.nubis.allizom.org confd[22009]: DEBUG Loading template resource from /etc/confd/conf.d/datadog.toml | |
| 2015-08-21T16:23:31Z okta.limed-okta.sandbox.us-west-2.nubis.allizom.org confd[22009]: DEBUG Loading template resource from /etc/confd/conf.d/mig-agent-cert.toml | |
| 2015-08-21T16:23:31Z okta.limed-okta.sandbox.us-west-2.nubis.allizom.org confd[22009]: DEBUG Loading template resource from /etc/confd/conf.d/mig-agent-key.toml | |
| 2015-08-21T16:23:31 |
This file contains hidden or 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
| /** | |
| * A simple Lambda function that takes an AWS CloudFormation stack name | |
| * and returns the physical resouce ID | |
| **/ | |
| exports.handler = function(event, context) { | |
| console.log("REQUEST RECEIVED:\n", JSON.stringify(event)); | |
| if (event.RequestType == "Delete") { |
This file contains hidden or 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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "*" | |
| ], | |
| "Resource": [ | |
| "*" |
This file contains hidden or 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
| #!/bin/bash | |
| # Search ldap for ssh keys and spits them out | |
| if [[ $# -lt 1 ]]; then | |
| echo "This script will query ldap for an ssh key" | |
| echo "Usage: $0 <ldap email>" | |
| exit 1 | |
| fi | |
| # Gets ldap password from gpg file |