Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy Play 2.1 in amazon ec2 instance

I am new to Play framework as well to amazon ec2. I have a play 2.1 application which i want to deploy on amazon ec2. I have amazon microinstance already set up. Is there any guide or steps available that I can follow ?

like image 353
Jiten Gupta Avatar asked Jun 11 '13 12:06

Jiten Gupta


People also ask

How do I deploy to Amazon EC2?

Create an AWS CDK stack with an Amazon EC2 instance, a security group with inbound access, and an IAM instance profile. Install software packages on the EC2 instance's first launch by creating a user data asset. Configure the software packages after installation using a script downloaded by the user data.

What is the difference between EC2 and Elastic Beanstalk?

EC2 is Amazon's service that allows you to create a server (AWS calls these instances) in the AWS cloud. You pay by the hour and only what you use. You can do whatever you want with this instance as well as launch n number of instances. Elastic Beanstalk is one layer of abstraction away from the EC2 layer.


2 Answers

Use the dist command from the Play console, then copy the zip on your EC2 server, unzip it, and run your app using the start script.

You can also use some other config, take a look at the doc.

And it is also better to put a HTTP frontend.

like image 103
ndeverge Avatar answered Sep 30 '22 21:09

ndeverge


See the links attached to each step that you need to take:

  1. Connect to your ec2 instance

  2. Install Play

  3. Copy your application (add -r option to scp if copying the whole folder)

  4. Run the application

like image 42
twowo Avatar answered Sep 30 '22 20:09

twowo