Skip to content

Instantly share code, notes, and snippets.

View robszumski's full-sized avatar

Rob Szumski robszumski

View GitHub Profile

This is a temporary workaround to have etcd listening on all interfaces so you can access it from docker containers.

Add a local etcd unit file

Create a file called /media/state/units/etcd-local.service that has the following contents:

[Unit]
Description=etcd local
@philips
philips / gist:6998454
Last active December 25, 2015 15:29
Using a port in the service file name

Create simplehttp@.service

cat > simplehttp@.service
[Unit]
Description=Serves stuff over http

[Service]
ExecStart=/usr/bin/docker run -p %I:8080 b88a40f29dd7
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@aredridel
aredridel / boot-coreos.sh
Last active January 4, 2016 18:12
Set up and boot CoreOS on top of a stock DigitalOcean Fedora 19 install. Abuses the Fedora 19 root as the CoreOS STATE partition. Still todo: copy SSH keys from Fedora install.
#!/bin/sh
kexec --load /boot/coreos_production_pxe.vmlinuz --initrd=/boot/coreos_production_pxe_image.cpio.gz --append='state=/dev/vda root=squashfs: sshkey="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAEAQCZ3fvhC7StXFdFRuXApBuXyS2phoH7ZVKMUMOi3DrbnZWC01GUq74WdalRDHtfq2dl0CPctLb8RHSD+/dKgWEH0gmoEOCio09ZAY5Ui4Cy+0cCGefXkUnJR4lgNOYD076BXjJwsCVCD8sMlFFT08Qn4/voP0jpL1uvvoWiC1KSvSjZf7sP/hRgsO633OuclXyVVq7mC6q+2QVg6hfO49Gt7TVXb+8lc8aUHAYyrXEVag6oICWqxWlSglbEpXCXhK4RB1f8h2vCaEPe2Kf1LNPYJ3dN5H5v+tnst9oZbFjo/qNSm4RvPBb3nsNARdcemdGcwiTjAiIn9gMxBMOyiYOYSgVwGd2U76FR0/RUFUORprynn6uebBhtpGzIAuFsUygMAPAM2tocO+t+h8AQviF6IeA9rKwf5bFTXV9HLy+iUoCWsVBmGypfGbsD7UNg3DIpXv4FdoLDDiCq+OV16ludjLk5pjknshH0cII+Q5b1fcITKSMrZ0CnMytkHHYPTvJ/uc2W9p3howAbMCs+WpNsSnLoCfq5ZjWclauV9Sn7OULQSMuKzTBF+bN7FOyolPbFrW+B3ESUpbonbLbKOubvsBjnUQLNoNjH4pa5Sg3Pluh1EoYLq/oKYU/C+SSwnbRy9N1h2z5UZy/CyrGNG8UomkuFIZWOAGH+zqwU1iCYaWHPgUNXM+4gSe0cGmVesFRpco5nhqvHGdDtw3OCC1U0f9jj6Pk+4jFmulj45+Hu4ZEL8wyMlftbycT8KtuqSVOD/yuytPFlvBzFrjP9s3V8ZN46y5rLpR9dAD+DJHYVESGxQV9lLq2g0p8IJ
[Unit]
Description=docker-registry
After=docker.service
Requires=docker.service
[Service]
TimeoutSec=5min
ExecStart=/usr/bin/docker run --name docker-registry --rm -p 5000:5000 -v /media/state/registry:/tmp/registry samalba/docker-registry
ExecStop=-/usr/bin/docker stop docker-registry
ExecStopPost=-/usr/bin/docker rm docker-registry
@tuppa
tuppa / gist:9655843
Created March 20, 2014 02:06
Updated CoreOS CloudFormation template - to use SourceSecurityGroupId in the ingress rules
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "CoreOS on EC2: http://coreos.com/docs/ec2/",
"Mappings" : {
"RegionMap" : {
"ap-northeast-1" : {
"AMI" : "ami-ef1f6eee"
},
"sa-east-1" : {
"AMI" : "ami-0145e61c"
@rosskukulinski
rosskukulinski / cloud_config
Created October 10, 2014 23:25
CoreOS cloud_config for Rackspace Public Cloud
#cloud-config
coreos:
fleet:
public-ip: $public_ipv4
metadata: region=dfw,provider=rackspace
etcd:
discovery: https://discovery.etcd.io/youridhere
# multi-region and multi-cloud deployments need to use $public_ipv4
# We'll actually fill this in using fixup_etc.sh (see below)
# addr: $rax_privatenet_ipv4:4001
@brianredbeard
brianredbeard / logstash.conf
Last active May 2, 2016 20:28
logstash config to break out systemd output from `/usr/lib/systemd/systemd-journal-upload`
input {
tcp {
port => 19532
type => journald
}
}
filter {
if [type] == "journald" {
multiline {
@bcwaldon
bcwaldon / user-data
Created February 18, 2015 20:39
kubernetes cloud-config
#cloud-config
coreos:
etcd:
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
fleet:
public-ip: $private_ipv4
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=docker.socket early-docker.target network.target
Requires=docker.socket early-docker.target
[Service]
EnvironmentFile=-/run/flannel_docker_opts.env
MountFlags=slave
LimitNOFILE=1048576