Amazon Elastick Beanstalk

Central point of doc http://aws.amazon.com/documentation/elasticbeanstalk/
the 2 most important section are:

Useful resource

Developer Guide

Automatize all the process to create an infrastructure of production, balancer, database, instance, name ecc.

Have all the infrastructure configured with less clicks is very useful and give the possibilities to use all the advanced characteristic of this kind of architecture.
Like:

  • Deploying Versions with Zero Downtime: to avoid the downtime of an upgrade, the guide suggest to create the new application at side of the old and change the balancer point from the old to new. After delete the old.
  • continue from Monitoring Application Health

Troubleshooting

ssh port open

the elastic beanstalk security group applied by default leave always a 22 port open to the world 0.0.0.0/0

Using ebextensions (see http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers.html) you can customize your environment. In the option_settings (see http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#customize-containers-format-options) you can specify the SSHSourceRestriction option in the aws:autoscaling:launchconfiguration namespace and restrict access to your instances, see http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html

hibernate

If is possible hibernate the beanstalk instead to terminate every time the environments, because the creation process at the moment is it a bit complex and for us is inconvenient create and destroy every day the environments. We want switch off during the night and on the morning.

Two options:
- Use a CloudFormation template to create/destroy the Elastic Beanstalk environment, for example: https://s3.amazonaws.com/cloudformation-templates-us-east-1/ElasticBeanstalk_Python_Sample.template or find more samples here http://aws.amazon.com/cloudformation/aws-cloudformation-templates/. I would suggest this option if they can wait for the environment to be created every day and if they need to make changes to the environment.
- Scale in the environment to a minimum, e.g. Only 1 instance running at night. Using the the new t2 instance family the cost will be extremely low (assuming this is a dev/test environment) and they will not have to recreate the environment every day but only to scale out (much quicker).

logs

Manage better the logs in beanstalk: moving them in s3 , have a system that send us an email if there is an error in the log and have a tool to do search on that.

Beanstalk is integrated with SNS: you can specify an email address and receive important notification about your environment - e.g. An app deploy failed. Upon receiving the email they can go in the logs and see the cause.
If they would need a more complex solution they would probably need to build one of their own – e.g. Logstash + ElasticSearch – or use an existing solution – e.g. Splunk (AWS Partner).

Salvo diversa indicazione, il contenuto di questa pagina è sotto licenza Creative Commons Attribution-ShareAlike 3.0 License