Commits

theoden committed f93488a

+ StaticSite.install_web_servers and WebApp.install_web_servers introduced.
Due to assumption that Project does not know App internals.

  • Participants
  • Parent commits 97069e8
  • Branches multiple web-servers

Comments (0)

Files changed (2)

fab_deploy/apps.py

         """ Updates frontend config. """
         self.frontend.update_config()
 
+    @task_method
+    def install_web_servers(self):
+        """ Install frontend software. """
+        self.frontend.update_config()
+
 
 class WebApp(StaticSite):
     __metaclass__ = ABCMeta
         super(WebApp, self).update_web_servers()
 
     @task_method
+    def install_web_servers(self):
+        """ Installs frontend and backend software. """
+        self.backend.install()
+        super(WebApp, self).install_web_servers()
+
+    @task_method
     @abstractmethod
     def update_config(self, restart=True):
         """ Updates config of the web application. """

fab_deploy/project.py

     def install_web_servers(self):
         """ Installs servers for all of the project apps. """
         for app in env.conf.APPS:
-            app.frontend.install()
-            app.backend.install()
+            app.install_web_servers()
 
     @task_method
     def install_databases(self):