0

Currently I am using elastic beanstack for drupal application and choose the “Web Server” environment it is pre-defined configuration that uses PHP 5.5 with Apache.

I need to deploy the java API Service on same machine with auto-scaling.

Please find below the commands used for start API service:

1) copy the MKR.jar to the specified location. 2) jar -xvfM MKR.jar 3) nohup java -jar MKR.jar &

Nataraj raj
  • 143
  • 1
  • 3
  • 9

2 Answers2

1

You need to write custom SSH commands which ill be executed when the instance in launched.

Elastic beanstalk offers this feature. Read more here http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers.html

serverliving.com
  • 885
  • 7
  • 15
0

1.Create a directory called .ebextensions under the root of your project.

2.Create a file called java.config in that directory and paste the below content.

sources:
  /home/ec2-user: http://URL/MXB.jar

commands:
    01_java_start:
        cwd: /home/ec2-user
        command: nohup java -jar mxb.jar > foo.out 2> foo.err < /dev/null &

Executed the below command :-

[root@]# git add .

[root@]# git commit -m "API-Back"

[root@]#git aws.push

Nataraj raj
  • 143
  • 1
  • 3
  • 9