Skip to content

Instantly share code, notes, and snippets.

View carmstrong's full-sized avatar

Chris Armstrong carmstrong

View GitHub Profile
@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)
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 / 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
@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 / 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: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: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'