{"id":21988055,"url":"https://github.com/maxivak/chef-repo-template","last_synced_at":"2025-03-23T02:41:42.868Z","repository":{"id":145648334,"uuid":"88435182","full_name":"maxivak/chef-repo-template","owner":"maxivak","description":"Chef repo template. Ready to use with knife-zero.","archived":false,"fork":false,"pushed_at":"2017-04-16T18:46:51.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T05:43:07.466Z","etag":null,"topics":["chef-repo","cookbooks","knife","knife-zero","template"],"latest_commit_sha":null,"homepage":null,"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/maxivak.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-16T18:45:30.000Z","updated_at":"2017-04-17T14:28:27.000Z","dependencies_parsed_at":"2023-07-22T11:37:15.537Z","dependency_job_id":null,"html_url":"https://github.com/maxivak/chef-repo-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxivak%2Fchef-repo-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxivak%2Fchef-repo-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxivak%2Fchef-repo-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxivak%2Fchef-repo-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxivak","download_url":"https://codeload.github.com/maxivak/chef-repo-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245048281,"owners_count":20552483,"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":["chef-repo","cookbooks","knife","knife-zero","template"],"created_at":"2024-11-29T19:15:27.015Z","updated_at":"2025-03-23T02:41:42.852Z","avatar_url":"https://github.com/maxivak.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nChef repo template ready to use with knife-zero.\n\nRead tutorial - [Provisioning remote server accessible by SSH with Chef and knife-zero](https://gist.github.com/maxivak/75eabc7ff292dd86c07ddc95add75953).\n\n\nDirectory structure:\n* berks-cookbooks — Chef cookbooks managed by Berkshelf\n* site-cookbooks - custom cookbooks\n* data_bags — Chef Data Bags\n* nodes — Chef nodes (folder with roles for each machine)\n* roles — Chef roles (role is a group of recipes and additional attributes)\n* environments— Chef environments\n\n\n\n\n# Quick start\n\n* edit \tBerfkshelf\ninclude external cookbooks\n\n\n* install external cookbooks using Berkshelf\n```\nberks install\n```\n\n\n\n* add roles for your servers\n\nexample `roles/myrole.json`:\n```\n{\n  \"name\": \"myrole\",\n  \"description\": \"my sample role\",\n  \"json_class\": \"Chef::Role\",\n\n  \"default_attributes\": {\n    \"var1\": \"some-value-1\"\n  },\n\n  \"run_list\": [\n    \"recipe[chef-cookbook-example-1]\",\n    \"recipe[temp1]\"\n  ]\n}\n\n```\n\nspecify the list of recipes to run and default attributes.\n\n\n* bootstrap the server (one time)\n```\nknife zero bootstrap 11.22.33.44 --ssh-user ubuntu --ssh-password mypass --node-name mynode1\n```\n\nit will create file nodes/mynode1.json with server attributes.\n\n\n* server attributes\n\nif you have additional attributes for this server - use attributes file (see example servers/myserver.json).\n\n* run provision with attributes\n```\nknife zero converge  \"name:mynode1\"  --ssh-user root --ssh-password root --json-attributes servers/myserver.json --override-runlist \"role[myrole]\"\n```\n\nit will run all recipes specified in role file 'roles/myrole.json'.\nAttributes in file `servers/myserver.json` will override default attributes specified in role.\n\nsee more options for knife zero converge [here](http://knife-zero.github.io/20_getting_started/).\n\n\n\n# Cookbooks\n\n* add custom cookbook\n\n```\ncd site-cookbooks\nchef generate cookbook example1\n```\n\nit will create a new folder `site-cookbooks/example1` with cookbook.\n\n\n\n\n# Roles\n\n* add roles to roles/ folder\n\n\n\n# Attributes\n\n* attributes for servers\n\n* place in folder /servers\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxivak%2Fchef-repo-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxivak%2Fchef-repo-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxivak%2Fchef-repo-template/lists"}