Skip to content

Instantly share code, notes, and snippets.

View mechastorm's full-sized avatar

Shih Oon Liong mechastorm

View GitHub Profile
@mechastorm
mechastorm / gist:78c131ce672e5ffa6fd8ac12c872caed
Last active October 23, 2017 22:32
Installing Cloud Custodian Mailer
# Source from https://github.com/capitalone/cloud-custodian/tree/master/tools/c7n_mailer
git clone https://github.com/capitalone/cloud-custodian
# Not mentioned in docs, you should run from the root of the repo
cd cloud-custodian
virtualenv c7n_mailer
source c7n_mailer/bin/activate
# In the README, it mentions to instead `cd c7n_mailer` but that goes to the virualenv environment, that has no requirements.txt
2017/06/08 18:02:44 [INFO] Terraform version: 0.9.8
2017/06/08 18:02:44 [INFO] Go runtime version: go1.8.3
2017/06/08 18:02:44 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.9.8/bin/terraform", "apply"}
2017/06/08 18:02:44 [DEBUG] Detected home directory from env var: /myfolder
2017/06/08 18:02:44 [DEBUG] Detected home directory from env var: /myfolder
2017/06/08 18:02:44 [DEBUG] Attempting to open CLI config file: /myfolder/.terraformrc
2017/06/08 18:02:44 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/06/08 18:02:44 [INFO] CLI command args: []string{"apply"}
2017/06/08 18:02:44 [DEBUG] Detected home directory from env var: /myfolder
2017/06/08 18:02:44 [DEBUG] command: loading backend config file: /myfolder/ops/workspace/folder
@mechastorm
mechastorm / teleport.sh
Last active August 2, 2017 19:59
Teleport Upstart Script
#!/bin/bash
#
# /etc/rc.d/init.d/teleport
#
# Daemonize the teleport agent.
#
# chkconfig: 2345 95 20
# description: SSH Infrastructure for clusters and teams # processname: teleport
# pidfile: /var/run/teleport/pidfile
@mechastorm
mechastorm / _service.md
Created January 31, 2018 21:37 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)

Keybase proof

I hereby claim:

  • I am mechastorm on github.
  • I am mechastorm (https://keybase.io/mechastorm) on keybase.
  • I have a public key ASDBNG2rttEyCfqCP9WJ8RhiJVL30cnynTncx_zuI5tkCAo

To claim this, I am signing this object:

https://github.com/ansible/ansible/releases.atom
https://github.com/ansible/molecule/releases.atom
https://github.com/ansible/ansible-lint/releases.atom
https://github.com/inspec/inspec/releases.atom
https://github.com/gravitational/teleport/releases.atom
https://github.com/hashicorp/consul/releases.atom
https://github.com/hashicorp/terraform/releases.atom
https://github.com/hashicorp/vault/releases.atom
https://github.com/runatlantis/atlantis/releases.atom
https://github.com/terraform-providers/terraform-provider-github/releases.atom