Where are the node.js app files installed in an AWS elastic beanstalk instance? - amazon-web-services

In an AWS elasticbeanstalk instance, where are the node.js app files deployed to? I wanted to ssh to the machine and debug some issues and wanted to check that the files were deployed correctly. I checked /var/ but didn't see an app directory there.

It's in the /tmp/deployment/application folder during deployment and then it is moved to /var/app/current.
The node logs are in /var/log/nodejs/nodejs.log

Related

In which directory aws beanstalk host the application

hello friends,
I'm new to aws and linux environment,I've deployed a springboot application on beanstalk,now I want to know,In which directory my application reside or In which directory I can find
through putty. thanks alot.

How to automatically deploy asp.net core application to ec2 instance using jenkins?

I have hosted an ASP.NET Core web application on an EC2 instance using Nginx. The EC2 isntance is running on Ubuntu Server 16.04 LTS machine.
I am developing the code in windows machine and publishing the code. Then copying the files into the EC2 instance using WinSCP. The web application is running nicely and i can hit the application using postman or browser.
Now, i have decided to use jenkins for CI/CD. I have installed jenkins in the same ec2 server where my web application running. Jenkins is running in port 8080 and my web application is running in port 80. I have configured jenkins with my bitbucket repository by following this link.
Now, my jenkins server is up and running. If i commit anything in the bitbucket repository, jenkins server automatically triggers a build.
Previously, i have published the code using below command:
dotnet publish -o my-sample-site
And then copied the files from my-sample-site directory to the directory in EC2 instance. Now, i want to automatically build the asp.net core web source codes and publish the codes to the folder where my web application is running. I may have to restart the service also after changing the codes.
What should i include in the jenkins build step so that whenever bitbucket repository changes triggers build in jenkins, it will build the asp.net core source codes and then publish the codes in the directory of the EC2 instance where my web application is running.
How should i do this automatically? Any reference please. Thanks in advance.
I have set up CI/CD server using Jenkins connected to a Bitbucket repository for an ASP.NET Core Web API running in an EC2 instance. Anyone can check my article here.

How can automatic deploy yii2 app when Elastic Beanstalk instance is terminated and created a new instance

Currently I have setup my yii2 website on AWS Elastic beanstalk. I followed following steps :
Created Elastic Beanstalk app and environment : Platform PHP 7.0, RDS database
Created SSH connection from EC2 instance of elastic beanstalk using putty with .pem file
In Apache folder I have cloned my yii2 git repo using (sudo git clone repo_url) command
Installed composer using this link https://gist.github.com/asugai/6694502
Run command : (sudo composer install) in my repo folder
Edited common/config/main-local.php and made db connection
And run migration using (sudo php yii migrate)
Setup a domain for this elastic beanstalk app
Now I don't know how should I proceed further and I am facing following problems :
Elastic Balance loader is creating new instance and terminating current one when it fails or health goes in severe.
Due this, my all data in that instance is lost. To make it work I am doing all steps again and again manually.
How can I make my domain https (SSL certified)
How can make easy process to pull new changes from git
I already have a working site in nodeJS. which is using elastic beanstalk, elastic balance loader, RDS(postgres), S3 bucket, cloudfront for Route 53, SSL certificate (https), code pipeline, code commit. And AWSCLI at local to deploy nodeJS app.
my question is about I want to use same flow for yii2 advance app.
Can anyone please help me here?
Thanks in advance :)

Access deployed file on AWS elastic beanstalk

I have deployed my app using aws elastic beanstalk and want to access those file on the instance. Is there anyway to do that ? I am able to login to my instance.
I used find command to trace the file location but could not find it.
If yes, what is the path where all deployed class files will be present ?

Deploy multiple applications to a single EC2 instance using AWS Elastic Beanstalk

I am have deployed a .Net website to AWS Elastic Beanstalk. I want to now deploy another .Net web project (a web service) to the same EC2 instance that was created by AWS Elastic Beanstalk, but the selection to "use and existing environment" in the Environment page of the publishing wizard is greyed out.
Is there a way to do this?
Update: This is now possible https://aws.amazon.com/about-aws/whats-new/2016/08/aws-elastic-beanstalk-supports-asp-net-core-and-multi-app-net-support/
No. .Net deployment has some limitations on EB compared to the other frameworks. You cannot deploy multiple applications on the same instance.
You can use Multicontainer docker environment to deploy multiple applications http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_ecs.html
You cannot deploy a "Web Site" and a "Web Application" on the same instance (or set of instances, such as that formed by ElasticBeastalk) because they run different resources and policies. This is accordingly to the tutorial i came across on their site.
Maybe this package can help you running multiple apps/websites on a single Elastic Beanstalk instance (Apache): https://github.com/tscheiki/ElasticDeploy
You can also do a multiple-app deployment using the Visual Studio AWS Toolkit:
docs.aws.com/toolkit-for-visual-studio
This is how to do it for Tomcat environments - https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/java-tomcat-multiple-war-files.html.
To create an application source bundle that contains multiple WAR files, organize the WAR files using the following structure.
MyApplication.zip
├── .ebextensions
├── .platform
├── foo.war
├── bar.war
└── ROOT.war
When you deploy a source bundle containing multiple WAR files to an AWS Elastic Beanstalk environment, each application is accessible from a different path off of the root domain name. The preceding example includes three applications: foo, bar, and ROOT. ROOT.war is a special file name that tells Elastic Beanstalk to run that application at the root domain, so that the three applications are available at http://MyApplication.elasticbeanstalk.com/foo, http://MyApplication.elasticbeanstalk.com/bar, and http://MyApplication.elasticbeanstalk.com.