background preloader

Elastic Beanstalk

Facebook Twitter

Architectural Overview. When you launch an AWS Elastic Beanstalk environment, you choose an environment tier, platform, and environment type.

Architectural Overview

The environment tier that you choose determines whether AWS Elastic Beanstalk provisions resources to support a web application that handles HTTP(S) requests or a web application that handles background-processing tasks. An environment tier whose web application processes web requests is known as a web server tier. An environment tier whose web application runs background jobs is known as a worker tier.

This topic describes the components, resources, and architecture for each type of environment tier. Web Server Environment Tiers. Deploying an Express Application to AWS Elastic Beanstalk. This section walks you through deploying a sample application to Elastic Beanstalk using EB CLI and Git, and then updating the application to use the Express framework.

Deploying an Express Application to AWS Elastic Beanstalk

Step 1: Set Up Your Git Repository EB CLI is a command line interface that you can use with Git to deploy applications quickly and more easily. EB is available as part of the Elastic Beanstalk command line tools package. For instructions to install EB CLI, see Installing the EB Command Line Interface (CLI). Continuous Delivery using Shippable and Amazon Elastic Beanstalk (Java+MySQL edition) This recipe will introduce continuous delivery using Shippable and Amazon's Elastic Beanstalk platform-as-a-service.

Continuous Delivery using Shippable and Amazon Elastic Beanstalk (Java+MySQL edition)

While you don't need to be an expert to use this guide, you will need to have: A GitHub account, and working knowledge of git source controlExperience with a java programming environmentExperience with MySQL databasesLocal installations of Java7, Maven and MySQLAccount permissions and keys for deploying to Elastic Beanstalk The following steps will guide you through a basic setup using a Java programming sample and MySQL database. Items in RED need to be customized to your environment. Step 1: Setup Your Local Environment To begin, fork and clone Shippable's java beanstalk sample repository into your local environment.

. $ git clone Setup a local database and grant permissions to a secific user (or use root) in your local MySQL instance: mysql> CREATE DATABASE shippable_test; What Is AWS Elastic Beanstalk and Why Do I Need It? Amazon Web Services (AWS) comprises dozens of services, each of which exposes an area of functionality.

What Is AWS Elastic Beanstalk and Why Do I Need It?

While the variety of services offers flexibility for how you want to manage your AWS infrastructure, it can be challenging to figure out which services to use and how to provision them. With Elastic Beanstalk, you can quickly deploy and manage applications in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. You simply upload your application, and Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk Resources.

AWS SDK for JavaScript in Node.js. Getting Set Up with EB Command Line Interface (CLI) 3.x. Pip is a Python-based tool that offers convenient ways to install, upgrade, and remove Python packages and their dependencies.

Getting Set Up with EB Command Line Interface (CLI) 3.x

Windows, Linux, OS X, or UnixPython 2.7 or laterNoteWe recommend that you use Python 3.4 on Windows.pip First, check to see if you have Python installed with python --version: python --version Python 2.7.3 Linux If you already have python installed, you may need to install the python-dev package in order to get the headers and libraries required to compile extensions and install the EB CLI. Sudo apt-get install python-dev To see if you have pip installed, type pip at the command prompt and press enter pip Usage: pip <command> [options] Commands: install Install packages. uninstall Uninstall packages. ... If your computer doesn't already have pip installed, follow this procedure. Connecting to Your Linux Instance Using SSH - Amazon Elastic Compute Cloud. After you launch your instance, you can connect to it and use it the way that you'd use a computer sitting in front of you.

Connecting to Your Linux Instance Using SSH - Amazon Elastic Compute Cloud

Note After you launch an instance, it can take a few minutes for the instance to be ready so that you can connect to it. Check that your instance has passed its status checks - you can view this information in the Status Checks column on the Instances page. Running a Docker container on AWS Elastic Beanstalk. Dock and the Beanstalk Continuing on the Docker theme I figured I'd try to get a container running on AWS.

Running a Docker container on AWS Elastic Beanstalk

Google App Engine has Docker support in closed "preview" mode, so Amazon beat them to the punch on this one. So here we go... I'm going to run a simple nodejs server in my docker container for this example. Yes, the Beanstalk does let you run nodejs without Docker, but you can never nodejs enough. Setup Dockerfile FROM ubuntu:14.04 RUN apt-get update && apt-get upgrade -y RUN apt-get install -y git git-core wget zip nodejs npm EXPOSE 8080 # startup ADD start.sh /tmp/ RUN chmod +x /tmp/start.sh CMD .

Nothing too exciting here. Start.sh cd /tmp rm -rf docker-node-test; true git clone cd docker-node-test npm install nodejs app.js In the container startup script we're pulling in a little nodejs server from github.