Skip to content

Instantly share code, notes, and snippets.

sudo apt update
sudo apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install -l
rbenv install 2.6.4
@nellshamrell
nellshamrell / hab_kube_tutorial.md
Last active May 3, 2019 22:44
Habitat Kubernetes notes

Basics:

git clone https://github.com/habitat-sh/sample-node-app
cd sample-node-app
npm install
vim habitat/plan.sh # Replace your_origin with your origin
hab studio enter
build

Set Up

Without Hab

  • Create Ubuntu VM in AWS (or whichever cloud provider you prefer)
  • SSH into instance
$ sudo apt-get update
$ sudo apt install git
$ wget https://packages.chef.io/files/stable/inspec/3.0.9/ubuntu/18.04/inspec_3.0.9-1_amd64.deb

Building

https://github.com/habitat-sh/habitat-aspnet-eff.git

choco install git
git clone https://github.com/habitat-sh/habitat-aspnet-eff 
(if the above errors - run 'C:\Program Files\Git\bin\git.exe' clone https://github.com/habitat-sh/habitat-aspnet-eff)
cd habitat-aspnet-eff
hab studio enter
build

Writing, building, and running 10 Habitat plans in 10 days.

  1. Basic node app plan (no scaffolding) - Linux
  2. Basic node app plan - Windows
  3. App with a database (Tomcat and something else?) on Linux
  4. .NET App with a Database on Windows
  5. Plan with Secrets (i.e. Hashicorp Vault)
  6. Plan with non-standard do_unpack
  7. Plan with non-standard do_prepare
  8. Plan with non-standard do_build
   gmp: Setting PREFIX=/hab/pkgs/core/gmp/6.1.2/20180803184716
   gmp: Setting LD_RUN_PATH=/hab/pkgs/core/gmp/6.1.2/20180803184716/lib:/hab/pkgs/core/glibc/2.28/20180803183122/lib
   gmp: Setting CFLAGS=-I/hab/pkgs/core/glibc/2.28/20180803183122/include -I/hab/pkgs/core/binutils/2.31.1/20180803184218/include
   gmp: Setting CXXFLAGS=-I/hab/pkgs/core/glibc/2.28/20180803183122/include -I/hab/pkgs/core/binutils/2.31.1/20180803184218/includ
e
   gmp: Setting CPPFLAGS=-I/hab/pkgs/core/glibc/2.28/20180803183122/include -I/hab/pkgs/core/binutils/2.31.1/20180803184218/includ
e
   gmp: Setting LDFLAGS=-L/hab/pkgs/core/glibc/2.28/20180803183122/lib -L/hab/pkgs/core/binutils/2.31.1/20180803184218/lib
   gmp: Setting PKG_CONFIG_PATH=

Base Plans Refresh

Base Plans

Base Plans are a subset of the core plans that are required to build both Habitat and the Studio. Without Habitat and the Studio, you cannot build any Habitat plans. These plans are the "foundation of the Habitat universe" - they are the building blocks upon which every component of Habitat is built upon. They must be built in a very specific order.

For more information and about base plans, see this blog post.

We have divided this process into four stages.

Creating the app

mkdir my-node-app
cd my-node-app
touch app.js

app.js