Last active
August 29, 2015 14:04
-
-
Save yeonki-choi/5e5fccbab6bfdbe5cb8e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download Chef DK(Development Kit) | |
# Chef DK includes berkshlef which is a tool of managing dependencies of cookbooks. | |
[root@chef-dk ~] wget https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chefdk-0.2.0-2.el6.x86_64.rpm | |
[root@chef-dk ~] chmod +x chefdk-0.2.0-2.el6.x86_64.rpm | |
[root@chef-dk ~] rpm -Uvh ./chefdk-0.2.0-2.el6.x86_64.rpm | |
# Clone openstack-chef-repo for icehouse (Stackforge) | |
[root@chef-dk ~] mkdir -p chef-repo/cookbooks | |
[root@chef-dk ~] cd chef-repo/cookbooks | |
[root@chef-dk cookbooks] git clone https://github.com/yeonki-choi/openstack-chef-repo.git | |
[root@chef-dk cookbooks] cd openstack-chef-repo | |
# Run berks to download cookbooks specified in ./openstack-chef-repo/Berksfile | |
[root@chef-dk cookbooks] berks vendor /root/chef-repo/cookbooks_ops | |
DEPRECATED: Your Berksfile contains a site location pointing to the Opscode Community Site (site :opscode). Site locations have been replaced by the source location. Change this to: 'source "https://supermarket.getchef.com"' to remove this warning. For more information visit https://github.com/berkshelf/berkshelf/wiki/deprecated-locations | |
Resolving cookbook dependencies... | |
Fetching 'openstack-block-storage' from git://github.com/stackforge/cookbook-openstack-block-storage.git (at stable/icehouse) | |
Fetching 'openstack-common' from git://github.com/stackforge/cookbook-openstack-common.git (at stable/icehouse) | |
Fetching 'openstack-compute' from git://github.com/stackforge/cookbook-openstack-compute.git (at stable/icehouse) | |
Fetching 'openstack-dashboard' from git://github.com/stackforge/cookbook-openstack-dashboard.git (at stable/icehouse) | |
Fetching 'openstack-identity' from git://github.com/stackforge/cookbook-openstack-identity.git (at stable/icehouse) | |
Fetching 'openstack-image' from git://github.com/stackforge/cookbook-openstack-image.git (at stable/icehouse) | |
Fetching 'openstack-network' from git://github.com/stackforge/cookbook-openstack-network.git (at stable/icehouse) | |
Fetching 'openstack-object-storage' from git://github.com/stackforge/cookbook-openstack-object-storage.git (at stable/icehouse) | |
Fetching 'openstack-ops-database' from git://github.com/stackforge/cookbook-openstack-ops-database.git (at stable/icehouse) | |
Fetching 'openstack-ops-messaging' from git://github.com/stackforge/cookbook-openstack-ops-messaging.git (at stable/icehouse) | |
Fetching 'openstack-orchestration' from git://github.com/stackforge/cookbook-openstack-orchestration.git (at stable/icehouse) | |
Fetching 'openstack-telemetry' from git://github.com/stackforge/cookbook-openstack-telemetry.git (at stable/icehouse) | |
Fetching 'statsd' from git://github.com/att-cloud/cookbook-statsd.git (at master) | |
Fetching cookbook index from https://supermarket.getchef.com... | |
Installing apache2 (1.9.6) | |
Installing apt (2.3.8) | |
Installing aws (2.1.1) | |
Installing build-essential (1.4.2) | |
Installing chef_handler (1.1.6) | |
Installing database (2.2.0) | |
Installing dmg (2.2.0) | |
Installing erlang (1.4.2) | |
Installing git (4.0.2) | |
Installing iptables (0.13.2) | |
Installing logrotate (1.6.0) | |
Installing memcached (1.7.2) | |
Installing mysql (5.3.6) | |
Installing mysql-chef_gem (0.0.2) | |
Installing openssl (1.1.0) | |
Using openstack-block-storage (9.4.1) from git://github.com/stackforge/cookbook-openstack-block-storage.git (at stable/icehouse) | |
Using openstack-common (9.7.0) from git://github.com/stackforge/cookbook-openstack-common.git (at stable/icehouse) | |
Using openstack-compute (9.3.1) from git://github.com/stackforge/cookbook-openstack-compute.git (at stable/icehouse) | |
Using openstack-dashboard (9.1.0) from git://github.com/stackforge/cookbook-openstack-dashboard.git (at stable/icehouse) | |
Using openstack-identity (9.3.1) from git://github.com/stackforge/cookbook-openstack-identity.git (at stable/icehouse) | |
Using openstack-image (9.2.0) from git://github.com/stackforge/cookbook-openstack-image.git (at stable/icehouse) | |
Using openstack-network (9.1.1) from git://github.com/stackforge/cookbook-openstack-network.git (at stable/icehouse) | |
Using openstack-object-storage (9.0.3) from git://github.com/stackforge/cookbook-openstack-object-storage.git (at stable/icehouse) | |
Using openstack-ops-database (9.2.0) from git://github.com/stackforge/cookbook-openstack-ops-database.git (at stable/icehouse) | |
Using openstack-ops-messaging (9.0.1) from git://github.com/stackforge/cookbook-openstack-ops-messaging.git (at stable/icehouse) | |
Using openstack-orchestration (9.2.0) from git://github.com/stackforge/cookbook-openstack-orchestration.git (at stable/icehouse) | |
Using openstack-telemetry (9.3.0) from git://github.com/stackforge/cookbook-openstack-telemetry.git (at stable/icehouse) | |
Installing pacman (1.1.1) | |
Installing postgresql (3.3.4) | |
Installing python (1.4.6) | |
Installing rabbitmq (3.0.4) | |
Installing runit (1.5.10) | |
Installing selinux (0.7.2) | |
Installing yum (3.1.4) | |
Installing yum-epel (0.3.4) | |
Installing yum-erlang_solutions (0.2.0) | |
Installing yum-mysql-community (0.1.10) | |
Vendoring apache2 (1.9.6) to /root/chef-repo/cookbooks_ops/apache2 | |
Vendoring apt (2.3.8) to /root/chef-repo/cookbooks_ops/apt | |
Vendoring aws (2.1.1) to /root/chef-repo/cookbooks_ops/aws | |
Vendoring build-essential (1.4.2) to /root/chef-repo/cookbooks_ops/build-essential | |
Vendoring chef_handler (1.1.6) to /root/chef-repo/cookbooks_ops/chef_handler | |
Vendoring database (2.2.0) to /root/chef-repo/cookbooks_ops/database | |
Vendoring dmg (2.2.0) to /root/chef-repo/cookbooks_ops/dmg | |
Vendoring erlang (1.4.2) to /root/chef-repo/cookbooks_ops/erlang | |
Vendoring git (4.0.2) to /root/chef-repo/cookbooks_ops/git | |
Vendoring iptables (0.13.2) to /root/chef-repo/cookbooks_ops/iptables | |
Vendoring logrotate (1.6.0) to /root/chef-repo/cookbooks_ops/logrotate | |
Vendoring memcached (1.7.2) to /root/chef-repo/cookbooks_ops/memcached | |
Vendoring mysql (5.3.6) to /root/chef-repo/cookbooks_ops/mysql | |
Vendoring mysql-chef_gem (0.0.2) to /root/chef-repo/cookbooks_ops/mysql-chef_gem | |
Vendoring openssl (1.1.0) to /root/chef-repo/cookbooks_ops/openssl | |
Vendoring openstack-block-storage (9.4.1) to /root/chef-repo/cookbooks_ops/openstack-block-storage | |
Vendoring openstack-common (9.7.0) to /root/chef-repo/cookbooks_ops/openstack-common | |
Vendoring openstack-compute (9.3.1) to /root/chef-repo/cookbooks_ops/openstack-compute | |
Vendoring openstack-dashboard (9.1.0) to /root/chef-repo/cookbooks_ops/openstack-dashboard | |
Vendoring openstack-identity (9.3.1) to /root/chef-repo/cookbooks_ops/openstack-identity | |
Vendoring openstack-image (9.2.0) to /root/chef-repo/cookbooks_ops/openstack-image | |
Vendoring openstack-network (9.1.1) to /root/chef-repo/cookbooks_ops/openstack-network | |
Vendoring openstack-object-storage (9.0.3) to /root/chef-repo/cookbooks_ops/openstack-object-storage | |
Vendoring openstack-ops-database (9.2.0) to /root/chef-repo/cookbooks_ops/openstack-ops-database | |
Vendoring openstack-ops-messaging (9.0.1) to /root/chef-repo/cookbooks_ops/openstack-ops-messaging | |
Vendoring openstack-orchestration (9.2.0) to /root/chef-repo/cookbooks_ops/openstack-orchestration | |
Vendoring openstack-telemetry (9.3.0) to /root/chef-repo/cookbooks_ops/openstack-telemetry | |
Vendoring pacman (1.1.1) to /root/chef-repo/cookbooks_ops/pacman | |
Vendoring postgresql (3.3.4) to /root/chef-repo/cookbooks_ops/postgresql | |
Vendoring python (1.4.6) to /root/chef-repo/cookbooks_ops/python | |
Vendoring rabbitmq (3.0.4) to /root/chef-repo/cookbooks_ops/rabbitmq | |
Vendoring runit (1.5.10) to /root/chef-repo/cookbooks_ops/runit | |
Vendoring selinux (0.7.2) to /root/chef-repo/cookbooks_ops/selinux | |
Vendoring statsd (0.1.6) to /root/chef-repo/cookbooks_ops/statsd | |
Vendoring windows (1.33.1) to /root/chef-repo/cookbooks_ops/windows | |
Vendoring xfs (1.1.0) to /root/chef-repo/cookbooks_ops/xfs | |
Vendoring yum (3.1.4) to /root/chef-repo/cookbooks_ops/yum | |
Vendoring yum-epel (0.3.4) to /root/chef-repo/cookbooks_ops/yum-epel | |
Vendoring yum-erlang_solutions (0.2.0) to /root/chef-repo/cookbooks_ops/yum-erlang_solutions | |
Vendoring yum-mysql-community (0.1.10) to /root/chef-repo/cookbooks_ops/yum-mysql-community | |
# Cookbooks are downloaded | |
[root@chef-dk cookbooks]# ls -al /root/chef-repo/cookbooks_ops/ | |
total 176 | |
drwxr-xr-x 42 root root 4096 Jul 31 01:39 . | |
drwxr-xr-x 4 root root 4096 Jul 31 01:39 .. | |
drwxr-xr-x 7 root root 4096 Jul 31 01:39 apache2 | |
drwxr-xr-x 9 root root 4096 Jul 31 01:39 apt | |
drwxr-xr-x 7 root root 4096 Jul 31 01:39 aws | |
-rw------- 1 root root 5461 Jul 31 01:39 Berksfile.lock | |
drwxr-xr-x 4 root root 4096 Jul 31 01:39 build-essential | |
drwxr-xr-x 8 root root 4096 Jul 31 01:39 chef_handler | |
drwxr-xr-x 5 root root 4096 Jul 31 01:39 database | |
drwxr-xr-x 6 root root 4096 Jul 31 01:39 dmg | |
drwxr-xr-x 4 root root 4096 Jul 31 01:39 erlang | |
drwxr-xr-x 7 root root 4096 Jul 31 01:39 git | |
drwxr-xr-x 5 root root 4096 Jul 31 01:39 iptables | |
drwxr-xr-x 7 root root 4096 Jul 31 01:39 logrotate | |
drwxr-xr-x 6 root root 4096 Jul 31 01:39 memcached | |
drwxr-xr-x 6 root root 4096 Jul 31 01:39 mysql | |
drwxr-xr-x 4 root root 4096 Jul 31 01:39 mysql-chef_gem | |
drwxr-xr-x 4 root root 4096 Jul 31 01:39 openssl | |
drwxr-xr-x 6 root root 4096 Jul 31 01:39 openstack-block-storage | |
drwxr-xr-x 7 root root 4096 Jul 31 01:39 openstack-common | |
drwxr-xr-x 7 root root 4096 Jul 31 01:39 openstack-compute | |
drwxr-xr-x 7 root root 4096 Jul 31 01:39 openstack-dashboard | |
drwxr-xr-x 9 root root 4096 Jul 31 01:39 openstack-identity | |
drwxr-xr-x 10 root root 4096 Jul 31 01:39 openstack-image | |
drwxr-xr-x 7 root root 4096 Jul 31 01:39 openstack-network | |
drwxr-xr-x 10 root root 4096 Jul 31 01:39 openstack-object-storage | |
drwxr-xr-x 6 root root 4096 Jul 31 01:39 openstack-ops-database | |
drwxr-xr-x 5 root root 4096 Jul 31 01:39 openstack-ops-messaging | |
drwxr-xr-x 6 root root 4096 Jul 31 01:39 openstack-orchestration | |
drwxr-xr-x 6 root root 4096 Jul 31 01:39 openstack-telemetry | |
drwxr-xr-x 6 root root 4096 Jul 31 01:39 pacman | |
drwxr-xr-x 7 root root 4096 Jul 31 01:39 postgresql | |
drwxr-xr-x 8 root root 4096 Jul 31 01:39 python | |
drwxr-xr-x 8 root root 4096 Jul 31 01:39 rabbitmq | |
drwxr-xr-x 7 root root 4096 Jul 31 01:39 runit | |
drwxr-xr-x 8 root root 4096 Jul 31 01:39 selinux | |
drwxr-xr-x 6 root root 4096 Jul 31 01:39 statsd | |
drwxr-xr-x 8 root root 4096 Jul 31 01:39 windows | |
drwxr-xr-x 3 root root 4096 Jul 31 01:39 xfs | |
drwxr-xr-x 8 root root 4096 Jul 31 01:39 yum | |
drwxr-xr-x 4 root root 4096 Jul 31 01:39 yum-epel | |
drwxr-xr-x 4 root root 4096 Jul 31 01:39 yum-erlang_solutions | |
drwxr-xr-x 5 root root 4096 Jul 31 01:39 yum-mysql-community | |
# SSH Copy admin.pem from chef-server to chef-dk for enabling knife interaction between chef-dk and chef-server | |
[root@chef-server ~] scp /etc/chef-server/chef-validator.pem chef-dk:/root/.chef/ | |
[root@chef-server ~] scp /etc/chef-server/admin.pem chef-dk:/root/.chef/ | |
# Configure knife environment | |
[root@chef-dk cookbooks] knife configure | |
WARNING: No knife configuration file found | |
Where should I put the config file? [/root/.chef/knife.rb] | |
Please enter the chef server URL: [https://chef-dk:443] https://chef-server:443 | |
Please enter an existing username or clientname for the API: [root] admin | |
Please enter the validation clientname: [chef-validator] | |
Please enter the location of the validation key: [/etc/chef-server/chef-validator.pem] /root/.chef/chef-validator.pem | |
Please enter the path to a chef repository (or leave blank): | |
# Succefully connected to chef-server | |
[root@chef-dk ~]# knife user list | |
admin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment