{"id":17744088,"url":"https://github.com/thomasvincent/chef-hbase-cookbook","last_synced_at":"2026-02-10T18:35:27.714Z","repository":{"id":335975709,"uuid":"17076998","full_name":"thomasvincent/chef-hbase-cookbook","owner":"thomasvincent","description":"[infrastructure] Automates Apache HBase deployment and management with Chef.","archived":false,"fork":false,"pushed_at":"2026-02-02T08:57:23.000Z","size":153,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-02T15:56:04.545Z","etag":null,"topics":["big-data","chef","configuration-management","cookbook","devops","hadoop","hbase","ruby"],"latest_commit_sha":null,"homepage":null,"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/thomasvincent.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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}},"created_at":"2014-02-22T03:12:40.000Z","updated_at":"2026-02-02T08:57:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/thomasvincent/chef-hbase-cookbook","commit_stats":null,"previous_names":["thomasvincent/chef-hbase-cookbook"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/thomasvincent/chef-hbase-cookbook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasvincent%2Fchef-hbase-cookbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasvincent%2Fchef-hbase-cookbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasvincent%2Fchef-hbase-cookbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasvincent%2Fchef-hbase-cookbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasvincent","download_url":"https://codeload.github.com/thomasvincent/chef-hbase-cookbook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasvincent%2Fchef-hbase-cookbook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29311334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T17:48:59.043Z","status":"ssl_error","status_checked_at":"2026-02-10T17:45:37.240Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["big-data","chef","configuration-management","cookbook","devops","hadoop","hbase","ruby"],"created_at":"2024-10-26T06:41:55.585Z","updated_at":"2026-02-10T18:35:27.701Z","avatar_url":"https://github.com/thomasvincent.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HBase Cookbook\n\n[![CI](https://github.com/thomasvincent/chef-hbase-cookbook/actions/workflows/ci.yml/badge.svg)](https://github.com/thomasvincent/chef-hbase-cookbook/actions/workflows/ci.yml)\n\nThis cookbook installs and configures Apache HBase - the Hadoop database, a distributed, scalable, big data store.\n\n## Requirements\n\n### Platforms\n- Ubuntu 20.04, 22.04\n- Debian 11+\n- AlmaLinux/RHEL 8, 9\n- Amazon Linux 2\n- Fedora 36+\n\n### Chef\n- Chef 18.0+\n\n### Cookbooks\n- `ark` - Used for installing HBase from binary releases\n\n## Features\n\n- Installs and configures HBase 2.x in standalone or distributed mode\n- Supports HBase Master, RegionServer, and Backup Master roles\n- Supports optional REST and Thrift services\n- Full Kerberos security integration\n- Support for metrics collection (Prometheus, Graphite)\n- Advanced tuning parameters\n- Comprehensive configuration options via attributes\n- Modern custom resources for service and configuration management\n- Integration with Hadoop HDFS (for rootdir)\n- Docker-based testing infrastructure\n\n## Usage\n\n### Basic standalone HBase\n\nInclude `hbase` in your node's `run_list`:\n\n```json\n{\n  \"run_list\": [\n    \"recipe[hbase::default]\"\n  ]\n}\n```\n\nThis will install HBase in standalone mode using default settings.\n\n### Distributed Mode\n\nTo run HBase in distributed mode with masters and region servers:\n\n```ruby\n# Master node\nnode['hbase']['config']['hbase.cluster.distributed'] = true\nnode['hbase']['config']['hbase.rootdir'] = 'hdfs://namenode:8020/hbase'\nnode['hbase']['config']['hbase.zookeeper.quorum'] = 'zk1,zk2,zk3'\nnode['hbase']['topology']['role'] = 'master'\nnode['hbase']['topology']['regionservers'] = ['rs1.example.com', 'rs2.example.com', 'rs3.example.com']\n\n# RegionServer nodes\nnode['hbase']['config']['hbase.cluster.distributed'] = true\nnode['hbase']['config']['hbase.rootdir'] = 'hdfs://namenode:8020/hbase'\nnode['hbase']['config']['hbase.zookeeper.quorum'] = 'zk1,zk2,zk3'\nnode['hbase']['topology']['role'] = 'regionserver'\n```\n\n### Enabling Thrift and REST Servers\n\n```ruby\nnode['hbase']['services']['thrift']['enabled'] = true\nnode['hbase']['services']['thrift']['config'] = {\n  'hbase.thrift.info.port' =\u003e 9095,\n  'hbase.thrift.port' =\u003e 9090\n}\n\nnode['hbase']['services']['rest']['enabled'] = true\nnode['hbase']['services']['rest']['config'] = {\n  'hbase.rest.info.port' =\u003e 8085,\n  'hbase.rest.port' =\u003e 8080\n}\n```\n\n## Security\n\n### Kerberos Authentication\n\nThis cookbook provides full support for Kerberos authentication, which is the recommended security mechanism for production HBase deployments. When Kerberos is enabled, the cookbook automatically configures:\n\n- HBase Master and RegionServer Kerberos principals\n- Keytab file permissions and ownership\n- RPC protection settings\n- Access control coprocessors\n\n#### Prerequisites\n\nBefore enabling Kerberos authentication, ensure:\n\n1. A working Kerberos KDC (Key Distribution Center) is available\n2. Kerberos client packages are installed on all HBase nodes\n3. Service principals are created for HBase (e.g., `hbase/_HOST@REALM`)\n4. Keytab files are distributed to all HBase nodes\n\n#### Configuration\n\nTo enable Kerberos authentication:\n\n```ruby\n# Enable Kerberos authentication\nnode['hbase']['security']['authentication'] = 'kerberos'\nnode['hbase']['security']['authorization'] = true\n\n# Configure Kerberos settings\nnode['hbase']['security']['kerberos']['principal'] = 'hbase/_HOST'\nnode['hbase']['security']['kerberos']['keytab'] = '/etc/hbase/conf/hbase.keytab'\nnode['hbase']['security']['kerberos']['realm'] = 'EXAMPLE.COM'\nnode['hbase']['security']['kerberos']['server_principal'] = 'hbase/_HOST@EXAMPLE.COM'\nnode['hbase']['security']['kerberos']['regionserver_principal'] = 'hbase/_HOST@EXAMPLE.COM'\n```\n\nThe cookbook will automatically set the following hbase-site.xml properties when Kerberos is enabled:\n\n| Property | Value |\n|----------|-------|\n| `hbase.security.authentication` | `kerberos` |\n| `hbase.security.authorization` | `true` (if authorization enabled) |\n| `hbase.master.kerberos.principal` | Configured server principal |\n| `hbase.regionserver.kerberos.principal` | Configured regionserver principal |\n| `hbase.master.keytab.file` | Configured keytab path |\n| `hbase.regionserver.keytab.file` | Configured keytab path |\n| `hbase.rpc.protection` | `privacy` |\n| `hbase.coprocessor.master.classes` | `AccessController` |\n| `hbase.coprocessor.region.classes` | `TokenProvider,AccessController` |\n\n#### Security Best Practices\n\n1. **Keytab Protection**: Keytab files are automatically set to mode `0400` (read-only by owner)\n2. **Network Security**: Use firewall rules to restrict access to HBase ports\n3. **Audit Logging**: Enable HBase audit logging for security monitoring\n4. **Regular Rotation**: Implement regular keytab rotation procedures\n\n### Metrics Collection\n\n```ruby\n# Enable Prometheus metrics\nnode['hbase']['metrics']['enabled'] = true\nnode['hbase']['metrics']['provider'] = 'prometheus'\nnode['hbase']['metrics']['prometheus']['port'] = 9090\n\n# Or Graphite metrics\nnode['hbase']['metrics']['enabled'] = true\nnode['hbase']['metrics']['provider'] = 'graphite'\nnode['hbase']['metrics']['graphite']['host'] = 'metrics.example.com'\nnode['hbase']['metrics']['graphite']['port'] = 2003\nnode['hbase']['metrics']['graphite']['prefix'] = 'prod.hbase'\n```\n\n### Java Compatibility\n\nThis cookbook includes a dedicated recipe for handling Java compatibility. HBase 2.4.0 officially supports Java 8, with preliminary support for Java 11.\n\n```ruby\n# Set Java version (8 or 11)\nnode['hbase']['java']['version'] = '11'\n\n# Optionally, set a custom JAVA_HOME (if not set, it will be auto-detected)\nnode['hbase']['java_home'] = '/path/to/java/home'\n```\n\nThe cookbook automatically:\n1. Detects appropriate Java home location based on platform and Java version\n2. Installs the appropriate JDK package for your platform\n3. Configures JAVA_HOME and adds it to the system environment\n4. Verifies Java installation before proceeding with HBase installation\n\nSupported Java versions per HBase version:\n- HBase 2.5.x: Java 8 (officially), Java 11, 17 (preliminary)\n- HBase 2.4.x: Java 8 (officially), Java 11 (preliminary)\n- HBase 2.3.x: Java 8 only\n\n### Advanced JVM Configuration\n\n```ruby\nnode['hbase']['java_opts'] = '-Xmx4096m -Xms1024m -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200'\n```\n\n### Custom Resources\n\nThis cookbook provides two custom resources:\n\n#### hbase_config\n\nCreates a configuration file:\n\n```ruby\nhbase_config '/etc/hbase/conf/my-custom-site.xml' do\n  user 'hbase'\n  group 'hbase'\n  variables({\n    'custom.property.one' =\u003e 'value1',\n    'custom.property.two' =\u003e 'value2'\n  })\n  config_type 'xml'\n  restart_services ['master', 'regionserver']\n  action :create\nend\n```\n\n#### hbase_service\n\nCreates and manages an HBase service:\n\n```ruby\nhbase_service 'master' do\n  java_opts '-Xmx2048m'\n  service_config {\n    'hbase.master.info.port' =\u003e 16011\n  }\n  restart_on_config_change true\n  action [:create, :enable, :start]\nend\n```\n\n## Testing\n\nThis cookbook uses Test Kitchen with Docker for integration testing.\n\n### Testing with Dokken\n\nRun Test Kitchen using the bundled configuration:\n\n```bash\n# Run all tests using dokken\nbundle exec kitchen test\n\n# Test a specific platform\nbundle exec kitchen test ubuntu-20-04\n\n# Test a specific instance\nbundle exec kitchen test ubuntu-20-04-default\n```\n\n### Using Rake Tasks for Testing\n\nThe cookbook includes Rake tasks to simplify testing:\n\n```bash\n# Run all tests (style, unit, integration)\nbundle exec rake test\n\n# Run only style checks\nbundle exec rake style\n\n# Run only unit tests\nbundle exec rake spec\n\n# Run integration tests\nbundle exec rake integration:kitchen\n\n# Test a specific platform\nbundle exec rake integration:platform[ubuntu-20-04]\n\n# Test a specific suite\nbundle exec rake integration:suite[distributed]\n\n# Test a specific instance\nbundle exec rake integration:instance[ubuntu-20-04-default]\n```\n\n## CI/CD\n\nThis cookbook uses GitHub Actions for CI/CD, with workflows defined in `.github/workflows/ci.yml`:\n\n1. **Linting**: Runs Cookstyle to check code style\n2. **Unit Testing**: Runs ChefSpec tests \n3. **Integration Testing**: Runs Test Kitchen tests on multiple platforms using Docker:\n   - Ubuntu 20.04 and 22.04\n   - AlmaLinux 8\n   - Amazon Linux 2\n\n## Attributes\n\nSee `attributes/default.rb` for a comprehensive list of configurable attributes.\n\n## Development\n\n1. Fork the repository\n2. Create a feature branch\n3. Add tests for your changes\n4. Make your changes\n5. Run the tests to ensure they pass\n6. Submit a Pull Request\n\n## License\n\nLicensed under the Apache License, Version 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasvincent%2Fchef-hbase-cookbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasvincent%2Fchef-hbase-cookbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasvincent%2Fchef-hbase-cookbook/lists"}