Skip to content

Instantly share code, notes, and snippets.

@sykesm
sykesm / Vagrantfile
Last active August 29, 2015 14:07
Vagrantfile to bring up bosh cli and bosh-life; useful for windows users
Vagrant.configure('2') do |config|
config.vm.define "cli" do |cli|
cli.vm.box = 'hashicorp/precise64'
cli.vm.provision :shell, privileged: true, inline: $APT
cli.vm.provision :shell, privileged: false, inline: $RUBY
cli.vm.provision :shell, privileged: false, inline: $CF
end
config.vm.define "bosh-lite" do |bosh|
@sykesm
sykesm / bosh-lite-admin
Last active October 26, 2015 12:35
bosh-lite-scripts
#!/bin/sh
# CF_TRACE=true cf curl -X POST -H "Content-Type: application/json" -d '{"name":"beta","non_basic_services_allowed":true,"total_services":15,"total_routes":300,"memory_limit":4096,"trial_db_allowed":true}' /v2/quota_definitions
CF=/usr/local/bin/cf
$CF api --skip-ssl-validation api.10.244.0.34.xip.io || exit 1
$CF auth admin admin || exit 1
$CF create-org playground || exit 1
$CF target -o playground || exit 1
@sykesm
sykesm / gist:6912c3574ba28bbd387e
Created September 29, 2014 14:32
10 parallel stages
[sykesm@sykesm-macbook] (master)$ ~/parallel_deployment.sh
Creating org parallel-test as admin...
OK
TIP: Use 'cf target -o parallel-test' to target new org
API endpoint: https://api.10.244.0.34.xip.io (API version: 2.14.0)
User: admin
Org: parallel-test
Space: No space targeted, use 'cf target -s SPACE'
[4] • Failure [16.353 seconds]
[4] Stager
[4] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/stager_test.go:310)
[4] Staging
[4] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/stager_test.go:309)
[4] with one stager running
[4] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/stager_test.go:281)
[4] runs the compiler on the executor with the correct environment variables, bits and log tag, and responds with the detected buildpack [It]
[4] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/stager_test.go:236)
[4]
[4] • Failure [18.527 seconds]
[4] Stager
[4] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/stager_test.go:310)
[4] Staging
[4] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/stager_test.go:309)
[4] with two stagers running
[4] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/stager_test.go:308)
[4] only one returns a staging completed response [It]
[4] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/stager_test.go:307)
[4]
[2] • Failure [18.056 seconds]
[2] Stager
[2] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/stager_test.go:310)
[2] Staging
[2] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/stager_test.go:309)
[2] with one stager running
[2] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/stager_test.go:281)
[2] when compilation fails
[2] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/stager_test.go:280)
[2] responds with the error, and no detected buildpack present [It]
[3] WARNING: DATA RACE
[3] Write by main goroutine:
[3] github.com/cloudfoundry/yagnats.(*Client).connect()
[3] /var/cache/drone/src/inigo/loggregator/src/github.com/cloudfoundry/yagnats/client.go:175 +0x104
[3] github.com/cloudfoundry/yagnats.(*Client).Connect()
[3] /var/cache/drone/src/inigo/loggregator/src/github.com/cloudfoundry/yagnats/client.go:62 +0x48
[3] github.com/cloudfoundry/loggregatorlib/cfcomponent.(*Config).Validate()
[3] /var/cache/drone/src/inigo/loggregator/src/github.com/cloudfoundry/loggregatorlib/cfcomponent/config.go:38 +0x2d0
[3] loggregator.(*Config).Validate()
[3] /var/cache/drone/src/inigo/loggregator/src/loggregator/loggregator.go:53 +0x1ad
[3] • Failure [12.777 seconds]
[3] Executor
[3] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/executor_test.go:392)
[3] Running a command
[3] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/executor_test.go:265)
[3] should run the command with the provided environment [It]
[3] (/var/cache/drone/src/inigo/src/github.com/cloudfoundry-incubator/inigo/executor_test.go:189)
[3]
[3] Timed out after 5.025s.
[3] Expected
[3] ==================
[3] WARNING: DATA RACE
[3] Read by main goroutine:
[3] github.com/cloudfoundry/loggregatorlib/agentlistener.(*agentListener).Stop()
[3] /var/cache/drone/src/inigo/loggregator/src/github.com/cloudfoundry/loggregatorlib/agentlistener/agent_listener.go:59 +0x3a
[3] loggregator.(*Loggregator).Stop()
[3] /var/cache/drone/src/inigo/loggregator/src/loggregator/loggregator.go:133 +0x50
[3] main.main()
[3] /var/cache/drone/src/inigo/loggregator/src/loggregator/loggregator/main.go:128 +0xf5b
[3]
@sykesm
sykesm / gist:9236131
Created February 26, 2014 19:02
Error during CloudController start when the service bindings foreign key constraint is violated
/var/vcap/packages/cloud_controller_ng/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sequel-3.48.0/lib/sequel/adapters/postgres.rb:158:in `exec': PG::ForeignKeyViolation: ERROR: update or delete on table "apps" violates foreign key constraint "fk_service_bindings_app_id" on table "service_bindings" (Sequel::ForeignKeyConstraintViolation)
DETAIL: Key (id)=(117038) is still referenced from table "service_bindings".
from /var/vcap/packages/cloud_controller_ng/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sequel-3.48.0/lib/sequel/adapters/postgres.rb:158:in `block in execute_query'
from /var/vcap/packages/cloud_controller_ng/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sequel-3.48.0/lib/sequel/database/logging.rb:37:in `log_yield'
from /var/vcap/packages/cloud_controller_ng/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.6.9.171/lib/sequel/extensions/newrelic_instrumentation.rb:42:in `log_yield'
from /var/vcap/packages/cloud_controller_ng/cloud_controller_ng/vendor/bundle/ruby/