Skip to content

Instantly share code, notes, and snippets.

View carmstrong's full-sized avatar

Chris Armstrong carmstrong

View GitHub Profile
@carmstrong
carmstrong / gist:8263958
Created January 5, 2014 03:34
stove 2.0.0 error
carmstrong@linuxmint-pc ~ $ bake
ERROR `warn' is not a valid Log Level!
/var/lib/gems/2.0.0/gems/stove-2.0.0.beta.1/lib/stove/mixins/loggable.rb:19:in `initialize': wrong number of arguments (1 for 0) (ArgumentError)
from /var/lib/gems/2.0.0/gems/stove-2.0.0.beta.1/lib/stove/mixins/loggable.rb:19:in `new'
from /var/lib/gems/2.0.0/gems/stove-2.0.0.beta.1/lib/stove/mixins/loggable.rb:19:in `log'
from /var/lib/gems/2.0.0/gems/stove-2.0.0.beta.1/lib/stove/mixins/loggable.rb:28:in `log'
from /var/lib/gems/2.0.0/gems/stove-2.0.0.beta.1/lib/stove/cli.rb:45:in `rescue in execute!'
from /var/lib/gems/2.0.0/gems/stove-2.0.0.beta.1/lib/stove/cli.rb:53:in `execute!'
from /var/lib/gems/2.0.0/gems/stove-2.0.0.beta.1/bin/bake:4:in `<top (required)>'
from /usr/local/bin/bake:23:in `load'
@carmstrong
carmstrong / gist:8534898
Created January 21, 2014 05:33
test-kitchen: cannot load such file -- /home/vagrant/spec (LoadError)
Chef Client finished, 9 resources updated
Finished converging <openjdk-ubuntu-1304> (2m54.91s).
-----> Setting up <openjdk-ubuntu-1304>...
Fetching: thor-0.18.1.gem (100%)
Fetching: busser-0.6.0.gem (100%)
Successfully installed thor-0.18.1
Successfully installed busser-0.6.0
2 gems installed
-----> Setting up Busser
Creating BUSSER_ROOT in /tmp/busser
@carmstrong
carmstrong / gist:8573576
Created January 23, 2014 05:49
chefspec 3.1.4: undefined method `immediate_notifications' for #<ChefSpec::Runner:0x00000003be8590>
2) java::openjdk notifies set_attributes_from_version sends notification to update-java-alternatives
Failure/Error: expect(chef_run).to notify('java_alternatives').to(:set)
NoMethodError:
undefined method `immediate_notifications' for #<ChefSpec::Runner:0x00000003be8590>
# ./spec/openjdk_spec.rb:50:in `block (3 levels) in <top (required)>'=
------
test
describe 'notifies set_attributes_from_version' do
@carmstrong
carmstrong / gist:9938879
Last active August 29, 2015 13:58
RSpec mock test error
# config
RSpec.configure do |config|
config.before(:each) do
etcd = double
require 'etcd'
Etcd.client.stub(:new).and_return(etcd)
allow(etcd).to receive(:get).and_raise(Net::HTTPFatalError)
end
end
@carmstrong
carmstrong / a.service
Last active August 29, 2015 14:00
fleetctl queues job for scheduling
[Unit]
Description=a
[Service]
TimeoutStartSec=20m
ExecStart=/bin/bash -c "while true; do echo 'a...' && sleep 10; done"
[Install]
WantedBy=multi-user.target
fleetctl --strict-host-key-checking=false start registry/systemd/deis-registry.service logger/systemd/deis-logger.service cache/systemd/deis-cache.service database/systemd/deis-database.service router/systemd/deis-router.service
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0xad83]
goroutine 18 [running]:
runtime.panic(0x338120, 0x7e0cf9)
/usr/local/go/src/pkg/runtime/panic.c:266 +0xb6
main.checkJobTarget(0xc2100ce840, 0x15, 0xa, 0x951110, 0xc210000008, ...)
/Users/bcwaldon/src/fleet/scripts/fleet/gopath/src/github.com/coreos/fleet/fleetctl/start.go:124 +0x253
created by main.waitForScheduledUnits
@carmstrong
carmstrong / provision-ec2-cluster.sh
Created April 30, 2014 22:21
dynamic user-data in provision-ec2-cluster.sh
#!/usr/bin/env bash
#
# Usage: ./provision-ec2-cluster.sh
#
set -e
THIS_DIR=$(cd $(dirname $0); pwd) # absolute path
CONTRIB_DIR=$(dirname $THIS_DIR)
@carmstrong
carmstrong / gist:23fd387c80942540236a
Created May 28, 2014 18:43
Docker index out-of-space
Step 0 : FROM deis/base
Pulling image (latest) from deis/base, endpoint: https://cdn-registry-1.docker.io/v1/ 60024338bc63
Download complete 511136ea3c5a
Download complete 6170bb7b0ad1
Error downloading dependent layers 79fdb1362c84
Error pulling image (latest) from deis/base, endpoint: https://cdn-registry-1.docker.io/v1/, mkdir /var/lib/docker/btrfs/subvolumes/79fdb1362c848d06252eb2cb466fe196d1f852b11d8c4532b21dfd9c64cfa632/usr/share/doc/lsb-base: no space left on device 60024338bc63
Error pulling image (latest) from deis/base, mkdir /var/lib/docker/btrfs/subvolumes/79fdb1362c848d06252eb2cb466fe196d1f852b11d8c4532b21dfd9c64cfa632/usr/share/doc/lsb-base: no space left on device 60024338bc63
Could not find repository on any of the indexed registries.
@carmstrong
carmstrong / fleettest.sh
Created June 17, 2014 22:54
Fleet load blocking on ExecStartPre
#!/bin/bash
for i in {1..10}
do
printf "[Service]\nExecStartPre=/bin/sh -c 'while true; do echo hi; done'\nExecStart=/bin/true\n" > ./$i.service
fleetctl load --block-attempts=600 ./$i.service
rm -f ./$i.service
fleetctl start $i.service
done
diff --git a/contrib/ec2/README.md b/contrib/ec2/README.md
index 6bbf8e1..fc39338 100644
--- a/contrib/ec2/README.md
+++ b/contrib/ec2/README.md
@@ -62,11 +62,12 @@ which is already filled out. The defaults will be applied for the other settings
## Choose whether to launch in VPC
-To launch you cluster into a VPC, export two additional environment variables:
+To launch your cluster into a VPC, export three additional environment variables: