Skip to content

Instantly share code, notes, and snippets.

View scottslowe's full-sized avatar

Scott S. Lowe scottslowe

View GitHub Profile
@scottslowe
scottslowe / new-lswitch-json
Created February 19, 2014 23:26
This snippet of JSON-encoded data could be used with a VMware NSX RESTful API call to create a new logical switch.
{
"display_name": "test-lswitch",
"port_isolation_enabled": false,
"transport_zones": [
{
"zone_uuid": "dca3d854-b329-5458-b711-0df2d5762d7a",
"binding_config": {},
"transport_type": "stt"
}
],
@scottslowe
scottslowe / libvirt-default-network
Created April 2, 2014 15:32
This XML is the definition of the default libvirt network.
<network>
<name>default</name>
<uuid>259bc60d-0ed4-4924-8537-6bccb979843e</uuid>
<forward mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
</dhcp>
</ip>
@scottslowe
scottslowe / heat-json-example.json
Created April 30, 2014 17:22
This OpenStack Heat template creates two instances on a logical network with a logical router attached.
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Sample Heat template that spins up multiple instances and a private network (JSON)",
"Resources" : {
"heat_network_01" : {
"Type" : "OS::Neutron::Net",
"Properties" : {
"name" : "heat-network-01"
}
},
@scottslowe
scottslowe / heat-yaml-example.yml
Created May 1, 2014 16:51
This Heat template, provided in HOT format using YAML, launches a multi-instance topology using a logical network and a logical router with an uplink.
heat_template_version: 2013-05-23
description: >
A simple Heat template that spins up multiple instances and a private network (HOT template in YAML).
resources:
heat_network_01:
type: OS::Neutron::Net
properties:
admin_state_up: true
name: heat-network-01
heat_subnet_01:
@scottslowe
scottslowe / heat-dlr.yml
Created May 29, 2014 05:09
This snippet of a HOT-formatted template could be used by OpenStack Heat to create a distributed logical router.
heat_template_version: 2013-05-23
description: >
A simple Heat template to create a distributed logical router.
resources:
router0:
type: OS::Neutron::Router
properties:
admin_state_up: True
name: distributed-router
value_specs: { distributed: "True" }
@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 / 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 / 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 / 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 / apache-krb.conf
Created December 19, 2014 19:19
This snippet of Apache configuration will enable Kerberos authentication, useful for integration with services like Active Directory.
LoadModule auth_kerb_module modules/mod_auth_kerb.so
<Location /secured>
AuthType Kerberos
AuthName "Kerberos Login"
KrbMethodNegotiate On
KrbMethodK5Passwd On
KrbAuthRealms EXAMPLE.COM
Krb5KeyTab /etc/httpd/conf/httpd.keytab
require valid-user