What should I do in order to install third party programs such as imagemagick on Elastic Beanstalk so I can use them from my nodejs web app?
Elastic Beanstalk will read configuration files from the .ebextensions directory in your application source bundle. You can create configuration files there that customize many aspects of the EC2 instances that get created to run your application.
Here is an example config file that would install the latest ImageMagick version on your EC2 instances:
packages:
yum:
ImageMagick: []
See the full AWS documentation here for more ways to customize your environment: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html
Related
I am following the these instructions for enabling HTTPS on the EC2 instance managed by Elastic Beanstalk. I can see that Elastic Beanstalk creates the /etc/pki/tls/certs/server.crt & /etc/pki/tls/certs/server.key files. However, Elastic Beanstalk is not creating the /etc/httpd/conf.d/ssl.conf file. Manually creating the /etc/httpd/conf.d/ssl.conf file, post environment creation, does enable HTTPS though. I am using Apache server.
P.S. I had to change line 3 to mod_ssl : [] (original was mod24_ssl : [])
You are following instruction for EB platform based on Amazon Linux 1 (AL1). However, it seems that you are using platform based on AL2, where proxy (httpd or nginx) are setup differently then on AL1. Specifically, they should be in .plaftorm folder, not .ebextentions. From docs:
Configuration file location – You should place proxy configuration files in the .platform/nginx and .platform/httpd directories on all Amazon Linux 2 platform versions.
Further details how to setup httpd on AL2 platforms are in Configuring Apache HTTPD.
I am using ghostscript on my current server. Now I am moving to an Aws beanstalk server with Application load balancer.
How do I configure start-up script on elastic beanstalk so whenever a new instance is created by the load balancer, ghostscript is automatically installed.
You can control what's installed in ElasticBeanstalk instances with .ebextensions file.
Whenewher Elastic Beanstalk creates a new EC2 instance, it will run all commands from the file in order to provision instance.
Example of .ebextensions file for installing Ghostscript
packages:
yum:
ghostscript: []
This will install a version of ghostscript from yum repository.
If you need a never version of ghostscript - it is also possible to specify installation shell commands inside ebextensions file. For example, these commands will install Ghostscript 9.23
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
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.
I am looking at ways to have a setup for complete development and deployment cycle by using Git to have code versions and then transfer a that code(push) into an AWS elastic Beanstalk instance... I would also like to know of any other methods that includes 'rubber' setup. can you please guide me in this regard.
As of November 1, 2012, Elastic Beanstalk now natively supports Rails and Sinatra apps running Ruby 1.8.7 or 1.9.3. Phusion Passenger is the application server. Git deployment is included, and the EB command line tools have been updated.
Here is the announcement:
Here is a good tutorial