Updating the latest packages and git
$ sudo yum -y update git
$ curl -L https://www.opscode.com/chef/install.sh | sudo bash
$ sudo /opt/chef/embedded/bin/gem install knife-solo --no-ri --no-rdoc
$ knife -v
Chef: 11.14.2
$ ll `which knife`
lrwxrwxrwx 1 root root 19 Aug 5 04:32 /usr/bin/knife -> /opt/chef/bin/knife
$ knife configure \
-y \
--defaults \
-r /home/ec2-user/chef-repo
WARNING: No knife configuration file found
*****
You must place your client key in:
/home/ec2-user/.chef/ec2-user.pem
Before running commands with Knife!
*****
You must place your validation key in:
/etc/chef-server/chef-validator.pem
Before generating instance data with Knife!
*****
Initializing repository
$ knife solo init chef-repo
Creating kitchen...
Creating knife.rb in kitchen...
Creating cupboards...
$ yum -y remove `rpm -q chef`
$ knife cookbook create hello -o site-cookbooks
site-cookbooks/recipe/hello/default.rb
log "Hello, Chef!"
This is just to confirm that knife solo runs at localhost.
node/localhost.json
{
"run_list" : [
"recipe[hello]"
]
}
$ knife solo cook localhost
Running Chef on localhost...
Checking Chef version...
Uploading the kitchen...
Generating solo config...
Running Chef...
[2014-08-08T06:21:43+00:00] WARN:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SSL validation of HTTPS requests is disabled. HTTPS connections are still
encrypted, but chef is not able to detect forged replies or man in the middle
attacks.
To fix this issue add an entry like this to your configuration file:
```
# Verify all HTTPS connections (recommended)
ssl_verify_mode :verify_peer
# OR, Verify only connections to chef-server
verify_api_cert true
```
To check your SSL configuration, or troubleshoot errors, you can use the
`knife ssl check` command like so:
```
knife ssl check -c /home/ec2-user/chef-solo/solo.rb
```
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Starting Chef Client, version 11.14.2
Compiling Cookbooks...
Converging 1 resources
Recipe: hello::default
* log[Hello, Chef!] action write
Running handlers:
Running handlers complete
Chef Client finished, 1/1 resources updated in 1.430750102 seconds
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SSL validation of HTTPS requests is disabled. HTTPS connections are still
encrypted, but chef is not able to detect forged replies or man in the middle
attacks.
To fix this issue add an entry like this to your configuration file:
```
# Verify all HTTPS connections (recommended)
ssl_verify_mode :verify_peer
# OR, Verify only connections to chef-server
verify_api_cert true
```
To check your SSL configuration, or troubleshoot errors, you can use the
`knife ssl check` command like so:
```
knife ssl check -c /home/ec2-user/chef-solo/solo.rb
```
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
~/chef-repo/.chef/knife.rb
ssl_verify_mode :verify_peer
Realy Good article……I have no word to say.
ReplyDeleteyou know what I never read this kind of long article before these days ! ! You are amazing
A medium size pocket knife is easy to carry and provides the benefits of a versatile larger knife blade. Best knife
ReplyDeleteFor instance, a "Bowie Knife" has been around for some, numerous years and is outstanding by its name and general qualities. Jim Bowie of Alamo distinction is credited with the making of this blade, albeit a few history specialists trust it might have really been outlined by his sibling, Rezin. best knife to cut raw chicken
ReplyDeleteThanks for sharing this post. This knife is perfect for kitchen & restaurant which is flexible and easy to use.
ReplyDelete