kitchen-habitat
A Test Kitchen Provisioner for Habitat
Requirements
Installation & Setup
You'll need the test-kitchen & kitchen-habitat gems installed in your system, along with kitchen-vagrant or some other suitable driver for test-kitchen.
Configuration Settings
Depot settings
depot_url- Target Habitat Depot to use to install packages.
- Defaults to
nil(which will use the default depot settings for thehabCLI).
Supervisor Settings
hab_sup_origin- Package identification for the supervisor to use.
- Defaults to
core, or, ifhab_sup_artifact_nameis supplied, thehab_sup_originwill be parsed from the filename of the hart file.
hab_sup_name- Name of the supervisor package
- Defaults to
hab-sup, or, ifhab_sup_artifact_nameis supplied, thehab_sup_namewill be parsed from the filename of the hart file.
hab_sup_version- Version number of
hab-supto run - Defaults to
nil, or, ifhab_sup_artifact_nameis supplied, thehab_sup_versionwill be parsed from the filename of the hart file.
- Version number of
hab_sup_release- Release of the
hab-suppackage to run - Defaults to
nil, or, ifhab_sup_artifact_nameis supplied, thehab_sup_releasewill be parsed from the filename of the hart file.
- Release of the
hab_sup_artifact_name- Artifact package name for a custom supervisor to run
- Used to upload and test a local supervisor.
- Package should be located in the
results_directory - Defaults to `nil
hab_sup_listen_http- Port for the supervisor's sidecar to listen on.
- Defaults to
nil
hab_sup_listen_gossip- Port for the supervisor's gossip communication
- Defaults to
nil
hab_sup_group- Service group for the supervisor to belong do.
- Default is
default
Package Settings
artifact_name- Artifact package filename to install and run.
- Used to upload and test a local artifact.
- Package should be located in the
results_directory - Example -
core-jq-static-1.5-20170127185151-x86_64-linux.hart - Defaults to
nil
results_directory- Directory (relative to the location of the .kitchen.yml) containing package artifacts (harts) to copy to the remote system
- Defaults to checking the local directory for a
resultsdirectory, then its parent (../results) and grandparent (../../results), which should accomodate most studio layouts.
package_origin- Origin for the package to run.
- Defaults to
core, or, ifartifact_nameis supplied, thepackage_originwill be parsed from the filename of the hart file.
package_name- Package name for the supervisor to run.
- Defaults to the suite name or, if
artifact_nameis supplied, thepackage_namewill be parsed from the filename of the hart file.
package_version- Package version of the package to be run.
- Defaults to
nilor ifartifact_nameis supplied, thepackage_versionwill be parsed from the filename of the hart file.
package_release- Package release of the package to be run.
- Defaults to
nilor ifartifact_nameis supplied, thepackage_releasewill be parsed from the filename of the hart file.
service_topology- The topology for the service to run in. Valid values are
nil,standalone,leader - Defaults to
nilwhich isstandalone
- The topology for the service to run in. Valid values are
service_update_strategy- Describes how package updates are to be applied. Valid values are
nil,at-once,rolling. - Default is
nil, which does not check for package updates.
- Describes how package updates are to be applied. Valid values are
config_directory- Directory containing a user.toml or/and a default.toml, hooks, and configuration files to be passed to the service under test.
- Defaults to
nil
override_package_config- Tell the supervisor to the the configuration files and hooks from
config_directoryinstead of what was packaged with the service. (Uses--config-fromvia thehab-supCLI.)
- Tell the supervisor to the the configuration files and hooks from
user_toml_name- Name of the file to be used as the user.toml for the service under test.
- Defaults to
user.toml
install_latest_artifact- Choose to install latest artifact.
- Must specify
artifact_nameorpackage_originandpackage_name package_versionandpackage_releasewill be ignored- Defaults to
false
Example
driver:
name: vagrant
provisioner:
name: habitat
hab_sup: core/hab/0.16.0
package_origin: core
package_name: redis
platforms:
- name: ubuntu-16.04
suites:
- name: default