Deploying WordPress on CentOS, Part 2, Let’s Inject Some Automation

  1. Make a Custom Instance Type
    Now that we have the Option Types, Scripts, and File Templates created, we can tie them all together with a custom Instance Type. We will reference the Option types as variables (Field Name) to inject into several of our scripts. Add a new Instance Type under Provisioning > Library > Instance Types.
  1. Add Layouts to Instance Type
    Below I will be adding a Layout for a single WordPress server on both AWS and VMware to give my users options. Steps are similar for any cloud you would like to provide as a backend. Keep in mind, sometimes different clouds will require different scripts or tasks to execute. At the Layout stage, we can attach a Workflow, which contains several tasks/scripts that execute at different phases or we can attach individual scripts at the node (virtual image) level.
Note the Environmental Variable being set. In the wp-config.php file we are calling out an IP address for database access. This will generalize the form when we look at multi-tiered deployments in part 3.
  1. Add Nodes to Layouts
    Finally, add the Node Type to the layout. Essentially this links the Layout to the Virtual Images it will consume, and we can again associate individual scripts (as opposed to Workflows on the Layout stage) that execute against the instances. If you are looking to execute the Let’s Encrypt SSL integration, add the corresponding Script and File Template as step 3. Be sure to add a node to each of your cloud’s layouts.

That sets up our custom Instance Type. This can be consumed as an individual Instance deploy or as a multi-tiered application under Blueprints. Let’s check out what a single instance deploy would look like.

Pages: 1 2 3 4
You Might Also Like
1 Comment
Leave a Reply