Skip to content

Instantly share code, notes, and snippets.

@bbenson29
bbenson29 / cloud-config.yml
Created July 31, 2018 15:28 — forked from justinsoliz/cloud-config.yml
Terraform definition for Jenkins with ECS, EFS, CoreOS
#cloud-config
write-files:
- path: /etc/conf.d/nfs
permissions: '0644'
content: |
OPTS_RPC_MOUNTD=""
coreos:
units:
- name: update-engine.service
# This tells kubecfg to read its config from the local directory
export KUBECONFIG=./kubeconfig
# Looking at the cluster
kubectl get nodes
kubectl get pods --namespace=kube-system
# Running a single pod
kubectl run --generator=run-pod/v1 --image=gcr.io/kuar-demo/kuard-amd64:1 kuard
kubectl get pods
@bbenson29
bbenson29 / install.sh
Created July 8, 2017 16:05
Install terraform and packer on Centos 7
#!/bin/bash
set -x
TERRAFORM_VERSION="0.9.11"
PACKER_VERSION="1.0.2"
# install pip
pip install -U pip && pip3 install -U pip
if [[ $? == 127 ]]; then
wget -q https://bootstrap.pypa.io/get-pip.py
@bbenson29
bbenson29 / web-servers.md
Created February 4, 2017 01:51 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@bbenson29
bbenson29 / saltsample_09252012_01
Created January 28, 2017 02:48 — forked from UtahDave/saltsample_09252012_01
Saltstack sample of using states and pillars for users
Here is a sample of how I am currently dealing with users.
Big thanks to uggedal! I used his user states as an example: https://github.com/uggedal/states
###
# How to create password hashes
###
python -c "import crypt; print crypt.crypt('password', '\$6\$SALTsalt\$')"
###
Vagrant.configure("2") do |config|
config.vm.define "webserver01" do |web01|
web01.vm.box = "jptoto/Windows2012R2"
web01.vm.hostname = "windows-webserver01"
web01.vm.communicator = "winrm"
web01.winrm.username = "vagrant"
web01.winrm.password = "vagrant"
web01.vm.network "private_network", ip: "192.168.57.3"
web01.vm.provider "virtualbox" do |vb|
vb.memory = 2048
SATA Controller
************************************************
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config1|
config1.vm.define "apt" do |a|
a.vm.box = "geerlingguy/ubuntu1604"
a.vm.hostname = "apt"
a.vm.network "private_network", ip: "192.168.60.8"
disk = './large_disk.vdi'
a.vm.provider "virtualbox" do |vb|
if not File.exist?(disk)
@bbenson29
bbenson29 / gist:d1b585fa645e48a2bcf7ab7a0f54a930
Created January 4, 2017 01:28
Create multiple EC2 Security Group using Ansible loop
---
- hosts: localhost
connection: local
gather_facts: false
vars:
instances:
- name: consul.test.version
group: "test.version"
security_group: ["default", "consul.test.version"]
@bbenson29
bbenson29 / gist:de0ccf7eb3160590275f60e83e796590
Created January 3, 2017 14:03
Provision ec2 instance with ansible
---
- hosts: localhost
connection: local
gather_facts: true
become: true
vars_files:
- vars.yml
tasks: