{"id":22529453,"url":"https://github.com/test-kitchen/kitchen-habitat","last_synced_at":"2025-08-03T23:33:14.711Z","repository":{"id":18218671,"uuid":"83488912","full_name":"test-kitchen/kitchen-habitat","owner":"test-kitchen","description":"A Test Kitchen Driver for Habitat","archived":false,"fork":false,"pushed_at":"2023-12-15T08:58:19.000Z","size":153,"stargazers_count":13,"open_issues_count":11,"forks_count":19,"subscribers_count":18,"default_branch":"main","last_synced_at":"2024-04-14T04:20:55.224Z","etag":null,"topics":["hacktoberfest","managed-by-terraform","ruby","ruby-gem","test-kitchen","testing"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/test-kitchen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-02-28T23:14:48.000Z","updated_at":"2022-04-21T20:37:03.000Z","dependencies_parsed_at":"2023-12-17T04:31:56.629Z","dependency_job_id":"b2397917-ca04-49ca-814f-b478d60d05f7","html_url":"https://github.com/test-kitchen/kitchen-habitat","commit_stats":{"total_commits":131,"total_committers":19,"mean_commits":6.894736842105263,"dds":0.8244274809160306,"last_synced_commit":"f3a4d0d94d08c439fb64fac28383f232345003bd"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/test-kitchen%2Fkitchen-habitat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/test-kitchen%2Fkitchen-habitat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/test-kitchen%2Fkitchen-habitat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/test-kitchen%2Fkitchen-habitat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/test-kitchen","download_url":"https://codeload.github.com/test-kitchen/kitchen-habitat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228571841,"owners_count":17938773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","managed-by-terraform","ruby","ruby-gem","test-kitchen","testing"],"created_at":"2024-12-07T07:14:46.619Z","updated_at":"2024-12-07T07:14:47.387Z","avatar_url":"https://github.com/test-kitchen.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/kitchen-habitat.svg)](https://badge.fury.io/rb/kitchen-habitat)\n[![CI](https://github.com/test-kitchen/kitchen-habitat/workflows/CI/badge.svg?branch=master)](https://github.com/test-kitchen/kitchen-habitat/actions?query=workflow%3ACI+branch%3Amaster)\n\n# kitchen-habitat\n\nA Test Kitchen Provisioner for [Habitat](https://habitat.sh)\n\n## Requirements\n\n## Installation \u0026 Setup\n\nYou'll need the test-kitchen \u0026 kitchen-habitat gems installed in your system, along with kitchen-vagrant or some other suitable driver for test-kitchen.\n\n## Configuration Settings\n\n* `hab_license`: Habitat license acceptance type (for more information please read the [chef license documentation](https://docs.chef.io/chef_license_accept.html#habitat)).\n* `hab_version`: The version of habitat to be used in test kitchen.\n\n### Depot settings\n\n* `depot_url`\n  * Target Habitat Depot to use to install packages.\n  * Defaults to `nil` (which will use the default depot settings for the `hab` CLI from ~/.hab/etc/cli.toml).\n\n### Supervisor Settings\n\n* `hab_sup_origin`\n  * Package identification for the supervisor to use.\n  * Defaults to `core`, or, if `hab_sup_artifact_name` is supplied, the `hab_sup_origin` will be parsed from the filename of the hart file.\n* `hab_sup_name`\n  * Name of the supervisor package\n  * Defaults to `hab-sup`, or, if `hab_sup_artifact_name` is supplied, the `hab_sup_name` will be parsed from the filename of the hart file.\n* `hab_sup_version`\n  * Version number of `hab-sup` to run\n  * Defaults to `nil`, or, if `hab_sup_artifact_name` is supplied, the `hab_sup_version` will be parsed from the filename of the hart file.\n* `hab_sup_release`\n  * Release of the `hab-sup` package to run\n  * Defaults to `nil`, or, if `hab_sup_artifact_name` is supplied, the `hab_sup_release` will be parsed from the filename of the hart file.\n* `hab_sup_artifact_name`\n  * Artifact package name for a custom supervisor to run\n  * Used to upload and test a local supervisor.\n  * Package should be located in the `results_directory`\n  * Defaults to `nil\n* `hab_sup_listen_http`\n  * Port for the supervisor's sidecar to listen on.\n  * Defaults to `nil`\n* `hab_sup_listen_gossip`\n  * Port for the supervisor's gossip communication\n  * Defaults to `nil`\n* `hab_sup_group`\n  * Service group for the supervisor to belong do.\n  * Default is `default`\n* `hab_sup_bind`\n  * Service group for the supervisor to bind to.\n  * Default is `[]`\n* `hab_sup_peer`\n  * IP and port (e.g. `192.168.1.86:9010`) of the supervisor of which to connect to join the ring.\n  * Default is `[]`\n* `hab_sup_ring`\n  * Ring key name\n  * Default is `nil`\n\n### Package Settings\n\n* `artifact_name`\n  * Artifact package filename to install and run.\n  * Used to upload and test a local artifact.\n  * Package should be located in the `results_directory`\n  * Example - `core-jq-static-1.5-20170127185151-x86_64-linux.hart`\n  * Defaults to `nil`\n* `results_directory`\n  * Directory (relative to the location of the .kitchen.yml) containing package artifacts (harts) to copy to the remote system\n  * Defaults to checking the local directory for a `results` directory, then its parent (`../results`) and grandparent (`../../results`), which should accommodate most studio layouts.\n* `package_origin`\n  * Origin for the package to run.\n  * Defaults to `core`, or, if `artifact_name` is supplied, the `package_origin` will be parsed from the filename of the hart file.\n* `package_name`\n  * Package name for the supervisor to run.\n  * Defaults to the suite name or, if `artifact_name` is supplied, the `package_name` will be parsed from the filename of the hart file.\n* `package_version`\n  * Package version of the package to be run.\n  * Defaults to `nil` or if `artifact_name` is supplied, the `package_version` will be parsed from the filename of the hart file.\n* `package_release`\n  * Package release of the package to be run.\n  * Defaults to `nil` or if `artifact_name` is supplied, the `package_release` will be parsed from the filename of the hart file.\n* `service_topology`\n  * The topology for the service to run in.  Valid values are `nil`, `standalone`, `leader`\n  * Defaults to `nil` which is `standalone`\n* `service_update_strategy`\n  * Describes how package updates are to be applied.  Valid values are `nil`, `at-once`, `rolling`.\n  * Default is `nil`, which does not check for package updates.\n* `config_directory`\n  * Directory containing a user.toml or/and a default.toml, hooks, and configuration files to be passed to the service under test.\n  * Defaults to `nil`\n* `override_package_config`\n  * Tell the supervisor to load the the configuration files and hooks from `config_directory` instead of what was packaged with the service.  (Uses `--config-from` via the `hab-sup` CLI.)\n* `user_toml_name`\n  * Name of the file to be used as the user.toml for the service under test.\n  * Defaults to `user.toml`\n* `install_latest_artifact`\n  * Choose to install latest artifact.\n  * Must specify `artifact_name` or `package_origin` and `package_name`\n  * `package_version` and `package_release` will be ignored\n  * Defaults to `false`\n\n### EAS Application Dashboard Settings\n\n* `event_stream_application`\n  * The name of your application.\n  * Defaults to `nil`\n* `event_stream_environment`\n  * The application environment for this supervisor.\n  * Defaults to `nil`\n* `event_stream_site`\n  * Describes the physical (for example, datacenter) or cloud-specific (for example, the AWS region) location where your services are deployed.\n  * Defaults to `nil`\n* `event_stream_url`\n  * The Chef Automate URL with port 4222 specified.\n  * Defaults to `nil`\n* `event_stream_token`\n  * Chef Automate Token\n  * Defaults to `nil`\n\n\u003e NOTE: All 5 EAS settings are required for it to report to Automate.\n\n## Examples\n\nRun the core-redis package\n\n```yaml\ndriver:\n  name: vagrant\n\nprovisioner:\n  name: habitat\n  hab_sup_origin: core\n  hab_sup_name: sup\n  package_origin: core\n  package_name: redis\n\nplatforms:\n  - name: ubuntu-16.04\n\nsuites:\n  - name: default\n```\n\nTwo node: elasticsearch and kibana\n\n```yaml\ndriver:\n  name: docker\n\nprovisioner:\n  name: habitat\n  hab_sup_origin: core\n  hab_sup_name: sup\n\nplatforms:\n  - name: ubuntu-16.04\n\nsuites:\n  - name: elasticsearch\n    provisioner:\n      package_origin: core\n      package_name: elasticsearch\n    driver:\n      instance_name: elastic\n\n  - name: kibana\n    provisioner:\n      package_origin: core\n      package_name: kibana\n      hab_sup_peer:\n        - elastic\n      hab_sup_bind:\n        - elasticsearch:elasticsearch.default\n    driver:\n      instance_name: kibana\n      links: elastic:elastic\n```\n\nEAS Application Dashboard Example\n\n``` yaml\n---\ndriver:\n  name: azurerm\n\ndriver_config:\n  subscription_id: \u003c%= ENV['subscription_id'] %\u003e\n  location: \u003c%= ENV['region'] %\u003e\n  machine_size: \"Standard_DS2_v2\"\n\nverifier:\n  name: inspec\n\nprovisioner:\n  name: habitat\n  hab_version: 'latest'\n  hab_license: accept\n  event_stream_application: Effortless\n  event_stream_environment: stable\n  event_stream_site: \u003c%= ENV['region'] %\u003e\n  event_stream_url: automate.example.com:4222\n  event_stream_token: \u003c%= ENV['automate_token'] %\u003e\n\nplatforms:\n  - name: windows\n    driver:\n      image_urn: MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest\n      vm_name: windows\n    provisioner:\n      package_origin: \u003c%= ENV['package_orgin'] %\u003e\n      package_name: \u003c%= ENV['package_name'] %\u003e\n\nsuites:\n  - name: default\n    verifier:\n      inspec_tests:\n        - tests\n```\n\nLatest Artifact example\n\n\u003e This example assumes you've already done a build via hab studio.\n\n```yaml\ndriver:\n  name: vagrant\n  customize:\n    memory: 2048\n\nverifier:\n  name: inspec\n\nprovisioner:\n  name: habitat\n  hab_version: 'latest'\n  hab_license: accept\n\nplatforms:\n  - name: wildfly-local\n    driver:\n      box: bento/ubuntu-16.04\n    provisioner:\n      package_origin: jmassardo\n      package_name: wildfly\n      results_directory: results\n      install_latest_artifact: true\n\nsuites:\n  - name: default\n    verifier:\n      inspec_tests:\n        - tests\n```\n\nApply `user.toml` Example\n\n\u003e This example assumes that you have a `/configs/user.toml` in your project directory.\n\n```yaml\ndriver:\n  name: vagrant\n  customize:\n    memory: 2048\n\nverifier:\n  name: inspec\n\nprovisioner:\n  name: habitat\n  hab_version: 'latest'\n  hab_license: accept\n\nplatforms:\n  - name: wildfly\n    driver:\n      box: bento/ubuntu-16.04\n    provisioner:\n      package_origin: jmassardo\n      package_name: wildfly\n      channel: unstable\n      config_directory: configs\n\nsuites:\n  - name: default\n    verifier:\n      inspec_tests:\n        - tests\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftest-kitchen%2Fkitchen-habitat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftest-kitchen%2Fkitchen-habitat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftest-kitchen%2Fkitchen-habitat/lists"}