ConPaaS-team / conpaas

ConPaaS: integrated runtime environment for elastic cloud applications
http://www.conpaas.eu
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link

Remove the startup scripts from the service initialization. #98

Closed gtato closed 8 years ago

gtato commented 8 years ago

Starting a new service should not (significantly) change the state of the application VM. This means that arbitrary initialization scripts are not allowed anymore on the manager side. For the PHP service, memcached should be moved from the manager to the agents. For the services which use git, we need to make sure that the git hook scripts are installed somehow.

tcrivat commented 8 years ago

The startup scripts executed during service initialization were needed for three purposes: (1) starting memcached, which was used by the php and java services, (2) installing the git hook script needed in order to upload code using git for php, java and generic services and (3) starting Scalaris on the PHP manager in order to hold the session data.

I removed these initialization scripts in the following ways: (1) I just replaced memcached with variables in the manager process in commit afc763aec40a232937e8da8e1ecb5077b4c14948 (2) Only one git hook script is installed when starting the application manager. When code gets pushed using git, the application manager will decide what to do with it and call itself the relevant methods on the service managers. Implemented in commit 38c94e084a98f1a3f12da5489d1fca535ef948ff (3) Scalaris is now running on the agents which run the PHP backends, in a distributed manner (each PHP backend has its own instance of Scalaris, with data synchronized between all the instances). Commit bf14f54fe104b339f83253ce307f5a81e4a4ed3e

So this is now completed.