background-image

Set Up Chef App Delivery in Four Easy Steps

Follow this process to install and configure your Chef App Delivery environment.

Application Delivery

1. Download, Install and Configure Chef Workstation

Chef Workstation provides all the tools you need to start working with Chef App Delivery, including Chef Habitat, knife,  and Cookstyle. Install it on your laptop.

2. Configure Chef Habitat

Every package you build with Chef Habitat is cryptographically signed. As part of the set-up, generate or define a set of origin keys and other defaults. Run hab setup and accept the default actions. Set the origin to habitat-tutorial:

$ hab setup

3. Package Application with the Chef Habitat Studio

Chef Habitat ensures only the dependencies needed to run an application are included in any final build. Enter the follow commands to test Hab Studio with a Node.js app:

$ git clone https://github.com/habitat-sh/sample-node-app.git
$ cd sample-node-app/
$ hab plan init

$ hab studio enter
[1][default:/src:0]# build

4. Run the Package with Docker

The Habitat Supervisor delivers and manages your application, but you can test this sample application with Docker:

[1][default:/src:0]# hab pkg export docker ./results/<habitat-artifact>.hart

[1][default:/src:0]# exit

Start a container from the image Habitat exported (you can get the image name by running docker images):

$ docker run -it -p 8000:8000 your-origin/sample-node-app

Open your browser and head to http://localhost:8000 to see the results.

OS Version: 12
Architecture: x86_64
SHA256: 7beea777781f4bb26e414c2a1b7e9a0c0b04537bbbfa783c87abd485e6f60837

Chef Habitat Knowledgebase

Answer to developers most asked questions.