Configuring the web server
In order for the web server to deploy the web app, we need to add the required roles to the web server, as we did with the database server:
knife node run_list add web00 "role[base_server]" knife node run_list add web00 "role[web_server]"
Now, we can execute chef-client
on the web host (again making sure to use sudo
so that it has permission to do its work):
[jewart]% knife ssh 'name:web00' -x ubuntu 'sudo chef-client'
At this point, our web server will be in the following state:
- The following required packages will be installed:
- Python 2.7 and development libraries
- The PostgreSQL client development libraries
- Git
- The directories our application needs to run are created
- A
virtualenv
tool, which is based on the system Python ...
Get Chef: Powerful Infrastructure Automation now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.