
Briana.Augenreich
@capitalone.com







Cynthia.Carter
@capitalone.com

Level Set: What is the cloud?
Getting Hands-on: Build Infrastructure to Host your Website.
Powerful Tools to Research Next
Passing the Interview
Feel comfortable exploring/developing in the Cloud!

Today's Goals
Agenda
What is Cloud Computing?
- Network of Remote Servers
- Platform to help build scalable applications
- Fast access to low cost resources over the internet

What are the benefits?
- Cost! Pay for infrastructure as needed




- Scale up to balance load
- Low risk- great for experiments (hello start-up)
- Deploy applications in multiple regions
Which is why so many companies run on AWS!









So Let's Deploy Our Website on AWS too


https://aws.amazon.com/console/
https://932727539571.signin.aws.amazon.com/console
https://amzn.to/2IEhr4e
Non-Functional Requirements?




Resources Could Use:

https://d0.awsstatic.com/whitepapers/aws-overview.pdf

Architecture Diagram
Regions vs Availability Zones

Region
Separate geographical area
Ex: California & Oregon (US West Regions)
Availability Zone (AZ)
Isolated location within a region

How does this help our NFRs?

Architecture Diagram

Let's talk security !
All resources are deny by default
Security Groups open up our firewall
Allow access to our resources
Review the course-sg
Create Security Group

Firewall controlling traffic around our database and web servers


Architecture Diagram
Configure the Database
RDS Instance: Relational Database Service
- Relational Database
- Resizable capacity
- MySQL, PostgreSQL, etc.
- Object Storage
- Pay for storage use
- Glacier for long-term archive
- Good for big data analytics, backup, and other applications
S3
RDS


Create RDS Instance



Architecture Diagram


Automagically deploy a web application
Configure Elastic Beanstalk

Configure Elastic Beanstalk
Automagically deploy a web application


Review our environment
Review sample php app

Configure DB


Configure Autoscaling Group


Modify Security Group



What did we just do?
Elastic Compute Cloud (EC2)

Scalable compute capacity in the cloud
AKA our servers
Variety of sizes and optimizations
Secured by our security group
The Security Group


Firewall controlling traffic around the application.

Architecture Diagram
Elastic Load Balancer (ELB)
Distributes application traffic across multiple EC2s.
Also secured by our security group
Helps meet business requirements of:
- Fault tolerant
- Scalable to help app performance
- Availability


Architecture Diagram
Auto Scaling Group
Launch or terminate EC2 instances based off of policy.
- Maintain application performance by adding and removing EC2s based on CPU, requests, time of day
- Decrease cost by "turning off the lights"
- Cross region availability

Deploy our app

download application from http://bit.ly/2FhRupO and deploy to beanstalk environment

index.php
<?php
require __DIR__ . '/../src/app.php';
app.php
db-connect.php
<?php
require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/db-connect.php';
<?php
define('DB_NAME', $_SERVER['RDS_DB_NAME']);
define('DB_USER', $_SERVER['RDS_USERNAME']);
define('DB_PASSWORD', $_SERVER['RDS_PASSWORD']);
define('DB_HOST', $_SERVER['RDS_HOSTNAME']);
define('DB_TABLE', 'urler');
?>
/ Setup the application
$app = new Application();
$app->register(new TwigServiceProvider, array(
'twig.path' => __DIR__ . '/templates',
));
// Setup the database
$app['db.table'] = DB_TABLE;
$app['db.dsn'] = 'mysql:dbname=' . DB_NAME . ';host=' . DB_HOST;
$app['db'] = $app->share(function ($app) {
return new PDO($app['db.dsn'], DB_USER, DB_PASSWORD);
});
// Handle the index page
$app->match('/', function () use ($app) {
$query = $app['db']->prepare("SELECT message, author FROM {$app['db.table']}");
$thoughts = $query->execute() ? $query->fetchAll(PDO::FETCH_ASSOC) : array();
return $app['twig']->render('index.twig', array(
'title' => 'Your Thoughts',
'thoughts' => $thoughts,
));
});
// Handle the add page
$app->match('/add', function (Request $request) use ($app) {
$alert = null;
// If the form was submitted, process the input
if ('POST' == $request->getMethod()) {
try {
// Make sure the photo was uploaded without error
$message = $request->request->get('thoughtMessage');
$author = $request->request->get('thoughtAuthor');
if ($message && $author && strlen($author) < 64) {
// Save the thought record to the database
$sql = "INSERT INTO {$app['db.table']} (message, author) VALUES (:message, :author)";
$query = $app['db']->prepare($sql);
$data = array(
':message' => $message,
':author' => $author,
);
if (!$query->execute($data)) {
throw new \RuntimeException('Saving your thought to the database failed.');
}
} else {
throw new \InvalidArgumentException('Sorry, The format of your thought was not valid.');
}
// Display a success message
$alert = array('type' => 'success', 'message' => 'Thank you for sharing your thought.');
} catch (Exception $e) {
// Display an error message
$alert = array('type' => 'error', 'message' => $e->getMessage());
}
}
return $app['twig']->render('add.twig', array(
'title' => 'Share Your Thought!',
'alert' => $alert,
));
});
$app->run();
Check out our app!

The site collects user comments and uses a MySQL database to store the data.


Recap of What we Built
- EC2
- Security Groups
- Beanstalk Environment

- RDS
- Load balancer
- Autoscaling Group
Now delete it all :)
Other Cloud Technology
- Microsoft Azure
- Google Cloud Platform
- IBM Cloud
- Rackspace



More Cool Stuff to Check Out
- Cloud formation templates
- Chef
- Ansible
- Docker
- Jenkins
- Terraform



Pass the Interview!


Can anyone think of use cases for resources we didnt use?

Explain the difference between cloud and traditional datacenters.
- No physical hardware you manage with the cloud
- Inexpensive
- Quick scalability
- Start up friendly
- Pay as you go
What are the layers of cloud computing?
Infrastructure as a Service
IaaS is the hardware and software that powers it all – servers, storage, networks, operating systems.


What are the layers of cloud computing?
Platform as a Service
PaaS is the set of tools and services designed to make coding and deploying applications quick and efficient.


What are the layers of cloud computing?
Software as a Service
SaaS applications are designed for end-users, delivered over the web via third party vendors.



Describe the difference between
Scalability & Elasticity.
Elasticity
- The ability to fit the resoures with needs of your system to cope with the demand dynamically.
- ie -The ability to scale up and down appropriately
Scalability
- Ability of your system to add more resources to accommodate larger work loads
Amazon Elastic Beanstalk automates the details of which of the following functions?
A) Capacity provisioning
B) Load balancing
C) Auto-scaling
D)Application deployment
E) All of the above
Describe a region vs an availability zone?
A region is a separate geographic area. A region has many isolated locations known as availability zones.
Learn More and Get Certified
- AWS Developer Guides & Tutorials
- AWS qwiklabs
- Cloud Academy
- A Cloud Guru


AWS offers several different certification you can take to show companies how awesome you are in the cloud!

Thanks!

2018 Spring- Summit For Software Engineers: AWS
By Briana Crabb
2018 Spring- Summit For Software Engineers: AWS
- 714