awslabs/eb-custom-platforms-samples

Name: eb-custom-platforms-samples

Owner: Amazon Web Services - Labs

Owner: AWS Samples

Description: Elastic Beanstalk samples for running on custom platforms

Created: 2017-02-20 20:25:47.0

Updated: 2017-12-22 15:26:05.0

Pushed: 2017-03-09 15:57:36.0

Homepage: null

Size: 412

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

eb-custom-platforms-samples

Elastic Beanstalk samples for running on custom platforms.

Pre-requisites

Ensure that you have the latest version of the EB CLI installed before using the samples. Instructions for installing the EB CLI can be found here.

Using the provided samples
  1. To use these samples, clone this git repo.
  2. cd into the directory for the platform to test. For example, the Node platform on Ubuntu is under NodePlatform_Ubuntu.
    odePlatform_Ubuntu
    
    Updating Packer template
    All provided custom platform samples use Packer for creating AMIs.

We have provided Packer templates (custom_platform.json or tomcat_platform.json) along with our sample plaforms.

Creating Custom platforms

Initialize a EB CLI platform workspace by entering the following command and following the prompts.

p init

p create

After the platform has been created successfully, you will see the ARN for the Beanstalk platform in the event stream on your console. Note the platform ARN, you will need it to create your environment below.

Note : You will need an instance profile to create a platform successfully. The CLI will create an instance profile for you named aws-elasticbeanstalk-custom-platform-ec2-role with the correct permissions for the samples to work. To use your own instance profile, ensure that your instance profile has all of the policies included in the Beanstalk Managed role under the name AWSElasticBeanstalkCustomPlatformforEC2Role. You can read more on attaching managed policies to your role here

As your custom platform is creating, you will see logs from the Packer build stream to your console. Any errors when building the platform when running Packer should be relayed back. You can check the logs for any platform build using the logs command below.

 platform logs --help
Creating Beanstalk environment

Once you have succesfully created the platform you can test the platform by creating an Elastic Beanstalk environment in a new workspace using the platform ARN that was provided in the previous step.

 /path/to/new/environment/workspace
 init
 create -p <platform arn>

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.