-
Notifications
You must be signed in to change notification settings - Fork 183
Expand file tree
/
Copy pathNOTES_Install_Chef.txt
More file actions
83 lines (72 loc) · 2.06 KB
/
NOTES_Install_Chef.txt
File metadata and controls
83 lines (72 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#Make sure that DNS and hostname is set up first...
************ Installing the Chef Server 11/12
** alias Chef
** Download the appropriate package
** Installing
** On Centos
rpm -Uvh /tmp/chef-server-core-<version>.rpm
** oN Ubuntu
dpkg -i /tmp/chef-server-core-<version>.deb
** configure the same and restart it..
chef-server-ctl reconfigure
*** CHEF 12 SPECIFIC
** create user
chef-server-ctl user-create USER_NAME FIRST_NAME LAST_NAME EMAIL 'PASSWORD' --filename FILE_NAME
# file_name is path to private key...
** create org..
chef-server-ctl org-create short_name 'full_organization_name' --association_user user_name --filename ORGANIZATION-validator.pem
*** Installing management console
chef-server-ctl install chef-manage
chef-server-ctl reconfigure
chef-manage-ctl reconfigure
*** install push jobs
chef-server-ctl install opscode-push-jobs-server
chef-server-ctl reconfigure
opscode-push-jobs-server-ctl reconfigure
*** Install reporting
chef-server-ctl install opscode-reporting
chef-server-ctl reconfigure
opscode-reporting-ctl reconfigure
####Install Client
curl -L https://www.chef.io/chef/install.sh | sudo bash
###Alternatively
knife bootstrap node_domain_or_IP -x username -P password -N name_for_node --sudo
#e.g
#knife bootstrap 192.168.33.84 -x vagrant -P vagrant -N CHEF_CLIENT --sudo
# Some key Locations
#C:/chef/chef-repo/.chef
## initial knife command
knife configure --initial
# editing a JSON for a node
knife node edit node1 -a
knife node edit CHEF_CLIENT -a
## sample:
{
"normal": {
},
"name": "node1",
"override": {
"mycustomvariable":81
},
"default": {
},
"json_class": "Chef::Node",
"automatic": {
},
"run_list": [
"recipe[devops]",
"role[webserver]"
],
"chef_type": "node"
}
# Uploading a cookbook
knife cookbook upload /cookbooks/httpd
## https://docs.chef.io/knife_cookbook.html
# Create a repos
git clone https://github.com/chef/chef-repo (or)
chef generate repo
# Someadditional JSON Exampless
{
"chef_environment": "pre-production"
}
https://docs.chef.io/ctl_chef_client.html