Best way to deploy Play app on cloud virtual private server ?

1,542 views
Skip to first unread message

Xavier NOPRE

unread,
Jun 5, 2012, 4:25:02 PM6/5/12
to play-framework
Hi all,

I'm developping a Play app, and I have to install and deploy it (frequently) on a cloud virtual private server.

What's is the best way ? Copying all Play directory by SSH ? Other best solutions ?

Thanks,

Xavier

Ben McCann

unread,
Jun 5, 2012, 5:07:40 PM6/5/12
to play-fr...@googlegroups.com
I use play sbtgoodies to run dist-unzip.  Then I use fabric to rsync to the remote server and run supervisorctl restart.  This works really well for a small number of servers.  Now that I'm approaching having a very large number of servers I'm starting to investigate CloudFoundry.

Xavier NOPRE

unread,
Jun 5, 2012, 5:15:31 PM6/5/12
to play-fr...@googlegroups.com
Hi Ben,

Thanks for your answer and for the informations and links.

In my case, I have only one server !

I will take a look at this tools ...

Thanks,

Xavier



2012/6/5 Ben McCann <benjamin...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/QPyHTXbXWzwJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Justin Holmes

unread,
Jun 5, 2012, 5:31:44 PM6/5/12
to play-fr...@googlegroups.com

I tap into Git Hooks and have a remote script which unzips the dist kills the existing service and then redeploys


Mike | Vannik Software

unread,
Jun 5, 2012, 7:57:25 PM6/5/12
to play-fr...@googlegroups.com
Hi Xavier,

Not sure which Play version you use, but for 1.2.x, we have continues deployment in place. It works something like this:

1) Write code and commit to GIT / SVN / whatever you use
2) The continuous integration server (Jenkins in our case) picks up the changes
3) CI server compiles the app and runs all tests
4) If all tests pass, the Play server is stopped, the new app deployed and the server started again

That's a 50,000 feet overview, but should give you enough details to show what we use. Please let me know if you (or anybody else) is interested in more details.

Cheers,

Mike

On Tuesday, June 5, 2012 1:25:02 PM UTC-7, Xavier wrote:

Xavier NOPRE

unread,
Jun 6, 2012, 2:53:06 AM6/6/12
to play-fr...@googlegroups.com
Hi Mike,

Thank you for this informations.

For CI, it's OK for me. 

I'm interested on the step 4 : how do you deploy Play application ? Perhaps I will have Jenkins on the same computer, but the interesting case is anyway when the Play server is another one.

Thanks,

Xavier


2012/6/6 Mike | Vannik Software <vanniks...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/nRTZ9vG5ifsJ.

Aishwarya Singhal

unread,
Jun 6, 2012, 3:15:53 AM6/6/12
to play-framework
hi Xavier

with only one server, I typically write my own short shell script.
But, if you are a bit familiar with Ruby, I would highly recommend
using Capistrano.

Best regards
Aishwarya

On Jun 6, 2:15 am, Xavier NOPRE <xno...@gmail.com> wrote:
> Hi Ben,
>
> Thanks for your answer and for the informations and links.
>
> In my case, I have only one server !
>
> I will take a look at this tools ...
>
> Thanks,
>
> Xavier
>
> 2012/6/5 Ben McCann <benjamin.j.mcc...@gmail.com>
>
>
>
>
>
>
>
> > I use play sbtgoodies<https://github.com/typesafehub/play-plugins/tree/master/sbtgoodies> to
> > run dist-unzip.  Then I use fabric<http://docs.fabfile.org/en/1.4.2/index.html>to rsync to the remote server and run supervisorctl
> > restart <http://supervisord.org/>.  This works really well for a small
> > number of servers.  Now that I'm approaching having a very large number of
> > servers I'm starting to investigate CloudFoundry<http://cloudfoundry.org/>
> > .

Mariot Chauvin

unread,
Jun 6, 2012, 5:21:13 AM6/6/12
to play-fr...@googlegroups.com
Hi all,

I have a python script to do continuous deployment of play2 application from jenkins (last green/blue builds is automatically deployed), I need to clean it a bit before, but I will put it on github.
The script should be quite easy to adapt to use with a supervisor.

Cheers,

Mariot

2012/6/6 Aishwarya Singhal <asing...@gmail.com>

Xavier NOPRE

unread,
Jun 6, 2012, 6:06:33 AM6/6/12
to play-fr...@googlegroups.com
Hi Mario,

Great ! I'm interested to take a look, and see if I can adapt and use it ... :-)

Xavier



2012/6/6 Mariot Chauvin <m...@zenexity.com>

Mike | Vannik Software

unread,
Jun 6, 2012, 12:36:37 PM6/6/12
to play-fr...@googlegroups.com
Hi Xavier,

We've got Jenkins installed on our production servers and build, test and deploy right there. We first configured one virtual server, created an image and now deploy new servers by using this server image. At this point in time, we only have a small number of servers and that works fine.

Like Ben McCann, I've also just started to look into CloudFoundry and see if that's an alternative approach we should take.

HTH

To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.

Mariot Chauvin

unread,
Jun 7, 2012, 7:00:48 AM6/7/12
to play-fr...@googlegroups.com
Script is now available: 

https://github.com/mchv/play2-jenkins-deployment

Cheers,

Mariot

To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/UUBGbGTzMsoJ.

To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.

Xavier NOPRE

unread,
Jun 11, 2012, 3:20:01 AM6/11/12
to play-fr...@googlegroups.com
Hi everybody,

I have implemented a solution for my need. I have written a post on my blog, sorry it's in French, but with console commands and files contents, I think it's understandable ... ;-)


In 2 words :
- "play dist" to build the ZIP to deploy
- Unison to do differential copy
- Bach script on the server to restart the application, script launched by SSH from my post

Thanks to all for each help !

Xavier

Shishir Lamichhane

unread,
May 3, 2013, 5:18:11 AM5/3/13
to play-fr...@googlegroups.com

Hi I need more details on the following steps :


2) The continuous integration server (Jenkins in our case) picks up the changes
3) CI server compiles the app and runs all tests
4) If all tests pass, the Play server is stopped, the new app deployed and the server started again

Any help will be appreciated.
Thanks,
Reply all
Reply to author
Forward
0 new messages