Book Image

Configuration Management with Chef-Solo

By : Naveed ur Rahman
Book Image

Configuration Management with Chef-Solo

By: Naveed ur Rahman

Overview of this book

Table of Contents (13 chapters)

Creating a Hello World recipe


Now, our next task is to create a simple PHP project, and when we access http://localhost:8080, it should display our Hello World page.

To do so, we need PHP5 and Apache2.

Now, we can destroy our old box and start a new one with vagrant up. Alternatively, we can create a new box with Apache2 and PHP.

Use the same Vagrantfile and replace Nginx with Apache2.

Note that Apache2 has the following dependencies. Before we start, we need to clone individual cookbooks into our cookbooks folder.

It's a tedious task to clone the repo one by one. In the next chapter, we will use a software tool to resolve the dependencies.

The Apache2 dependencies are as follows:

  • apt

  • iptables

  • logrotate

  • pacman

Change the Nginx connection to Apache2, remove the old box, and create a new box using the following command:

$ vagrant destroy
$ vagrant up

The recipes will execute, and we have our new Apache2 box installed. Go to http://127.0.0.1:8080, and we will see Apache2' s page.

Our next step...