Run Azure tests

Once you have an Aegir test server provisioned and configured, configured it with your Azure credentials, and have configured the Azure environment to send webhooks to it, you are ready to test.

The following steps will demonstrate that, when the configured scaleset scales in or scales out,

  1. Azure is calling the Aegir webhook, and
  2. Aegir is adding and removing Server nodes in response.

Scale Out

  1. Verify the number of Server nodes known to the Aegir server matches the number of scale set members indicated in the Azure front end. One server
  2. On the Azure front-end, trigger a “scale out” operation by increasing the default capacity of the scale set (for example, by changing it from 1 to 2 in the text box indicated in red here): Azure portal scale set
  3. Wait a few minutes for the operation to complete.
  4. Observe that the Azure front-end Instances view updates to indicate that a new scale set instance has been provisioned. Azure portal provisioning succeeded
  5. On the Aegir front-end, navigate to the recent log messages by clicking Reports in the menu at the top of the screen, and selecting Recent Log Messages. Aegir reports
  6. Observe that a scale out webhook was received by Aegir, that it then waited for the new scale set instance to be provisioned and for SSH to be available. Aegir webhook triggered Aegir payload received Aegir manual-testing completed Aegir discovered IP Aegir waiting for SSH Aegir adding Apache service
  7. Observe that Aegir then added the new scale set instance as an Apache Server, and logged successful processing of the webhook. Aegir webhook succeeded
  8. Observe that the new Server now appears in Aegir’s list of Servers.
  9. Observe, on the same page, that Aegir completes a “Verify” for the new Server IP address, and the scaleset cluster as a whole, indicating that it has:
    • confirmed it can SSh to the new scale set instance, and
    • confirmed permissions are correct on the platform (web site) and config directories there. Aegir new Server

Scale In

  1. On the Azure front-end, trigger a “scale in” operation by decreasing the default capacity of the scale set (for example, from 2 to 1, in the text box indicated here): Azure portal scale set
  2. Wait a few minutes for the operation to complete.
  3. Observe that the Azure front-end Instances view updates to indicate that a scale set instance has been removed. Azure portal scale set instance removed
  4. On the Aegir front-end, navigate to the recent log messages by clicking Reports in the menu at the top of the screen, and selecting Recent Log Messages. Aegir reports
  5. Observe that:
    • a scale in webhook was received by Aegir,
    • that it then waited for the scale set operation to complete,
    • that it then determined which VM had been removed by discovering which IP address was now missing,
    • and that it then indicated the webhook processing had succeeded. Aegir scale in plugin triggered Aegir scale in payload received Aegir scale in waiting Aegir scale in operation completed Aegir scale in discovered missing IP Aegir scale in operation completed
  6. Observe that the Server that was removed no longer appears in Aegir’s list of Servers, and that Aegir has completed a Delete task on the IP address in question. Aegir scale in Servers