In this step you may also like to create additional recipes for other configuration tasks, such as installing dependencies
or configuring your HTTP server.

Adding recipes and packages to layer via OpsWorks

Once you’ve committed and pushed your recipes, go to OpsWorks and add the agent recipe to the configure lifecycle event
of your application server layer. Also add ruby2.0 and awscli to the OS packages.

Creating placeholder deployment

Because OpsWorks doesn’t perform certain default configuration tasks (such as creating a www-data group) until
a deployment occurs it’s easiest to create a placeholder OpsWorks deployment with a holding page which will be replaced
by CodeDeploy. You could of course skip this step and manually configure everything via custom recipes.

In this instance we’ll create a new repository for the placeholder which contains nothing but an index.php file containing
a placeholder message.

index.php

1

<h1>Thisserverisundergoingmaintenance,pleasetryreloadingthepage</h1>

Create this deployment in OpsWorks:

Starting an instance

You can now start an instance in OpsWorks. It usually takes at least 20 minutes to boot and execute the setup and configure
recipes. After this has complete your instance should have a status of online:

You should also see the placeholder message when you visit the IP in a browser: