while continuing working on the PyPI Testing Infrastructure (PyTI)[0], this week i will work on adding an EC2 interface to pony-build which will enable us to run package test in the EC2 Virtual Machine from the pony-build server.
The idea of using the EC2 machine was in the first place because we wanted to run test in a clean environment to do so Tarek Ziade has proposed to run test in an EC2 machine[1] after we reset the machine like that we have always a clean environment where we run tests .
About how to implement and after the suggestion of my mentor Jesse Noller to use server provisioning here is my ideas until now :
The problem :
- EC2 machines are in the first place down and i have to init them
- i have to follow the pony-build architecture which is client - server (so no master slave, so commanding client from server).
- the EC2 instance are fractured by the hour so when i finish testing i have to put it down again.
Idea:
The questions that give me the answer was :
is it an obligation that the test client (script) must be run in the test platform (EC2 VM) ?
The answer was : no, what should be run in the test platform is the test commands .
So the idea is to run the test client in a machine (in my case and to simplify it's will be the same where i run the server ) , it's will be like a Hub and from their i init the VM and run all commands and then i can put the VM down again.
To do so , i will create first a "Context" in pony-build like the "virtualenvContext" in which i will init and finish my EC2 VM and for running commands i will have to change the _run_commands function to enable it to run commands from a remote machine .
i think it's the easy way to do it the first time, if any one have another idea please let me know .
[0] http://bitbucket.org/mouad/pypi-testing-infrastructure-pyti/
[1] http://tarekziade.wordpress.com/2010/03/21/another-gsoc-idea-a-pypi-testing-infrastructure/