Skip to content

Instantly share code, notes, and snippets.

View nellshamrell's full-sized avatar

Nell Shamrell-Harrington nellshamrell

View GitHub Profile
[7][default:/src:0]# build scaffolding-ruby
   : Loading /src/scaffolding-ruby/plan.sh
   scaffolding-ruby: Plan loaded
   scaffolding-ruby: Validating plan metadata
   scaffolding-ruby: Using HAB_BIN=/hab/pkgs/core/hab/0.54.0/20180221022026/bin/hab for installs, signing, and hashing
   scaffolding-ruby: hab-plan-build setup
   scaffolding-ruby: Writing pre_build file
   scaffolding-ruby: Resolving build dependencies
» Installing core/coreutils from channel 'stable'

Setup

  • Spin up c4.4xlarge instance on AWS with 120 GB disk
  • SSH into the VM
  • Create new tmux session
$ tmux new -s base_plans
  • Install Habitat
$ curl https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh | sudo bash
   widget_world: Setting build environment
mkdir: created directory '/hab/cache/src/widget_world-0.1.0'
   widget_world: Setting PREFIX=/hab/pkgs/core/widget_world/0.1.0/20180507224750
   widget_world: Setting LD_RUN_PATH=/hab/pkgs/core/ruby/2.4.2/20171014214232/lib:/hab/pkgs/core/node/8.11.1/20180504222455/lib:/hab/pkgs/core/libxml2/2.9.6/20171025112053/lib:/hab/pkgs/core/libxslt/1.1.31/20171025112227/lib:/hab/pkgs/core/postgresql/9.6.8/20180423183113/lib
   widget_world: Setting CFLAGS=-I/hab/pkgs/core/ruby/2.4.2/20171014214232/include -I/hab/pkgs/core/node/8.11.1/20180504222455/include -I/hab/pkgs/core/libxml2/2.9.6/20171025112053/include -I/hab/pkgs/core/libxslt/1.1.31/20171025112227/include -I/hab/pkgs/core/postgresql/9.6.8/20180423183113/include -I/hab/pkgs/core/gcc/5.2.0/20170513202244/include -I/hab/pkgs/core/make/4.2.1/20170513214620/include -I/hab/pkgs/core/ruby/2.4.2/20171014214232/include
   widget_world: Setting CXXFLAGS=-I/hab/pkgs/core/ruby/2.4.2/20171014214232/include -I/hab/pkgs/core/node

Old

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Map of National Parks</title>
    <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"/>
    <script src="https://code.jquery.com/jquery-2.0.0.min.js"></script>
    <link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>

Creating the app

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

app.js

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.

   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=

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

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