Chef Habitat scaffoldings are standardized plans for automated building and running your application. Each scaffolding is tuned to the way your application was built, which allows it to create the appropriate application lifecycle hooks and add in the correct runtime dependencies when building the package for your application. Scaffoldings also provide some default health check hooks where appropriate to ensure your application is functioning reliably. Customized Scaffolding can be created to facilitate re-usability of common patterns in your organization for developing, building, and running your applications.
While we are targeting many platforms for automated scaffolding we currently support Ruby, Node.js and Gradle.
Scaffolding provides certain customizable variables for language-specific behavior. Please see the appropriate scaffolding documentation for details.
Overriding Scaffolding Callbacks
If you want to override phases of a scaffold’s build in your plans, make sure to override the main
do_xxx phase, not the callback directly. ex override
do_install() instead of
A language or framework scaffolding is shipped as a Chef Habitat package, which means that each scaffolding runtime dependency becomes a build dependency for the application being built.
To create scaffolding, a package must contain a
lib/scaffolding.sh file which gets sourced by the build program running Bash.
A optional function named
scaffolding_load() may be created in
lib/scaffolding.sh which will be called early in the build program which allows a Scaffolding author to control and augment the
pkg_build_deps arrays. At this point, no other build or run dependencies have been resolved so the code in this function can only rely on what the build program provides or software pulled in via the Scaffolding’s Plan.
Default Build Phases Implementations
The remainder of the
lib/scaffolding.sh contains one or more default implementations for the build phases. These include, but are not limited to:
Was this page helpful?