{"id":20677840,"url":"https://github.com/clivern/monk","last_synced_at":"2026-04-10T04:36:00.663Z","repository":{"id":86321878,"uuid":"121558747","full_name":"Clivern/Monk","owner":"Clivern","description":"🔥Easy To Use Chef Cookbooks To Automate Boring Stuff","archived":false,"fork":false,"pushed_at":"2024-02-29T20:27:32.000Z","size":77,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T04:29:31.675Z","etag":null,"topics":["apache","automation","chef","chef-cookbook","chef-recipes","consul","django","haproxy","infrastructure-automation","java","laravel","linux","mysql","nginx","php","python","spark","symfony"],"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/Clivern.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"dei":null}},"created_at":"2018-02-14T20:38:09.000Z","updated_at":"2018-07-16T17:59:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"86f260e4-8ad2-480e-84ac-e584a30183da","html_url":"https://github.com/Clivern/Monk","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/Clivern%2FMonk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clivern%2FMonk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clivern%2FMonk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clivern%2FMonk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Clivern","download_url":"https://codeload.github.com/Clivern/Monk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242910312,"owners_count":20205268,"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":["apache","automation","chef","chef-cookbook","chef-recipes","consul","django","haproxy","infrastructure-automation","java","laravel","linux","mysql","nginx","php","python","spark","symfony"],"created_at":"2024-11-16T21:17:17.817Z","updated_at":"2025-12-25T04:02:02.527Z","avatar_url":"https://github.com/Clivern.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Monk\n====\n\nEasy To Use Chef Recipes To Automate Boring Stuff.\n\n\nSetup\n-----\n\n### Install the Chef Server Ubuntu 16.04 x64\n\n1. Ensure that the Server is Accessible by Hostname\nThe first task you need to perform is to ensure that the hostname of the server is a resolvable fully qualified domain name (FQDN) or IP address. You can check this by typing:\n\n```bash\nhostname -f\n```\n\nIt should be something like the following:\n\n```bash\nsudo nano /etc/hosts\n```\n\n```bash\n127.0.1.1 fqdn_or_IP_address host_alias\n127.0.0.1 localhost\nIP_address fqdn_or_IP_address host_alias\n```\n\n2. Ensure that Server are up-to-date:\n```bash\nsudo apt-get update\n```\n\n3. Download the latest Chef server core (12.17.15 at the time of writing):\n```bash\nwget https://packages.chef.io/files/stable/chef-server/12.17.15/ubuntu/16.04/chef-server-core_12.17.15-1_amd64.deb\n```\n\n4. Install the server:\n```bash\nsudo dpkg -i chef-server-core_*.deb\n```\n\n5. Remove the download file:\n```bash\nrm chef-server-core_*.deb\n```\n\n6. Run the chef-server-ctl command to start the Chef server services:\n```bash\nsudo chef-server-ctl reconfigure\n```\n\n### Create an Admin User and Organization\n\n1. We can use the user-create sub-command of the chef-server-ctl command. The command requires a number of fields to be passed and The general syntax is:\n\n```bash\nchef-server-ctl user-create USERNAME FIRST_NAME LAST_NAME EMAIL PASSWORD\n```\n\nFor example, Let's go with the following:\n```bash\nsudo chef-server-ctl user-create monk john doe hello@monk.com password -f monk.pem\n```\n\n2. You can create an organization with the org-create sub-command.\n```bash\nchef-server-ctl org-create SHORTNAME LONGNAME --association_user USERNAME\n```\n\nFor example, let's go with the following:\n```bash\nsudo chef-server-ctl org-create clivern \"Clivern.com\" --association_user monk -f clivern-validator.pem\n```\n\n### Install Management Server\n\nIn order to install the management server, Just run the following:\n\n```bash\nchef-server-ctl install chef-manage\nchef-server-ctl reconfigure\nchef-manage-ctl reconfigure\n```\n\n### Configure a Chef Workstation\n\n1. Clone this repository.\n\n```bash\ngit clone https://github.com/Clivern/Monk.git Monk\n```\n\n2. [Download and Install the Chef Development Kit](https://downloads.chef.io/chefdk#/).\n\n3. Create `.chef` directory inside `Monk` repository.\n```bash\ncd Monk\nmkdir .chef\n```\n\n4. Then transfer the previously created private keys on chef server to `.chef` directory.\n```bash\ncd Monk\nscp root@chef_server_domain_or_ip:/root/monk.pem ./.chef\nscp root@chef_server_domain_or_ip:/root/clivern-validator.pem ./.chef\n```\n\n### Configuring Knife to Manage your Chef Environment\n\nNow that you have your Chef keys available on your workstation, we can configure the knife to connect to and control your Chef infrastructure. This is done through a knife.rb file that we will place inside `.chef` directory along with our keys.\n```bash\nnano ./.chef/knife.rb\n```\n\nIn this file, paste the following information:\n```ruby\ncurrent_dir = File.dirname(__FILE__)\nlog_level                :info\nlog_location             STDOUT\nnode_name                \"username\"\nclient_key               \"#{current_dir}/name_of_user_key\"\nvalidation_client_name   \"organization_name-validator\"\nvalidation_key           \"#{current_dir}/organization_key\"\nchef_server_url          \"https://server_domain_or_IP/organizations/organization_name\"\nsyntax_check_cache_path  \"#{ENV['HOME']}/.chef/syntaxcache\"\ncookbook_path            [\"#{current_dir}/../cookbooks\"]\n```\n\nWhich on our case should be something like the following:\n```ruby\ncurrent_dir = File.dirname(__FILE__)\nlog_level                :info\nlog_location             STDOUT\nnode_name                \"monk\"\nclient_key               \"#{current_dir}/monk.pem\"\nvalidation_client_name   \"clivern-validator\"\nvalidation_key           \"#{current_dir}/clivern-validator.pem\"\nchef_server_url          \"https://server_domain_or_IP/organizations/clivern\"\nsyntax_check_cache_path  \"#{ENV['HOME']}/.chef/syntaxcache\"\ncookbook_path            [\"#{current_dir}/../cookbooks\"]\n```\n\nNow if we run `knife client list`, we should get `clivern-validator`.\n\n\n### Bootstrapping a New Node with Knife\n\nIn order to bootstrap a new node, you can use the following command:\n```bash\nknife bootstrap node_domain_or_IP [options]\n```\n\nIn case we want to bootstrap a node with name `node-01` and username is `root` and the private key is in `.chef` directory, we should run the following on our chef workstation.\n```bash\nknife bootstrap node_domain_or_IP -x root -A -N node-01\n```\n\nOnce your new node is bootstrapped, you should have a new client and a new node:\n```bash\n$ knife client list\n\n    clivern-validator\n    node-01\n\n\n$ knife node list\n\n    node-01\n```\n\n\nOur Cookbooks\n-------------\n\n- [Package Cookbook](https://github.com/Clivern/Monk/tree/master/cookbooks/package): Install and Configure Linux Packages.\n- [Apache Cookbook](https://github.com/Clivern/Monk/tree/master/cookbooks/apache): Install and Configure Apache Server.\n- [Nginx Cookbook](https://github.com/Clivern/Monk/tree/master/cookbooks/nginx): Install and Configure Nginx Server.\n- [Django Apps Cookbook](https://github.com/Clivern/Kevin-Cookbook/): Install and Configure Django/Python Apps.\n- [Consul Cookbook](https://github.com/Clivern/Consul-Cookbook/): Install and Configure [Consul](https://www.consul.io/).\n- [HAProxy Cookbook](https://github.com/Clivern/HAProxy-Cookbook/): Install and Configure [HAProxy](http://www.haproxy.org/).\n- [MySQL Replication Cookbook](https://github.com/Clivern/MySQL-Replication-Cookbook/): Replicate MySQL With Chef.\n- [Prometheus Cookbook](https://github.com/Clivern/Prometheus-Cookbook): Install and Configure [Prometheus](https://www.prometheus.io/).\n\n\nCommunity Cookbooks\n-------------------\n\n- [Users](https://github.com/chef-cookbooks/users): Manages OS users from databags.\n\n\nAcknowledgements\n----------------\n\n© 2018, Clivern. Released under [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt).\n\n**Monk** is authored and maintained by [@clivern](http://github.com/clivern).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclivern%2Fmonk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclivern%2Fmonk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclivern%2Fmonk/lists"}