UCL-CloudLabs / deployer

VM Deployer for Azure
1 stars 1 forks source link

How to test webapp deployment works? #4

Closed raquelalegre closed 7 years ago

raquelalegre commented 7 years ago

We shouldn't deploy dummy webapps for every push or on a nightly basis because that'll incur into costs. I need to investigate how much would it be if something is deployed and destroyed right away. Some of my test resource groups in the billing details appear as 0.00 costs.

raquelalegre commented 7 years ago

I have had some resource groups exist for less than one hour with a data transfer consumption of a few MBs, and costs seem to only go up to £0.01. So I'm going to try e2e tests involving the creation of a resource group and deployment of a host keeping an eye on costs.

raquelalegre commented 7 years ago

I have now testing in place (see #12) with py.test.

It creates a deployer object with a host object which contains some randomly generated information (username, password, url prefix, etc.) and with all the secrets and SSH keys encrypted and set up so Travis can use them. Then it deploys it using the Terraform file with the host object details, and uses Python's request library to send an HTTP GET request and check the response is OK.

I'll keep an eye to check how much this costs, but I've seen some of the resource groups I've created marked as £0.00, so I guess it's OK!