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,
- Azure is calling the Aegir webhook, and
- Aegir is adding and removing Server nodes in response.
Scale Out
- Verify the number of Server nodes known to the Aegir server matches the number of scale set members indicated in the Azure front end.

- 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):

- Wait a few minutes for the operation to complete.
- Observe that the Azure front-end Instances view updates to indicate that a new scale set instance has been provisioned.

- 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.

- 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.

- Observe that Aegir then added the new scale set instance as an Apache Server, and logged successful processing of the webhook.

- Observe that the new Server now appears in Aegir’s list of Servers.
- 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.

Scale In
- 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):

- Wait a few minutes for the operation to complete.
- Observe that the Azure front-end Instances view updates to indicate that a scale set instance has been removed.

- 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.

- 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.

- 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.
