Information Technology Reference
In-Depth Information
Windows Command Prompt:
> echo 192.168.33.35 node-centos65.vagrantup.com >> \
%WINDIR%\System32\Drivers\Etc\Hosts
Windows PowerShell:
PS> ac -Encoding UTF8 $env:windir\system32\drivers\etc\hosts \
"192.168.33.35 node-centos65.vagrantup.com"
You also need to kitchen login to the node and configure the local host database on the
node to provide it the name of the server when you run chef-client . Once complete, exit
back out to your host prompt. As mentioned before, in production, you'd just make sure the
DNS was configured with these hostnames before installing Chef Server and any nodes:
$ kitchen login node-centos65
Last login: Sat Aug 16 01:50:02 2014 from 192.168.33.1
Welcome to your Packer-built virtual machine.
[vagrant@node-centos65 ~]$ sudo sh -c "echo \
'192.168.33.34 default-centos65.vagrantup.com' >> /etc/hosts"
[vagrant@node-centos65 ~]$ exit
logout
Connection to 127.0.0.1 closed.
NOTE
If you get the error “No instances for regex node-centos65 ,” you forgot to change the
suite name to node. Run kitchen destroy to clear the node instance with the incorrect
name. Then refer to Example 9-5 and make sure the suites stanza resembles the follow-
ing:
suites:
- name: node
Run kitchen create again after making the correction.
Search WWH ::




Custom Search