This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Main cookbook berksfile will look something like this | |
| cookbook 'foo', :github => 'MyOrg/foo' | |
| The foo cookbook has a dependency on a forked cookbook that we have modified that also exists in the community site | |
| (at a higher version) | |
| cookbook 'bar', :github => 'MyOrg/bar' | |
| When I try and do a berks install on the Main cookbook it will always download the community cookbook of bar and not my forked |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package 'apache2' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| motherbucker ~/projects/metal-spike (knife:zero) (rbenv:2.0.0-p451) | |
| ◯ : bundle exec metal -z cat spike1 /tmp/spike1.txt ⏎ | |
| [2014-05-06T11:12:51-06:00] INFO: Starting chef-zero on port 8889 with repository at repository at /Users/pairing/projects/metal-spike | |
| One version per cookbook | |
| /Users/pairing/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/chef-metal-vagrant-0.3.1/lib/chef_metal_vagrant/vagrant_provisioner.rb:354:in `strip_quotes': undefined method `[]' for nil:NilClass (NoMethodError) | |
| from /Users/pairing/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/chef-metal-vagrant-0.3.1/lib/chef_metal_vagrant/vagrant_provisioner.rb:324:in `create_ssh_transport' | |
| from /Users/pairing/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/chef-metal-vagrant-0.3.1/lib/chef_metal_vagrant/vagrant_provisioner.rb:275:in `transport_for' | |
| from /Users/pairing/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/chef-met |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name":"foo", | |
| "environments": { | |
| "bld": { | |
| "env_vars": { | |
| "foo":"1", | |
| "bar":"2" | |
| }, | |
| "docker_hosts":["foo-docker-01", "foo-docker-02"] | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import jenkins.model.* | |
| import hudson.model.* | |
| import hudson.security.* | |
| import org.jenkinsci.plugins.* | |
| import com.cloudbees.plugins.credentials.* | |
| import com.cloudbees.plugins.credentials.domains.* | |
| import com.cloudbees.plugins.credentials.common.* | |
| import com.cloudbees.jenkins.plugins.sshcredentials.impl.* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Getting application logs from a container to splunk | |
| Application running in the container writes their logs to /var/log/service (placing any number of directories or files in this parent directory). This is conatiner is started with /var/log/service mounted to /var/log on the host system. We then have another container running splunk-forwarder which mounts /var/log into the container. Splunk forwarder is configured to send /var/log (recursing) to the splunk indexer in the correct data center (using consul). | |
| More to come! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (require '[clojure.string :as str]) | |
| (require '[riemann.common :as common]) | |
| (logging/init) | |
| (info "loading" *config-file*) | |
| (tcp-server :host "0.0.0.0" :port 5555) | |
| (udp-server :host "0.0.0.0" :port 5556) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <source> | |
| type tail | |
| path /var/log/containers/*.log | |
| pos_file /var/log/containers.log.pos | |
| time_format %Y-%m-%dT%H:%M:%S.%NZ | |
| tag kubernetes.* | |
| format json | |
| read_from_head true | |
| </source> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'fluent/mixin/config_placeholders' | |
| require 'fluent/mixin/plaintextformatter' | |
| require 'fluent/mixin/rewrite_tag_name' | |
| require 'fluent/output' | |
| module Fluent | |
| class DeisOutput < Output | |
| Fluent::Plugin.register_output("deis_output", self) | |
| include Fluent::Mixin::PlainTextFormatter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export GET_PODS_URL=https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT/api/v1/namespaces/$POD_NAMESPACE/pods | |
| pod_names=$(curl -s $GET_PODS_URL --header "Authorization: Bearer $TOKEN" --insecure | jq --raw-output '.items[].metadata.name' | grep deis-nsqlookupd) | |
| while read -r pod; do | |
| GET_POD_URL=https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT/api/v1/namespaces/$POD_NAMESPACE/pods/${pod} | |
| pod_ip=$(curl -s $GET_POD_URL --header "Authorization: Bearer $TOKEN" --insecure | jq --raw-output '.status.podIP') | |
| export LOOKUP_COMMAND="$LOOKUP_COMMAND -lookupd-tcp-address ${pod_ip}:4161" | |
| done <<< "$pod_names" | |
| exec nsqd -broadcast-address ${NODE_NAME} ${LOOKUP_COMMAND} |
OlderNewer