Skip to content

Instantly share code, notes, and snippets.

@tduffield
tduffield / hab-pkg-export.log
Created April 25, 2019 14:42
Output of `hab pkg export docker` failing to respect `HAB_BLDR_CHANNEL`
[10][default:/src:130]# HAB_NONINTERACTIVE=true HAB_NOCOLORING=true RUST_LOG=debug RUST_BACKTRACE=1 HAB_BLDR_CHANNEL=buildkite-0181407b-3568-49cb-ab8f-49f52079516b hab pkg export docker chefops/learnchef-backend
[2019-04-25T14:42:10Z DEBUG habitat_common::ui] UI { shell: Shell { input: InputStream { isatty: false }, out: OutputStream { coloring: Never, isatty: false }, err: OutputStream { coloring: Never, isatty: false } } }
[2019-04-25T14:42:10Z DEBUG habitat_core::os::process::imp] Calling execvp(): ("/hab/pkgs/core/hab-pkg-export-docker/0.79.1/20190410224936/bin/hab-pkg-export-docker") ["chefops/learnchef-backend"]
[2019-04-25T14:42:10Z DEBUG habitat_common::ui] UI { shell: Shell { input: InputStream { isatty: false }, out: OutputStream { coloring: Never, isatty: false }, err: OutputStream { coloring: Never, isatty: false } } }
[2019-04-25T14:42:10Z DEBUG hab_pkg_export_docker] clap cli args: ArgMatches { args: {"PKG_IDENT_OR_ARTIFACT": MatchedArg { occurs: 1, indices: [1], vals: ["chefops/learnchef-backen
hab-studio: Creating Studio at /hab/studios/src (default)
hab-studio: Importing chef-es secret origin key
» Importing origin key from standard input
★ Imported secret origin key chef-es-20160623231409.
hab-studio: Entering Studio at /hab/studios/src (default)
hab-studio: Exported: HAB_ORIGIN=chef-es
hab-studio: Exported: HAB_STUDIO_SUP=0
hab-studio: Exported: no_proxy=*.local, 169.254/16
[1][default:/src:0]# build .
@tduffield
tduffield / gist:28acb12ae85816c7563e8ad4bf2f77c3
Created October 16, 2017 20:24
October 16, 2017 3:23 PM - dep failures
[1][default:/src:0]# build .
: Loading /src/habitat/plan.sh
lita: Plan loaded
lita: Validating plan metadata
lita: hab-plan-build setup
lita: Writing pre_build file
lita: Using HAB_BIN=/hab/pkgs/core/hab/0.34.1/20171002002928/bin/hab for installs, signing, and hashing
lita: Resolving build dependencies
» Installing core/make from channel 'stable'
→ Using core/make/4.2.1/20170513214620
Sep 29 13:43:02 ip-172-22-56-196 lita lita[25386]: hab-sup(SU): Updating from chef-es/lita/0.5.23/20170928183243 to chef-es/lita/0.5.26/20170929183555
Sep 29 13:43:02 ip-172-22-56-196 lita lita[25386]: hab-sup(SU): Downloading chef-es/lita/0.5.26/20170929183555
Sep 29 13:43:04 ip-172-22-56-196 lita lita[25386]: hab-sup(SU): Installing chef-es/lita/0.5.26/20170929183555
Sep 29 13:43:05 ip-172-22-56-196 lita lita[25386]: lita.default(SR): Updating service chef-es/lita/0.5.23/20170928183243 to chef-es/lita/0.5.26/20170929183555
Sep 29 13:43:05 ip-172-22-56-196 lita lita[25386]: lita.default(O): [2017-09-29 18:43:05 UTC] INFO: Disconnected from Slack.
Sep 29 13:43:05 ip-172-22-56-196 lita lita[25386]: lita.default(HK): run, compiled to /hab/svc/lita/hooks/run
Sep 29 13:43:05 ip-172-22-56-196 lita lita[25386]: lita.default(HK): Hooks compiled
Sep 29 13:43:05 ip-172-22-56-196 lita lita[25386]: lita.default(SR): Hooks recompiled
Sep 29 13:43:05 ip-172-22-56-196 lita lita[25386]: lita.default(SR): Initializi
@tduffield
tduffield / download
Last active September 22, 2016 15:47
ChefDK Download Script - Download Chef Software Packages
#!/usr/bin/env ruby
require 'mixlib/install'
require 'mixlib/cli'
require 'mixlib/shellout'
class Download
include Mixlib::CLI
option :target,
@tduffield
tduffield / error
Created July 31, 2015 18:16
Errors when stage fails but logs show it succeeds
2015-07-31_17:49:20.05002 17:49:20.049 [info] Executing "git-shell -c \"git-upload-pack '/var/opt/delivery/delivery/git_repos/0b/3d/55/9a/29b8-4bb9-b697-34de324472ce'\"" with env [{"DELIV_USER","builder"},{"DELIV_ENTERPRISE","Chef"},{"DELIV_ORGANIZATION","Chef_Delivery"},{"DELIV_PROJECT","delivery"},{"DELIV_HTTP_PORT","9611"},{"LC_ALL","en_US.UTF-8"}]
2015-07-31_17:53:53.08759 17:53:53.086 [info] Phase delivered/deploy for change ad9ff30c-be0f-4b8a-abc1-80ef788e6cb0 on Chef/Chef_Delivery/delivery/master: Finished phase
2015-07-31_17:53:53.09373 17:53:53.092 [info] Phase delivered/deploy for change ad9ff30c-be0f-4b8a-abc1-80ef788e6cb0 on Chef/Chef_Delivery/delivery/master:
2015-07-31_17:53:53.09375 OldPhase:{deliv_phase_run,31740,8405,<<"deploy">>,<<"running">>,false,undefined,<<"Waiting for a worker.">>,undefined,<<"builder4.shd.chef.co">>,<<"((recipes:delivery_builder OR recipes:delivery_builder\\:\\:default OR recipes:delivery_build OR recipes:delivery_build\\:\\:default) AND chef_environment:delivered) AND
@tduffield
tduffield / readme.md
Created July 29, 2015 21:40
Readme for Ooyala Cookbook

ooyala-delivery-demo

This cookbook represents an example of how to upload a cookbook to multiple Chef Servers. We accomplish this by leveraging the delivery_chef_cookbook resource made available from delivery-sugar. For information on how to use delivery_chef_cookbook, please check out the documentation here.

This cookbook lays down the necessary knife environments on a per-project basis by storing the client keys in chef-vault and calling them from there. You can also lay the knife

---
http_interactions:
- request:
method: post
uri: https://192.168.59.103:2376/v1.15/containers/create
body:
encoding: UTF-8
string: '{"Cmd":["sleep","60"],"Image":"debian:wheezy"}'
headers:
User-Agent:
@tduffield
tduffield / example request
Last active August 29, 2015 14:10
HTTP interaction against Boot2Docker to create Exec instance
resp = conn.post('/exec/350/start', nil, :body => {}.to_json)
=> "\u0002\u0000\u0000\u0000\u0000\u0000\u0000,No such exec instance '350' found in daemon\n\u0001\u0000\u0000\u0000\u0000\u0000\u0000ZError starting exec command in container 350: No such exec instance '350' found in daemon\n"
resp = conn.post('/containers/known404/exec', nil, :body => {}.to_json)
Docker::Error::NotFoundError: Expected([200, 201, 202, 203, 204, 304]) <=> Actual(404 Not Found)
@tduffield
tduffield / gist:dbb5695355c730330ca0
Created November 20, 2014 03:08
docker registry run output
root@dd33ec8955dd:/docker-api# docker run --privileged -p 5000:5000 registry
2014-11-20 01:14:04 [1] [INFO] Starting gunicorn 19.1.0
2014-11-20 01:14:04 [1] [INFO] Listening at: http://0.0.0.0:5000 (1)
2014-11-20 01:14:04 [1] [INFO] Using worker: gevent
2014-11-20 01:14:04 [13] [INFO] Booting worker with pid: 13
2014-11-20 01:14:04 [14] [INFO] Booting worker with pid: 14
2014-11-20 01:14:04 [15] [INFO] Booting worker with pid: 15
2014-11-20 01:14:04 [22] [INFO] Booting worker with pid: 22
2014-11-20 01:14:04 [1] [INFO] 4 workers
20/Nov/2014:01:14:04 +0000 WARNING: Cache storage disabled!