Skip to content

Instantly share code, notes, and snippets.

@pidah
pidah / multi_aws_region_vagrantfile
Created July 11, 2013 11:32
deploy multiple (in this case 2) AWS instances in different regions in a single Vagrantfile
Vagrant.require_plugin "vagrant-aws"
Vagrant.configure("2") do |config|
config.vm.define :usa do |usa_config|
usa_config.vm.provider :aws do |aws, override|
override.vm.box = "ubuntu_aws"
override.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"
override.ssh.private_key_path = ".vagrant/web.pem"
@pidah
pidah / gist:10369211
Created April 10, 2014 11:09
virtualbox-4.3.10-vagrant-1.5.2-fix
If you are running Virtualbox 4.3.10 , Vagrant 1.5.2 and run into the following error on a Mac OSX mavericks host -
default: /vagrant => /xxxxx/xxxxx/xxxxx
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:
mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` /vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` /vagrant /vagrant
@pidah
pidah / keybase.md
Created April 28, 2015 16:01
keybase.md

testing

Keybase proof

I hereby claim:

  • I am pidah on github.
  • I am peteridah (https://keybase.io/peteridah) on keybase.
  • I have a public key whose fingerprint is F0A6 2FFA 8EB0 3257 D036 EC3A 567B 6442 F90A C229

To claim this, I am signing this object:

from st2actions.runners.pythonrunner import Action
import json
class CloudFormationSpec(Action):
def run(self, payload, config):
# take the payload name and replace any non-alphanumerical characters with "-"
# to create a name for the database
try:
stack_name = "pidah-test-bucket"
---
chain:
-
name: "cloudformation_spec"
ref: "kubernetes.cloudformation_spec"
params:
payload: "{{payload}}"
on-success: "create_cloudformation_stack"
-
name: "create_cloudformation_stack"
# kubectl describe rs es-client-3602079238
Name: es-client-3602079238
Namespace: default
Image(s): quay.io/pires/docker-elasticsearch-kubernetes:2.3.5_1
Selector: component=elasticsearch,pod-template-hash=3602079238,role=client
Labels: component=elasticsearch,pod-template-hash=3602079238,role=client
Replicas: 2 current / 2 desired
Pods Status: 2 Running / 0 Waiting / 0 Succeeded / 0 Failed
Volumes:
storage:
@pidah
pidah / signal.go
Created March 20, 2018 01:37 — forked from reiki4040/signal.go
signal handling example for golang
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
)
func main() {
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: kafka-broker
spec:
replicas: 1
template:
metadata:
labels:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kafka-ingress
spec:
rules:
- host: minikube
http:
paths:
- path: /