-
Notifications
You must be signed in to change notification settings - Fork 0
Start the docker instance #5
Comments
Hm... i'm not sure how to implement this... I started writing a fabalicious task which checks supervisord if all services are running to realize that we would need to add it to all the fabalicious tasks involved above -> lame Other options would be exposing the xml-rpc api of supervisord and add the waiting logic to jaMann. Supervisord also has some UI where you could check if all services and supervisord in general are up. The lame thing here that the UI will be up when apache is up and yes then what big miracle all services will be running... |
I think the proper way is to extend the run_script task of fabalicious with a set of custom callbacks. Then you can add a new function to test if ssh is ready easily. then your docker-task-definition might look like this:
wait_for_ssh will trigger a function in fabfile.py which can act accordingly. I am currently working on this topic right now. |
Ok, I think I've finished the task. Custom callbacks are not sufficient, as you want to check for supervisor not on the docker-host but on the real host. This is a major nuisance in fabric, as you'll have to use Anyways: It's now dead simple to add "new commands " to the docker-host-configuration, I added three:
The last one is the most powerful: With this command you can execute tasks on the current host, e.g. execute(backupDB) or something similar. I added a new task, called waitForServices and used your snippet you gave me and get it running. So all you have to do is to add Here's the commit: factorial-io/fabalicious@a49e797 Which raises a new bug/concern: We'll need a possibility to require a specific fabalicious-version for a given fabfile.yaml or part of a docker-configuration. As the docker-host-configuration is now separated by the fabfile.yaml it's easy to require new features in these files, qhichm ay be used with an outdated fabalicious-version. |
I had some spare-time and added support for running the docker-instance from yeoman. I refactored the complete command–running-code and introduced the concepts of slots to run some queries in series, instead of parallel execution. My code is part of the vagrant-feature-branch (I knows, stupid me) Please have a look at the new code. |
Looks good to me! Merge back if you want to! |
The text was updated successfully, but these errors were encountered: