Information Technology Reference
In-Depth Information
porary host entry for default-centos65.vagrantup.com in your local host database in lieu
of making a DNS change, as we are just doing a book exercise.
Run one of the following commands to add a host entry. Following are the commands we ran
on our machine. If you used an IP address other than 192.168.33.36 , make sure it matches
when you run the command.
Linux/Mac OS X:
$ sudo sh -c "echo '192.168.33.36 default-centos65.vagrantup.com' >> /etc/hosts"
Windows Command Prompt:
> echo 192.168.33.36 default-centos65.vagrantup.com >> \
%WINDIR%\System32\Drivers\Etc\Hosts
Windows PowerShell:
PS> ac -Encoding UTF8 $env:windir\system32\drivers\etc\hosts \
"192.168.33.36 default-centos65.vagrantup.com"
Now if you try to visit https://default-centos65.vagrantup.com in your web browser, your
local host should think this is a valid hostname.
You can add additional values to the knife.rb , such as EC2 credentials, proxy information,
and encrypted data bag settings. Although certain pieces of the knife.rb will be common
among your team members, the contents of the file generally should be unique to you and
your machine. However, unless you have access keys and passwords in your knife.rb , you do
not need to treat it like a password.
Testing the Connection
You should run the following commands from inside the Chef repo. Open your terminal or
command prompt and make chef-repo the current working directory. If you placed your Chef
repo in a different location, use that instead:
$ cd ~/chef-repo
Search WWH ::




Custom Search