{"id":22477293,"url":"https://github.com/base2services/base2-cookbook","last_synced_at":"2026-02-27T08:42:45.717Z","repository":{"id":33468303,"uuid":"37113936","full_name":"base2Services/base2-cookbook","owner":"base2Services","description":"base2Services Cookbook","archived":false,"fork":false,"pushed_at":"2022-02-09T02:33:20.000Z","size":181,"stargazers_count":1,"open_issues_count":0,"forks_count":13,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2025-08-02T13:38:49.599Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/base2Services.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-09T06:15:03.000Z","updated_at":"2019-06-06T00:15:50.000Z","dependencies_parsed_at":"2022-09-18T00:01:34.795Z","dependency_job_id":null,"html_url":"https://github.com/base2Services/base2-cookbook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/base2Services/base2-cookbook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base2Services%2Fbase2-cookbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base2Services%2Fbase2-cookbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base2Services%2Fbase2-cookbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base2Services%2Fbase2-cookbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/base2Services","download_url":"https://codeload.github.com/base2Services/base2-cookbook/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base2Services%2Fbase2-cookbook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29888228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T08:34:21.514Z","status":"ssl_error","status_checked_at":"2026-02-27T08:32:38.035Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2024-12-06T14:10:09.019Z","updated_at":"2026-02-27T08:42:45.686Z","avatar_url":"https://github.com/base2Services.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# base2 cookbook\n\n# Requirements\n\n# Usage\n\nAdd the base2 cookbook to your berksfile and include the default recipe\n\ninclude_recipe \"base2::default\"\n\n# Attributes\n\ndefault['system']['timezone']   - Country/City, as per /usr/share/zoneinfo\ndefault['common']['packages']   - Default packages to install.\n\n# Recipes\n\n# Files\n\n## ec2-bootstrap\n**Suported OS:** Linux\n\n##### Purpose\nAuto discovery of EC2 Tags to generate chef override.json and triggers chef\n\n##### Usage\nAdd into userdata\n```\n/opt/base2/bin/ec2-bootstrap \u003cAWS::Region\u003e \u003cAWS::AccountId\u003e\n```\n\n## EC2-Bootstrap.ps1\n**Suported OS:** Windows\n\n##### Purpose\nAuto discovery of EC2 Tags to generate chef override.json and triggers chef\n\n##### Usage\nCall from userdata in cloudformation\n```\nC:/base2/bin/EC2-Bootstrap.ps1\n```\n\n## find_asg_ip\n**Suported OS:** Linux\n\n##### Purpose\nAuto discovery of all EC2 instances based of the Environment tag and displays to the user Name, IP address and InstanceId\n\n##### Usage\nmanually execute the file on the host or build in to your motd to see it when you log on.\n\n## get_ssm_parameters\n**Suported OS:** Linux, Windows\n\n##### Purpose\nRetrieve encrypted secrets in AWS SSM Parameter store and add into chef override.json\n\n##### Usage\nRequires a tag `SSMParameters` set to `true` on the EC2 instance for the bootstrap to run the script.\u003cbr /\u003e\nCreate your SSM parameters using your favourite method\nThe SSM Parameter naming convention is as follows `default..base2..app..SECRET`\u003cbr /\u003e\n\n* Delimiter\n  * `..` Separates each section of the Name\n* Environment or Global Identifier (First section of name)\n  * `default` is a global identifier allowing this secret to be used across all environments for a given AWS account  \n  * `environment` is a environment specific Parameter that will only be retrieved for that environment. This will override any globally set parameters\n* Chef attribute\n  * The identifier gets stripped off the name which then turns the rest of the name into a chef attribute i.e. `node['base2']['app']['SECRET']`\n  * This attribute is store in the override.json file and can be called in a recipe as you normally would.\n\nExamples:\n* The parameter name `default..base2..app..SECRET` becomes the chef attribute `node['base2']['app']['SECRET']` in the chef recipe and is available in **all** environments\n* The parameter name `dev..base2..app..APIKEY` becomes the chef attribute `node['base2']['app']['APIKEY']` in the chef recipe and is available in just the **dev** environment\n* The parameter name `prod..base2..app..SECRET` becomes the chef attribute `node['base2']['app']['SECRET']` in the chef recipe and is available in just the **prod** environment and overrides the `default..base2..app..SECRET` parameter\n\n## wait_for_alb\n**Suported OS:** Linux, Windows\n\n##### Purpose\nWaits for a EC2 instance to become healthy in specified target group(s)\n\n##### Usage\nCall from userdata in cloudformation after chef run.\n```\n/opt/base2/bin/wait_for_alb -r \u003cAWS::Region\u003e -i \u003cInstanceId\u003e -t \u003cTargetGroupA\u003e,\u003cTargetGroupB\u003e -T 2000\n```\n\n#### Options\n`-r` `--region` - specify a aws region i.e. -r ap-southeast-2 \u003cbr /\u003e\n`-t` `--target-groups` - specify one or more target group arns seperated by comma i.e. -t arn::1,arn::2\u003cbr /\u003e\n`-i` `--instance-id` - specify the ec2 instance id i.e. -i i-0a5c9e3f2ff024ce9\u003cbr /\u003e\n`-T` `--timeout` - Time out in seconds, defaults to 3600\n\n## wait_for_elb\n**Suported OS:** Linux, Windows\n\n##### Purpose\nQueries all elastic load balancers in the region that contain the instance-id\nWaits for the ec2 instance to become healthy in the classic elastic load balancer(s)\n\n##### Usage\nCall from userdata in cloudformation after chef run.\n```\n/opt/base2/bin/wait_for_elb -r \u003cAWS::Region\u003e -i \u003cInstanceId\u003e -T 2000\n```\n\n#### Options\n`-r` `--region` - specify a aws region i.e. -r ap-southeast-2 \u003cbr /\u003e\n`-i` `--instance-id` - specify the ec2 instance id i.e. -i i-0a5c9e3f2ff024ce9\u003cbr /\u003e\n`-T` `--timeout` - Time out in seconds, defaults to 3600\n\n## Stripe-Windows-Ephemeral-Disks.ps1\n**Suported OS:** Windows\n\n##### Purpose\nTo create a stripped ephemeral disk on compatible windows EC2 instances\n\n##### Usage\nCall from userdata in cloudformation\n```\nC:/base2/bin/Stripe-Windows-Ephemeral-Disks.ps1\n```\n\n## attach_eni\n**Suported OS:** Linux, Windows (untested)\n\n##### Purpose\nAttaches an Elastic Network Interface to an EC2 instance based on a tag or ID.\n\n##### Usage\nCall from userdata in cloudformation.\n```\n/opt/base2/bin/attach_eni -r \u003cAWS::Region\u003e -n \u003cElasticNetworkInterfaceID\u003e\n```\n\n#### Options\n`-r` `--region` - specify a aws region i.e. -r ap-southeast-2 \u003cbr /\u003e\n`-t` `--tag` - specify eni reservation tag [Required if -n or --network-interface not specified]\u003cbr /\u003e\n`-n` `--network-interface` - specify eni id [Required if -t or --tag not specified]\u003cbr /\u003e\n`-d` `--device-index` - specify device index for eni, defaults to 1 [Optional]\u003cbr /\u003e\n`-T` `--timeout` - specify timeout for script, defaults to 600 [Optional]\n\n\n## attach_ebs\n**Suported OS:** Linux, Windows (untested)\n\n##### Purpose\nAttaches an Elastic block Store to an EC2 instance based on a tag or volume.\n\n##### Usage\nCall from userdata in cloudformation.\n```\n/opt/base2/bin/attach_ebs -r \u003cAWS::Region\u003e -t \u003ctag\u003e\n```\n\n#### Options\n`-r` `--region` - specify a aws region i.e. -r ap-southeast-2 \u003cbr /\u003e\n`-t` `--tag` - specify eni reservation tag [Required if -v or --volume not specified]\u003cbr /\u003e\n`-v` `--volume` - specify volume [Required if -t or --tag not specified]\u003cbr /\u003e\n`-d` `--device` - specify volume device type, defaults to /dev/xvdb [Optional]\u003cbr /\u003e\n`-T` `--timeout` - specify timeout for script, defaults to 600 [Optional]\n\n# Author\n\nAuthor:: itsupport@base2services.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbase2services%2Fbase2-cookbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbase2services%2Fbase2-cookbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbase2services%2Fbase2-cookbook/lists"}