Things I'm learning while using Habitat, written down so I remember them.
export HAB_DOCKER_OPTS="-v /Users/nathansmith/.hab/cache/artifacts /hab/studios/src/hab/cache/artifacts"
This page aims to pick up Pacman users from where they are and bring them to the world of Habitat: | |
'General hints' | |
What is a PKGBUILD at Pacman, is a plan.sh at Habitat. | |
In general, both use bash scripts and a very simple approach. | |
Habitat builds all in own chroot environments, which are called studios. | |
You access such a studio with the command "hab studio enter" |
Things I'm learning while using Habitat, written down so I remember them.
export HAB_DOCKER_OPTS="-v /Users/nathansmith/.hab/cache/artifacts /hab/studios/src/hab/cache/artifacts"
#!/usr/bin/env ruby | |
require 'chef-api' | |
require 'fauxhai' | |
include ChefAPI::Resource | |
ChefAPI.configure do |config| | |
config.endpoint = 'http://HOSTNAME:4545' | |
config.client = 'admin' |
# Easy Setup Locally using Kitchen/SSH Driver | |
# | |
# Following the Steps on the README.md | |
# => https://github.com/opscode-cookbooks/delivery-cluster#easy-setup | |
# | |
# 1) Download your Delivery license key | |
# => I have already my Delivery License locally. Get one with your Chef Rep. :) | |
# | |
# 2) Provisioning infrastructure [SSH/Kitchen] |
module Chef::DSL::Recipe | |
# | |
# Sets defaults for a named resource | |
# | |
# defaults :file, :directory do | |
# owner 'jkeiser' | |
# group 'wheel' | |
# mode 0777 | |
# end | |
# |
_________ _____ _______________ _____
\_ ___ \\ \\___________ \____ / ____\ ~/.bash/cliref.md
/ \ \/| | | || _/ __ \ __\ copy/paste from whatisdb
\ \___|__ |_|_ || | \ __/|_ | http://pastebin.com/yGmGiDQX
\________ /_____ \_||____|_ /____ /_| [email protected]
20160515 \/ 1527 \/ \/ \/
alias CLIRef.txt='curl -s "http://pastebin.com/raw/yGmGiDQX" | less -i'
root@test:/mnt/host_src/chef-metal-lxc/test# strace -f -e process chef-client -z -l debug -o lxctests::simple2 | |
execve("/usr/local/bin/chef-client", ["chef-client", "-z", "-l", "debug", "-o", "lxctests::simple2"], [/* 23 vars */]) = 0 | |
arch_prctl(ARCH_SET_FS, 0x7fc526822740) = 0 | |
clone(child_stack=0x7fc52682cfb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fc52682d9d0, tls=0x7fc52682d700, child_tidptr=0x7fc52682d9d0) = 32664 | |
Process 32664 attached | |
[pid 32664] _exit(0) = ? | |
[pid 32664] +++ exited with 0 +++ | |
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fc526822a10) = 32665 | |
clone(child_stack=0x7fc52682cfb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fc52682d9d0, tls=0x7fc52682d700, child_tidptr=0x7fc52682d9d0) = 32666 | |
Process 32666 attached |
Currently passenger 4.0.39 and above come with a default nginx configuration file with a location @static_assets
block. Paste the following inside it.
if ($request_filename ~* ^.*?/([^/]*?)$) {
set $filename $1;
}
if ($filename ~* ^.*?\.(eot)|(ttf)|(svg)|(woff)$) {
add_header Access-Control-Allow-Origin *;
}
root@test:/mnt/host_src/chef-metal-lxc# ruby -I lib lxccheck.rb | |
received 1 INSIDE! | |
received 2 OUTSIDE! | |
received 3 INSIDE! | |
received 4 OUTSIDE! | |
received 5 INSIDE! | |
received 6 OUTSIDE! | |
received 7 INSIDE! | |
received 8 OUTSIDE! | |
received 9 INSIDE! |
To get it, gem install chef-metal
. To hack, go to https://github.com/opscode/chef-metal. Currently supported provisioners include LXC containers, EC2, DigitalOcean, and Vagrant. If you just want to skip all that, follow the quick start in the README.
The current release is an alpha. You can see a lot of our plans, and some concrete examples, in the [requirements doc](https://github.com/opscode/chef-metal/blob/master/docs/r