{"id":17832403,"url":"https://github.com/voxpupuli/beaker-hostgenerator","last_synced_at":"2026-05-22T14:22:13.575Z","repository":{"id":32113934,"uuid":"35686337","full_name":"voxpupuli/beaker-hostgenerator","owner":"voxpupuli","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-05T18:45:15.000Z","size":1778,"stargazers_count":7,"open_issues_count":2,"forks_count":75,"subscribers_count":163,"default_branch":"master","last_synced_at":"2025-09-05T20:43:52.072Z","etag":null,"topics":["beaker","hacktoberfest","ruby","vmpooler"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2015-05-15T17:08:46.000Z","updated_at":"2025-09-05T18:45:19.000Z","dependencies_parsed_at":"2023-10-11T22:31:14.262Z","dependency_job_id":"5a1ca632-8814-46e9-af0d-b87bc65cc378","html_url":"https://github.com/voxpupuli/beaker-hostgenerator","commit_stats":{"total_commits":675,"total_committers":86,"mean_commits":7.848837209302325,"dds":0.8503703703703703,"last_synced_commit":"76ffa077fa900ad08a3c1f344943cfd8d2b77751"},"previous_names":["puppetlabs/beaker-hostgenerator"],"tags_count":144,"template":false,"template_full_name":null,"purl":"pkg:github/voxpupuli/beaker-hostgenerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fbeaker-hostgenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fbeaker-hostgenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fbeaker-hostgenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fbeaker-hostgenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/beaker-hostgenerator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fbeaker-hostgenerator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273903208,"owners_count":25188289,"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","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["beaker","hacktoberfest","ruby","vmpooler"],"created_at":"2024-10-27T19:56:47.015Z","updated_at":"2025-12-27T21:54:44.042Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"# Beaker Host Generator\n\n[![License](https://img.shields.io/github/license/voxpupuli/beaker-hostgenerator.svg)](https://github.com/voxpupuli/beaker-hostgenerator/blob/master/LICENSE)\n[![Test](https://github.com/voxpupuli/beaker-hostgenerator/actions/workflows/test.yml/badge.svg)](https://github.com/voxpupuli/beaker-hostgenerator/actions/workflows/test.yml)\n[![Release](https://github.com/voxpupuli/beaker-hostgenerator/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/beaker-hostgenerator/actions/workflows/release.yml)\n[![RubyGem Version](https://img.shields.io/gem/v/beaker-hostgenerator.svg)](https://rubygems.org/gems/beaker-hostgenerator)\n[![RubyGem Downloads](https://img.shields.io/gem/dt/beaker-hostgenerator.svg)](https://rubygems.org/gems/beaker-hostgenerator)\n[![Donated by Puppet Inc](https://img.shields.io/badge/donated%20by-Puppet%20Inc-fb7047.svg)](#transfer-notice)\n\n`beaker-hostgenerator` is a command line utility designed to generate beaker\nhost config files using a compact command line SUT specification.\n\n\u003c!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again --\u003e\n**Table of Contents**\n\n- [Beaker Host Generator](#beaker-host-generator)\n    - [Hypervisors](#hypervisors)\n    - [Usage](#usage)\n        - [Simple two-host layout](#simple-two-host-layout)\n        - [Single host with Arbitrary Roles](#single-host-with-arbitrary-roles)\n        - [Two hosts with multiple hypervisors and arbitrary host settings](#two-hosts-with-multiple-hypervisors-and-arbitrary-host-settings)\n        - [Two hosts with arbitrary host settings with arbitrary lists](#two-hosts-with-arbitrary-host-settings-with-arbitrary-lists)\n        - [Arbitrary nested hashes and arrays](#arbitrary-nested-hashes-and-arrays)\n        - [Arbitrary global configuration settings](#arbitrary-global-configuration-settings)\n        - [Custom hypervisor](#custom-hypervisor)\n        - [URL-encoded input](#url-encoded-input)\n    - [Testing](#testing)\n        - [Test Fixtures](#test-fixtures)\n            - [Generated Fixtures](#generated-fixtures)\n    - [Support](#support)\n    - [License](#license)\n\n\u003c!-- markdown-toc end --\u003e\n\n## Hypervisors\n\nAny hypervisor may be specified and generated, but if it's not a built-in\nhypervisor you will have to provide the entire hypervisor configuration as\ninput. See the [Custom hypervisor](#custom-hypervisor) example for more\ninformation.\n\nIt currently provides built-in configuration for Puppets' internal\n[vmpooler][vmpooler] hypervisor, [always-be-scheduling][always-be-scheduling]\nhypervisor, Vagrant with Virtualbox and Libvirt backend,\n[Hetzner cloud](https://www.hetzner.com/cloud), static (non-provisioned) nodes,\nand is designed in a way that makes it possible to easily add support for\nadditional hypervisors (any hypervisor type supported by [beaker][beaker]).\n\nTo see the list of built-in hypervisors you can run:\n```\n$ beaker-hostgenerator --list\n```\n\n## Usage\n\nBelow are some example usages of `beaker-hostgenerator`.\n\n### Simple two-host layout\n\n```\n$ beaker-hostgenerator centos9-64mdca-64a\n```\n\nWill generate\n\n```yaml\n---\nHOSTS:\n  centos9-64-1:\n    pe_dir:\n    pe_ver:\n    pe_upgrade_dir:\n    pe_upgrade_ver:\n    hypervisor: vmpooler\n    platform: el-9-x86_64\n    template: centos-9-x86_64\n    roles:\n    - agent\n    - master\n    - database\n    - dashboard\n  centos9-64-2:\n    pe_dir:\n    pe_ver:\n    pe_upgrade_dir:\n    pe_upgrade_ver:\n    hypervisor: vmpooler\n    platform: el-9-x86_64\n    template: centos-9-x86_64\n    roles:\n    - agent\nCONFIG:\n  nfs_server: none\n  consoleport: 443\n  pooling_api: http://vmpooler.delivery.puppetlabs.net/\n```\n\n### Single host with Arbitrary Roles\n\n```\n$ beaker-hostgenerator centos9-64compile_master,another_role.ma\n```\n\nWill generate\n\n```yaml\n---\nHOSTS:\n  centos9-64-1:\n    pe_dir:\n    pe_ver:\n    pe_upgrade_dir:\n    pe_upgrade_ver:\n    hypervisor: vmpooler\n    platform: el-9-x86_64\n    template: centos-9-x86_64\n    roles:\n    - agent\n    - master\n    - compile_master\n    - another_role\n    frictionless_options:\n      main:\n        dns_alt_names: puppet\n        environmentpath: \"/etc/puppetlabs/puppet/environments\"\nCONFIG:\n  nfs_server: none\n  consoleport: 443\n  pooling_api: http://vmpooler.delivery.puppetlabs.net/\n```\n\n### Two hosts with multiple hypervisors and arbitrary host settings\n\n```\n$ beaker-hostgenerator centos9-64m{hypervisor=none\\,hostname=static-master}-redhat7-64a{somekey=some-value}\n```\n\nWill generate\n\n```yaml\n---\nHOSTS:\n  static-master:\n    pe_dir:\n    pe_ver:\n    pe_upgrade_dir:\n    pe_upgrade_ver:\n    platform: el-9-x86_64\n    hypervisor: none\n    roles:\n    - agent\n    - master\n  redhat7-64-1:\n    pe_dir:\n    pe_ver:\n    pe_upgrade_dir:\n    pe_upgrade_ver:\n    hypervisor: vmpooler\n    platform: el-7-x86_64\n    template: redhat-7-x86_64\n    somekey: some-value\n    roles:\n    - agent\nCONFIG:\n  nfs_server: none\n  consoleport: 443\n  pooling_api: http://vmpooler.delivery.puppetlabs.net/\n```\n\n### Two hosts with arbitrary host settings with arbitrary lists\n\n```\n$ beaker-hostgenerator centos9-64m{disks=\\[16\\]}-redhat7-64a{disks=\\[8\\,16\\]}\n```\n\nWill generate\n\n```yaml\n---\nHOSTS:\n  centos9-64-1:\n    pe_dir:\n    pe_ver:\n    pe_upgrade_dir:\n    pe_upgrade_ver:\n    platform: el-9-x86_64\n    hypervisor: vmpooler\n    disks:\n    - 16\n    roles:\n    - agent\n    - master\n  redhat7-64-1:\n    pe_dir:\n    pe_ver:\n    pe_upgrade_dir:\n    pe_upgrade_ver:\n    hypervisor: vmpooler\n    platform: el-7-x86_64\n    template: redhat-7-x86_64\n    disks:\n    - 8\n    - 16\n    roles:\n    - agent\nCONFIG:\n  nfs_server: none\n  consoleport: 443\n  pooling_api: http://vmpooler.delivery.puppetlabs.net/\n```\n\n### Arbitrary nested hashes and arrays\n\n```\n$ beaker-hostgenerator --global-config {host_tags={lifetime=4h}\\,list=[{listkey=listvalue}]\\} redhat7-64m{hostlist=\\[string\\,{key=value}\\,1234\\]}\n```\n\nWill generate\n\n```yaml\n---\nHOSTS:\n  redhat7-64-1:\n    pe_dir:\n    pe_ver:\n    pe_upgrade_dir:\n    pe_upgrade_ver:\n    hypervisor: vmpooler\n    platform: el-7-x86_64\n    template: redhat-7-x86_64\n    hostlist:\n    - string\n    - key: value\n    - 1234\n    roles:\n    - agent\n    - master\nCONFIG:\n  nfs_server: none\n  consoleport: 443\n  pooling_api: http://vmpooler.delivery.puppetlabs.net/\n  host_tags:\n    lifetime: 4h\n  list:\n  - listkey: listvalue\n```\n\n### Arbitrary global configuration settings\n\n```\n$ beaker-hostgenerator --global-config {preserve_hosts=onfail\\,log_level=debug\\,server.ip=12.345.6789} redhat7-64m\n```\n\nWill generate\n\n```yaml\n---\nHOSTS:\n  redhat7-64-1:\n    pe_dir:\n    pe_ver:\n    pe_upgrade_dir:\n    pe_upgrade_ver:\n    hypervisor: vmpooler\n    platform: el-7-x86_64\n    template: redhat-7-x86_64\n    roles:\n    - agent\n    - master\nCONFIG:\n  nfs_server: none\n  consoleport: 443\n  preserve_hosts: onfail\n  log_level: debug\n  server.ip: 12.345.6789\n  pooling_api: http://vmpooler.delivery.puppetlabs.net/\n```\n\n### Custom hypervisor\n\nThe following example shows one way of generating a custom hypervisor that\nincludes both per-host configuration and global configuration.\n\nThe term \"custom\" in this case signifies that it's not a built-in hypervisor\n(like `vmpooler`), which means we'll have to provide all the configuration\nourselves as there isn't any built-in configuration for our hypervisor.\n\n```\n$ beaker-hostgenerator --hypervisor=custom --global={custom_api=http://api.custom.net} centos9-64\n```\n\nWill generate\n\n```yaml\n---\nHOSTS:\n  centos9-64-1:\n    pe_dir:\n    pe_ver:\n    pe_upgrade_dir:\n    pe_upgrade_ver:\n    platform: el-9-x86_64\n    hypervisor: custom\n    roles:\n    - agent\nCONFIG:\n  nfs_server: none\n  consoleport: 443\n  custom_api: http://api.custom.net\n```\n\n### URL-encoded input\n\nIt may be necessary to URL-encode the input in order for it to properly be used\nin certain contexts, such as Jenkins.\n\nIn most cases it will only be necessary to escape the characters that support\narbitrary settings, which means the following characters:\n\n- `{` is `%7B`\n- `,` is `%2C`\n- `}` is `%7D`\n- ` ` is `%20`\n- `[` is `%5B`\n- `]` is `%5D`\n\nFor a full URL encoding reference see: http://www.w3schools.com/tags/ref_urlencode.asp\n\n```\n$ beaker-hostgenerator centos9-64mcd-aix53-POWERfa%7Bhypervisor=aix%2Cvmhostname=pe-aix-53-acceptance.delivery.puppetlabs.net%7D\n```\n\nIs equivalent to\n\n```\n$ beaker-hostgenerator centos9-64mcd-aix53-POWERfa{hypervisor=aix,vmhostname=pe-aix-53-acceptance.delivery.puppetlabs.net}\n```\n\nAnd will generate\n\n```yaml\n---\nHOSTS:\n  centos9-64-1:\n    pe_dir:\n    pe_ver:\n    pe_upgrade_dir:\n    pe_upgrade_ver:\n    hypervisor: vmpooler\n    platform: el-9-x86_64\n    template: centos-9-x86_64\n    roles:\n    - agent\n    - master\n    - dashboard\n    - database\n  aix53-POWER-1:\n    pe_dir:\n    pe_ver:\n    pe_upgrade_dir:\n    pe_upgrade_ver:\n    platform: aix-5.3-power\n    hypervisor: aix\n    vmhostname: pe-aix-53-acceptance.delivery.puppetlabs.net\n    roles:\n    - agent\n    - frictionless\nCONFIG:\n  nfs_server: none\n  consoleport: 443\n  pooling_api: http://vmpooler.delivery.puppetlabs.net/\n```\n\n## Testing\n\nBeaker Host Generator currently uses both rspec and minitest tests. To run both\nat the same time, run:\n```bash\nbundle exec rake test\n```\n\n### Test Fixtures\n\nBeaker Host Generator makes extensive use of test fixtures to validate its\nbehavior under specific conditions. An example of such a test fixture is as\nfollows:\n\n```yaml\n---\narguments_string: \"--pe_dir /opt/hello centos9-64mdc\"\nenvironment_variables: {}\nexpected_hash:\n  HOSTS:\n    centos9-64-1:\n      pe_dir: \"/opt/hello\"\n      pe_ver:\n      pe_upgrade_dir:\n      pe_upgrade_ver:\n      hypervisor: vmpooler\n      platform: el-9-x86_64\n      template: centos-9-x86_64\n      roles:\n      - agent\n      - master\n      - database\n      - dashboard\n  CONFIG:\n    nfs_server: none\n    consoleport: 443\n    pooling_api: http://vmpooler.delivery.puppetlabs.net/\nexpected_exception:\n```\n\nThese test fixtures are yaml files searched for in the directory\n`test/fixtures`. The data structure expected in these files is a hash with four\nkeys:\n\n- `arguments_string`: The command line arguments that should be passed to\n  `beaker-hostgenerator`\n- `environment_variables`: The environment variables that should be set during\n  the `beaker-hostgenerator` call.\n- `expected_hash`: A hash that should match the output of `beaker-hostgenerator`\n  when it is run with `arguments_string`\n- `expected_exception`: If the `arguments_string` passed to `beaker-hostgenerator`\n  is expected to lead to an exceptional state, this is the name of the exception\n  that the fixture test will attempt to match.\n\n#### Generated Fixtures\n\nIt is possible to generate test fixtures using the current state of the\n`beaker-hostgenerator` library. To do this, call the `generate:fixtures` Rake\ntask.\n\nHowever, this is not something that should need to be done very often. If you\nare running tests and find that some fixtures no longer work, you have most\nlikely made a change that incompatibly changes the behavior of\n`beaker-hostgenerator` for other users. Use the test fixtures as a guide to\nfigure out what you did wrong and figure out how to achieve your goal without\npotentially breaking `beaker-hostgenerator` for other users.\n\nThere are a few circumstances when you should expect to run the\n`generate:fixtures` task:\n\n- When you modify the `FixtureGenerator` to generate new fixtures.\n- When you need to fix a bug (generated hosts are not usable without your\n  change, for example).\n- When preparing for a major version bump of Beaker Host Generator.\n\n\n## Support\n\nSupport offered by [Puppet](https://puppet.com) may not always be timely\nsince it is maintained by a tooling support team that is primarily focused on\nimproving tools, infrastructure, and automation for our Enterprise products.\n\nThat being said, we will happily accept and review PRs from community members\ninterested in extending and using `beaker-hostgenerator` for their own purposes.\nSee the [contributing][contributing] doc for more information about how to\ncontribute.\n\nIf you have questions or comments, please contact the Beaker team at the\n`#puppet-dev` IRC channel on chat.freenode.org\n\n## Transfer Notice\n\nThis plugin was originally authored by [Puppet Inc](http://puppet.com).\nThe maintainer preferred that Vox Pupuli take ownership of the module for future improvement and maintenance.\nExisting pull requests and issues were transferred over, please fork and continue to contribute at https://github.com/voxpupuli/beaker-hostgenerator\n\nPreviously: https://github.com/puppetlabs/beaker-hostgenerator\n\n## Make a new release\n\nTo make a new release:\n\n* Switch to a new git branch\n* Update `lib/beaker-hostgenerator/version.rb` to the new version\n* export `CHANGELOG_GITHUB_TOKEN` with a GitHub access token\n* run `bundle exec rake changelog`\n* Review the CHANGELOG.md\n* Create a PR\n* Get it reviewed and merged\n* Create a signed git tag with the same version number and push it\n* GitHub actions will do the release\n\n## License\n\n`beaker-hostgenerator` is distributed under the\n[Apache License, Version 2.0][apache-v2]. See the [LICENSE][license] file for more details.\n\n[vmpooler]: https://github.com/puppetlabs/vmpooler\n[beaker]: https://github.com/puppetlabs/beaker\n[license]: LICENSE\n[contributing]: CONTRIBUTING.md\n[apache-v2]: http://www.apache.org/licenses/LICENSE-2.0.html\n[always-be-scheduling]: https://github.com/puppetlabs/always-be-scheduling\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fbeaker-hostgenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fbeaker-hostgenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fbeaker-hostgenerator/lists"}