Skip to content

Instantly share code, notes, and snippets.

View scottslowe's full-sized avatar

Scott S. Lowe scottslowe

View GitHub Profile
@scottslowe
scottslowe / smb.conf
Created December 19, 2014 18:39
This snippet from the Samba smb.conf configuration file will help enable Active Directory integration from Linux and UNIX platforms.
workgroup = <NetBIOS name of AD domain>
security = ads
realm = <DNS name of AD domain>
use kerberos keytab = true
password server = <Space-delimited list of AD DCs>
@scottslowe
scottslowe / servers.yaml
Created October 21, 2014 21:30
This YAML file is intended to be used with an appropriately configured Vagrantfile (see yaml-vagrantfile for an example).
---
- name: coreos-01
box: coreos-alpha
ram: 512
ip: 172.17.8.101
- name: coreos-02
box: coreos-alpha
ram: 512
ip: 172.17.8.102
- name: coreos-03
@scottslowe
scottslowe / yaml-vagrantfile
Created October 21, 2014 21:16
This Vagrantfile works with an external data file (a YAML file, named servers.yaml) to create multiple Vagrant boxes easily. The servers.yaml file contains all the specifics and can be easily edited to change the number and type of boxes to create. The Vagrantfile remains unchanged.
# -*- mode: ruby -*-
# # vi: set ft=ruby :
# Specify minimum Vagrant version and Vagrant API version
Vagrant.require_version ">= 1.6.0"
VAGRANTFILE_API_VERSION = "2"
# Require YAML module
require 'yaml'
@scottslowe
scottslowe / coreos-cloud-config.yml
Last active August 29, 2015 14:07
This Heat template spins up three CoreOS Linux instances, configures them via cloud-init/cloud-config to create an etcd cluster and start both etcd and fleet, and configures Docker to listen on a TCP socket. It requires an existing Neutron network, an existing Glance image for CoreOS, a security group allowing the appropriate traffic, and a disc…
heat_template_version: 2013-05-23
description: >
A Heat template to add CoreOS instances to an existing network and configure them via cloud-init/cloud-config
parameters:
network_id:
type: string
label: Neutron network ID
description: ID of existing Neutron network to use
default: dd6de1d2-735e-4b94-963b-b79aae7bcf1a
image_id:
@scottslowe
scottslowe / simple-example-vagrantfile
Created September 12, 2014 17:07
This is an extremely simple Vagrantfile to turn up a single Ubuntu 12.04.4 64-bit VM under VirtualBox.
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Box
config.vm.box = "ubuntu/precise64"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
# Shared folders
config.vm.synced_folder ".", "/vagrant"
@scottslowe
scottslowe / docker-simple.yml
Created August 22, 2014 22:32
This very simple Heat template will deploy a Nginx container onto an existing Docker host in an OpenStack environment.
heat_template_version: 2013-05-23
description: >
Heat template to deploy Docker containers to an existing host
resources:
nginx-01:
type: DockerInc::Docker::Container
properties:
image: nginx
docker_endpoint: 'tcp://192.168.1.207:2345'
@scottslowe
scottslowe / nginx.1.service
Last active December 11, 2016 16:45
This systemd unit can be modified slightly (change the filename and the container name) to run multiple Docker containers across hosts in an etcd/fleet cluster.
[Unit]
Description=Nginx web front-end
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=/usr/bin/docker pull nginx
ExecStart=/usr/bin/docker run --rm --name nginx-01 -p 80:80 nginx
ExecStop=/usr/bin/docker stop nginx-01
@scottslowe
scottslowe / nginx.service
Created August 19, 2014 16:57
This very simple systemd unit file will launch a Docker container running the Nginx web server.
[Unit]
Description=Nginx web front-end
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=/usr/bin/docker pull nginx
ExecStart=/usr/bin/docker run --rm --name nginx -p 80:80 nginx
ExecStop=/usr/bin/docker stop nginx
@scottslowe
scottslowe / coreos-heat.yaml
Last active August 29, 2015 14:05
This YAML-formatted OpenStack Heat template can be used to deploy and configure CoreOS instances (including configuring an etcd cluster) on OpenStack.
heat_template_version: 2013-05-23
description: >
A simple Heat template to deploy CoreOS into an existing cluster.
parameters:
network_id:
type: string
label: Network ID
description: ID of existing Neutron network to use
default: <ID of Neutron network to which instances should connect>
image_id:
@scottslowe
scottslowe / arista-veos.xml
Created August 5, 2014 02:47
This libvirt domain XML can be used to create a KVM guest for running a virtualized instance of Arista EOS (vEOS).
<domain type='kvm'>
<name>veos</name>
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static'>1</vcpu>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64' machine='pc-i440fx-1.5'>hvm</type>