jeudi 29 mai 2014

des services web d'Amazon - déploiement d'une guerre à Elastic Beanstalk avec palette - Stack Overflow


I've got a Java servlet packaged in a war, and need to deploy it to Elastic Beanstalk. I can roll my own deployment script using Amazonica, but I'd rather leverage Pallet for this.


A Google search for "pallet elastic beanstalk" is not turning up anything useful, other than a "How to deploy a clojure web application to Amazon EC2" question on Stack Overflow. The answer looks quite promising, but it doesn't cover setting environment properties, and I'm not sure whether that group spec would create an Elastic Beanstalk environment or a regular EC2 one with Tomcat.


Has anyone done this? Is there a nice blog post or recipe for it?


Just to be clear, the war itself is not a Clojure app, it is just a war built with Maven from a Java project somewhere.




Since this is not an action that happens to an instance, for instance it does not change a member of a pallet group, I would recommend using clj-action to upload it using amazonica at the appropriate place in the phase.


I'm assuming that some instance (or group) you are deploying with pallet needs this web service to be in place so it can be configured to connect to it. In cases like this it would make sense to define a phase which uploads the war file and saves its configuration into the session. Then later phases on any instance in the deployment can see where the web service is available.


If it's only needed by one instance/group then it's fine to simply call amazonica (through clj-action) in the middle of the configure phase and then configure that instance to use the web service in the same plan-fn.



I've got a Java servlet packaged in a war, and need to deploy it to Elastic Beanstalk. I can roll my own deployment script using Amazonica, but I'd rather leverage Pallet for this.


A Google search for "pallet elastic beanstalk" is not turning up anything useful, other than a "How to deploy a clojure web application to Amazon EC2" question on Stack Overflow. The answer looks quite promising, but it doesn't cover setting environment properties, and I'm not sure whether that group spec would create an Elastic Beanstalk environment or a regular EC2 one with Tomcat.


Has anyone done this? Is there a nice blog post or recipe for it?


Just to be clear, the war itself is not a Clojure app, it is just a war built with Maven from a Java project somewhere.



Since this is not an action that happens to an instance, for instance it does not change a member of a pallet group, I would recommend using clj-action to upload it using amazonica at the appropriate place in the phase.


I'm assuming that some instance (or group) you are deploying with pallet needs this web service to be in place so it can be configured to connect to it. In cases like this it would make sense to define a phase which uploads the war file and saves its configuration into the session. Then later phases on any instance in the deployment can see where the web service is available.


If it's only needed by one instance/group then it's fine to simply call amazonica (through clj-action) in the middle of the configure phase and then configure that instance to use the web service in the same plan-fn.


0 commentaires:

Enregistrer un commentaire