Download presentation
Presentation is loading. Please wait.
Published byElisabeth Nicholson Modified over 6 years ago
1
Bootstrapping your Company on Elastic Beanstalk
Or, “Why I decided early in my career not to go into systems administration” I don’t really like powerpoints but they are expected so – I can tell you in advance that ALMOST NOTHING you see in this powerpoint is of any value whatsoever. However, I promise to use every cheesy transition in the box. (:01)
2
The Resume Slide I hate talks that start with long bio’s on the speaker ‘cuz really why should you care about my resume? Unless you wanna hire me, in which case lets talk after I’ll give you my resume. Only 2 things you really need to know about me (other than that I’ve never killed a man in Reno just to watch him die) Zappos.com AllpointPen.com The first is a classical circa-2000 web company. We serve thousands of requests per minute off of iron we own and host in a datacenter right here in Las Vegas The second is my startup, and I run it on AWS. And at peak, the second serves about 1/10th the traffic of Zappos, but it does it for less than $500 a month (hint: Zappos costs more than $5000/month to operate) (:04)
3
The Survey Slide How many people have an AWS account right now?
How many are running production code on it now? (By which I mean it takes live customer traffic, either internal or external customers – but not just you hitting your personal toy website) (I don’t hate toys I have a lot of them, but I promise its relevant) Do you know these terms: EC2? S3? ELB (tricky! You might think elasticbeanstalk but it means elastic load balancer)? RDS? How many people feel like the pretty much understand the point of elastic beanstalk already? (:06)
4
Why you might (should?) use Elastic Beanstalk
You only have 24 hours in a day (Sleep? Ha!) so no time to work on systems administration Hiring a systems administrator is expensive Customers won’t pay you for it, they expect it Amazon started AWS with 2 basic services, EC2 and S3 ; basically hosted computing power and hosted storage. EC2 and S3 are, fundamentally, about Economies of scale : Buying, configuring, and maintaining systems, including the power, network, and cooling necessary, is expensive and hard, but scalable; it is almost as easy to do it for 10 companies as for 1 Tech people tend to think that AWS is about tech. Its not. The tech is commodity and ubiquitous. AWS is about economics. And the 1 thing you need to know about econ is the tech world is : PEOPLE ARE EXPENSIVE, HARDWARE is cheap. Throwing hardware at a problem to save people is almost always a smart move. Using EC2 and S3 allow you to share the huge fixed costs of infrastructure with other companies. You are essentially outsourcing your data center configuration to Amazon (as well as your upgrade plan, and some other stuff) Is it possible to push this idea one level up? All production websites have some stuff in common: some web servers, a load balancer in front of them, possibly a database backing them. Some way to scale the servers in response to load. If you are a small startup (less than 20 people or so) you MUST MUST MUST figure out how to push everything that isn’t core to your business off onto other people. Administering web servers probably isn’t core to your business (If you are from Heroku I apologize!) Your business idea is unique, but your hosting is basically the same as everyone else’s (:13)
5
And its EASY! What Elastic Beanstalk is
A monitored set of EC2 boxes, preloaded with a web server and your application, behind an elastic load balancer There is not a THING in that set that you couldn’t do yourself Start an EC2 box Configure the OS Install the web server Install your application Create an ELB Attach the instances to the ELB Configure Cloudwatch to monitor the instances and the ELB Configure autoscaling properties to create new instances But by being willing to do some things the Elastic Beanstalk way, you remove the need to do a lot of tasks yourself If you log in to an elastic beanstalk server, you are going to see a pretty run-of-the-mill tomcat install! (:16)
6
Ways to not follow my advice
Alternatives to Elastic Beanstalk Could run on your own hardware (yikes! And you could sew your own clothes too I suppose) Could create and deploy your own AMIs, configure your own ELB Could use CloudFormation Could use DevWorks Could use Elastic Beanstalk, but with a custom AMI Could use Elastic Beanstalk, but with post-deploy config options Could use straight Elastic Beanstalk (:21)
7
A Live Demo? Are you insane?
(:31)
8
Git Deploys vs S3 Deploys
How Elastic Beanstalk does a deploy The GIT based deploy vs the S3 based deploy NodeJS and PHP default to GIT, Java defaults to S3, but you can do either from any language In a GIT based deploy, you are basically pushing to a branch that is monitored, which causes the new code to be pulled In a S3 based deploy, you are creating a deployable file (EG, a WAR file for a java deploy) and then triggering EB to pull it onto your instances Git deploys are FASTER S3 deploys have a unitary deliverable (:36)
9
Doing A Deployment Doing deploys right
Zero downtime VS Rolling Deploys VS “Screw Em” deploys Applications vs environments (red/green, the naming problem – don’t name your environments “staging” and “live” In fact, any more I don’t name mine anything useful at all – they are named Redress1, Redress2, etc… and the most recent one holds the live URL Automate your deploys – using Jenkins (an example) This is not a talk on Continuous Deployment so I’m not going into it but let me say – if you are just starting your company, get continuous deployment rolling now before you get big. It’s a lot easier to build in from the beginning than it is to add after the fact (:41)
10
You Must Monitor Your System
Monitoring your system Automatically created CloudWatch items Other things CloudWatch can monitor Custom CloudWatch monitors (eg order rate) You should probably have at least one monitoring system outside AWS (eg monitor.us) since all AWS monitors come from inside their own network (DNS failure example) (:48)
11
How I Met Your Mother Her Infosec was weak, allowing me to harvest her name, address, physical address, phone number, friends list and Foursquare checkins. This allowed me to be a perfect guy for her like Phil Connors in “Groundhog’s Day”. Sure it is vaguely creepy but what she doesn’t know can’t hurt her, right? Moral: You do need to do some Security Security Using IAM – You won’t remember the big spiel I’m about to give you, but remember 2 things and you’ll be ok: 1) Its not that hard and you need to do it and 2) Plan from the beginning to rotate your keys. One thing that companies tend to get right after they get hit is security. This isn’t a security talk – but if you are using your root credentials (the ones they gave you when you created the account) for your app you are doing it wrong. The first thing you should do when creating a new app is to create an IAM group for that app (set the privs), and create an IAM user and put it in that group, and use that user. That way when you need to rotate the keys (which you SHOULD do! Set a tickler file) you can just HTTPS Certs (Amazon isn’t a certificate authority but they will hold your cert for free on elastic beanstalk. The will NOT hold it for free on cloudfront!) (:54)
12
Tu Quoque? It means “You too?” in latin
Typically used to imply the person is being a hypocrite (:54)
13
Tu Quoque? (continued) This is also U2 in Latin
Things I should be doing but am not Use route 53 for DNS Have a backup DNS Create your instances in a VPC Use Worker instances for long running tasks This requires that you understand SQS – which you should, since it is AWS’s way of saving you from having to set up a Message Queuing architecture like RabbitMQ (:58)
14
Databases Are Optional (for this talk)
Starting with RDS Multi-AZ deployments Read replicas Moving to Dynamo? We use Dynamo for website where low cost and low latency is key, and pull to LOCAL Mysql for analysis and billing where 100% uptime isn’t significant (:64)
15
Email is also Optional (for this talk)
Using SES To quickly bootstrap – Get your DNS entry from your provider. Most of them allow you to do some amount of forwarding. Create an forward from an address to your personal account. Send an to that address to make sure it works. Have AWS authorize that account (they send a validation to make sure you actually own the account). Congrats! You now have a valid server for outbound . Need inbound ? I actually prefer SendGrid for that since POP is not a fun protocol (at least for me) (:66)
16
Do it LIVE! Your next step – get live
Nothing teaches like taking live traffic. So get your app live today (:68)
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.