1. AWS in SW Project
Industry case: Microservices Deployment into AWS
Anna Ruokonen / anna.ruokonen@gofore.com / 11.10.2019
11.10.2019
2. We change the world for the be1er through
digitalisa5on and by renewing ways of working
3. Gofore Oyj
Established 2001
Strongly growing company:
• Turnover 2018 n. 50 M€ (+49%)
• 558 professioanls (6/2019)
• 170+ clients
• Four acquisition (Leadin, Solinor,
Silver Planet, Mangodesign)
• Listed in First North 2017
2007-2014
4. We build the change with you
C LO U D
– ensure agile
development and light
maintenance.
L EA D
the digital change.
D ES I G N
new, user-oriented
digital services.
B U I L D
digital services and
service architecture of
the future .
7. CI /CDPLATFORMSINPROJECTS ABSTRACTIONLEVELFORINFRASTRUCTURE ORCHESTRATIONTECHNOLOGIESINPROJECTS
DEPLOYMENTFREQUENCY
44%
29%
13%
14%
3 – 12months > 3years
41% 33% 17% 9%
NOOFPROJECTSPERDEVELOPER
47% 25%
Jenkins VSTS
Circle
13%15% 3%
Travis
Bamboo
LOCATIONOFINFRAINPROJECTS
46% 33%
AWS Data
center
Azure
4%23% 1%
Google
cloud
Heroku
54%
50%
22%
8%
V i r t u a l M a c h i n e s
C o n t a i n e r s
S e r v e r l e s s
P h y s i c a l h a r d w a r e
Infrequently
Every few weeks
Weekly
Daily
29% 16%
Customscripts ECS
Kubernetes
11% 3%
Marathon
Docker
swarm
3%
8. Agenda
● AWS Cloud infrastructure and core services
● Microservices
● How to manage your cloud infrastructure?
● Industry case: Microservices Deployment into AWS
9. Regions and availability zones
The AWS Cloud spans 69 Availability Zones within 22 geographic Regions around the
world
● Performance
● Availability
● Security
● Reliability
● Scalability
● Low-Cost
hEps://aws.amazon.com/about-aws/global-infrastructure/
10. Simple Storage Service - S3
● Object storage
● Amazon S3 automatically scales to high request rates.
● Used to store and retrieve any amount of data (files)
● Data is stored as objects within resources called “buckets”, and a single object can
be up to 5 terabytes in size.
● Static website hosting
Other storages EBS, databases,..
11. Elas%c Compute Cloud - EC2
● Virtual machines
● Prizing: On-Demand, Reserved, and Spot
● Host type: Shared HW, Dedicated Host, and Dedicated Instance
● Amazon Machine Image
● Security Groups act as instance level firewall
13. Virtual Private Cloud - VPC
● Enables you to launch AWS resources into a virtual network that you've defined. Your
data center in the cloud.
● A subnet is a range of IP addresses in your VPC
● You define internet connecCvity: Private or Public subnet
● Network Access Control Lists (ACLs)
Use cases:
● Separate dev/test/prod: mulCple VPCs
● N-Cer architecture (mulCple subnets)
14. Databases
● Relational Databases
○ RDS - (MySQL, MariaDB, PostgreSQL, Oracle, and Microsoft SQL Server DB)
○ Aurora - serverless
● NoSQL
○ DynamoDB - serverless
○ DocumentDB
15. Microservices
● Applications composed of independent services that communicate over well-defined
APIs
● Autonomous
● Specialized
Containers
● Repeatable
● Self-contained execution environments
● Lightweight
16. Elastic Container Service (ECS)
● Orchestrates the execution of containers
● Maintains and scales the fleet of nodes running your containers
● Removes the complexity of standing up the infrastructure
Fargate
● Fully managed container service
● Provisioning and managing clusters
● Management of runtime environment
● Scaling
18. Elas%c Kubernetes Service (EKS)
● Kubernetes is an open-source system for automa%ng deployment, scaling, and
management of containerized applica%ons
● Makes it easy to deploy, manage, and scale containerized applica%ons
● Amazon EKS runs the Kubernetes management infrastructure for you
● Amazon ECR for container images
● Elas%c Load Balancing for load distribu%on
20. Lambda
● Fully managed compute service
● Runs stateless code
● Supports Node.js, Java, Python, C# , Go, and Ruby
● Runs your code on a schedule or in response to events
● You are charged based on the number of requests for your functions and the
duration
● You can build Serverless microservices with Lambda
● Integrated with API Gateway: Serverless APIs
● Integrated with ALB
21. Infrastructure as a Code (IaaC)
Versioning, Code review
Cloudformation
● AWS solution
● manages the state for you
● JSON or YAML
Terraform
● 3rd party
● complex logic
● flexible
24. Case: IIoT pla,orm - (Apps and Microservices)
API Gateway
Monitoring
Analytics Process
/devices /metadata
/processes
/performance
/customers
AWS Application Load Balancer
/users
/signalData
25. Case: IIoT pla,orm - (Apps and Microservices)
● GitLab CI/CD pipelines
● Microservices are deployed as Docker containers into Kubernetes cluster (EKS + EC2)
● Front-end applicaHons are deployed into S3 bucket
● Build pipeline and Deploy pipeline
● Dev/test deployment is automaHc
● ProducHon deployment needs manual trigger
● DownHme close to zero
27. GitLab CI/CD
● GitLab CI/CD is configured by a file called .gitlab-ci.yml placed at the
repository’s root
● The scripts set in this file are executed by the GitLab Runner
● GitLab CI/CD builds, tests, and deploys your applications to any AWS
infrastructure whether you are using EC2, ECS, or EKS.
34. Pipeline Philosophy
● Separation of concerns (build, deploy)
● Reusability (shared pipeline code)
● Build/Generate only once
● Aim for "internal open-source model" (e.g. shared npm packages)
● Aim for best practices and standard conventions used by open-source communities
(Javascript/Typescript)
(Aki Mäkinen, Gofore)