Deploy Wordpress with AWX

Setup

To use this lab walkthrough of deploying Wordpress using AWX with Abiquo XaaS, you will need access to an AWX system with a WordPress template, a VM template running Linux with cloud-init support, and a vCenter hypervisor connected to an external lab network with accessible IPs.

Find and reserve IPs

  1. In the main menu go to the Infrastructure tab, select the Private tab then select your datacenter. Go to the Network tab and the External sub-tab and choose your network.

  2. In the External IPs pane find some IPs that are not currently in use, if necessary they can be selected and reserved or quarantined to avoid them being used elsewhere. For more details see Manage external networks | How to put an IP on a deny list

Create the rack, the physical machine and the allocation rule

  1. In the main menu go to the Infrastructure tab, then select the Private tab. Choose your datacenter, then select the Servers tab.

  2. Click the + add button on the Servers pane (“create physical machine or rack”), select Rack then name your rack.

     

  3. Select your rack and click the + add button, this time selecting Create physical machine. Complete the dialog then select your hypervisor system.



  4. Click the edit button next to the selected IP, and go to the Datastores tab. Select your datastore(s) and uncheck the Retrieve existing VMs box. Click Accept. 

     

  5. Go to the Allocation rules tab then click the + add button on the Datacenter pane to add a new rule. 

  6. Complete the rule dialog, allowing oversubscription as appropriate to your environment. In a production system, you should never overallocate CPUs or RAM.

Create the hardware profile

  1. Go to the Hardware profiles tab then click the + add button underneath the list of types and select Type. Complete the dialog.

     

  2. Click the + add button on the Hardware profiles pane. Complete the dialog.

Configure your enterprise

  1. In the main menu go to the Users tab. Select your enterprise and click the pencil edit button at the bottom of the Enterprises list.

  2. In the General section, add the name and default scope of the enterprise.

     

  3. Go to Datacenters, select the Allowed datacenter then click the pencil edit button below.

     

  4. Go to Hardware profiles, check the Enable hardware profiles checkbox and select your hardware profile.

Create the network

  1. In the main menu go to Infrastructure → Private. Select your datacenter, go to Network. Select External from the sub-menu.

  2. Click the + add button below the list of networks.
    Complete the dialog with the details of an accessible external network.

  3. If necessary, add IPs. Click the + add button below the list of IPs and create 5 or 6 IP addresses in the network starting from the first available address.

Remove the remote service DHCP

  1. In the main menu go to the Infrastructure tab, then select the Remote services tab. Select the DHCPv6 remote service, mark the protocol checkbox then click the pencil edit button below.

     

  2. In the Locations tab delete the DHCPv6 service for the datacenter by clicking on the trash bin icon and then clicking Save.

     

  3. Next, mark the protocol checkbox again and delete the remote service by clicking on the trash bin icon and confirming.

     

  4. Repeat the process for the DHCP remote services.

Configure the template

  1. In the main menu go to the Catalogue tab, select the datacenter, select the virtual machine template then choose edit from the template’s menu.

     

  2. Choose the Disks tab then click the pencil edit button on the Disks pane.

     

  3. Select the Allocation typeThin”.

     

  4. In the Advanced tab, complete the dialog.

Add the virtual datacenters

  1. In the main menu go to the myCloud tab and click the + add button below the list of virtual datacenters. Complete the dialog.

     

  2. Repeat the process to create more virtual datacenters as required.

  3. Select your (first) virtual datacenter. Choose the Network tab then the External sub-tab. Choose the external network you created earlier then click the pencil edit button.

     

  4. Check the Default network checkbox.

     

  5. Repeat the process for any other virtual datacenters you created.


The setup is now finished, and the Abiquo is ready to deploy VMs with accessible IPs. Next we will configure the service.

Configure the service

Add the AWXRepoService

  1. In the main menu go to the Catalogue tab, select Services, click the + add button then choose AWXRepoService.

     

  2. Go to the Can be used by tab, click the + add button and select the entity “Enterprise”. Repeat to add the entity “Virtual datacenter”.

     

  3. Go to the Properties tab and complete the dialog. In this demo system, we will only be using one AWX configuration, so we can add the AWX endpoint and credentials to the default service. Also add your Abiquo endpoint and credentials. 

Configure and launch the AWXRepoService

  1. To configure the AWXRepoService at enterprise level, in the main menu go to the Users tab, select your enterprise, go to the Service configurations tab, click the + add button in the Service configurations pane then choose AWXRepoService.


    Note that you can also configure Service with an AWX system at the datacenter level, in which case the Enterprise Admin can enable it for a location and the end users can work with it in the virtual datacenter. 

  2. In the Create service configuration popup, go to Properties, add the credentials and click save.

     

  3. Back in the Service configuration pane, select AWXRepoService, then choose List workflows from the menu that appears alongside it to import the workflow.

     

  4. A popup window will appear asking “Do you want to perform action List workflows?”. Click accept.

  5. In the subsequent popup, select the required subservice.

     

  6. An Edit service configuration popup will appear, click Save. 

     

  7. Back in the Service configuration pane, select the workflow you have imported, then choose Launch from the menu that appears alongside it to launch the workflow.  

     

  8. In the Launch popup, select the virtual datacenter. Note that you can click the magnifying glass icon to display the details of the virtual datacenter. Click Accept to launch the job.

     

Abiquo obtains the parameters from the AWX workflow. Your Systems Administrator can create an appropriate configuration for your environment, so it could differ from the configuration shown here.

Tracking the job

We can see in Ansible (Views → Jobs → Select Job → Output) that a job has been generated. The job takes a little while to process.

The job’s tracking can be seen by clicking on the loading icon. The system will notify of any failures.



When the job is finished, in AWX, the boxes for each step in Ansible will turn green.


To display the WordPress endpoint, click on the box for the last step (“wordpress deployment”). Note that the Variables are the input and the Artifact (wordpress_endpoint) is the output.

We should now be able to display the artifact in the Abiquo. Click on the green check mark next to the workflow. (if it doesn’t appear, click the round refresh arrow in the top right corner of the screen, and if necessary, wait a few minutes).

In the Results dialog, the platform displays the IP address of your new WordPress instance. 


You can also access the VMs on the myCloud tab in the Virtual appliances pane.

To display the VMs, click Open.

To open your new WordPress site, go to the IP address output by the service in the artifact.

Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved