localize content devops
TRANSCRIPT
Localize Content Devops
everything which keeps us runninghttps://localizecontent.com/
What is DevOps?
Collaboration and communication of both developers and Ops.
Automating the process of software delivery and infrastructure changes
Building environment where building, testing, and releasing software, can happen rapidly, frequently, and more reliably
Objective
Understand infrastructure
Server Configuration
Deployment of servers
Collect and aggregate system as well as application logs
Monitoring
Infrastructure
Godaddy
Nginx
EC2
ECS
RDS
And lot more with AWS and separate
What dev see?
Code
Github
Build
Using build process
depends on framework
Test
Testing
Deploy
Scripts/CI
ProvisionDeploy Monitor
CloudWatch
Code Push
Build and send image to ECR
Deploy to ECS from ECR
Deploy on machines
Developer
Github
EC2
Code Pull
What is actually happening?
SESS3CloudFront
EBS
Elastic IP
GodaddyCloud Watch
RDS
OpsWorks
User
EC2
VPC
ECS
Logentries New Relic
ECR
Let’s talk about few in detail
Docker
●Containers:○ OS Virtualization○ Process Isolation○ Automation○ Images
●Benefits of containers○ Portable○ Flexible○ Fast○ Efficient
Elastic Container Service
● Key Components:○ Cluster: Group of container instance○ Task Definition: Definition which define how to run tasks○ Tasks: Unit of work○ Service: Create service using tasks, automatically recover healthy container,
help discover service●It's a managed service●Defined with custom schedulers●Runs agent on all EC2 machines, help run cluster
Elastic Block Service
● Network block storage● Designed for availability● Attached to our EC2 instance● Point in time snapshot● Independent of EC2, so not fail even when EC2 instance fails● Can be encrypted for security
Relational Database Service● Fully managed relational database service● Simple to deploy● Easy to scale● Automated backup● DB snapshot
○ User driven database snapshot● Easy to replicate● Can have read replicas
OpsWorks● Agent on each EC2 machine● Understand commands triggered by Opswork and execute them● Agent then runs a solo Chef run, Work with Chef● Helps in
○ Automation○ Scalability○ Permissions○ Resource management○ Monitoring and lot more
OpsWorks● Stack: Container of AWS resources
○ Region○ Availability zones○ Operating systems
● Layers: Blueprint that specify how to configure a set of EC2 machine
○ Load balancer○ Web layer○ Elastic IP○ Security Group○ Database Layer
● Instance: EC2 instanceGives ease of provisioning new environments/machines
Virtual Private Cloud● Provide control of network architecture● Help secure resources● Predictable internal IP addresses● Advances network access control● Help provide isolated environment
IP Address
Choose IP Address Range
RFC1918
Subnet
Setup subnet
Internet
Create route to internet
Authorize Traffic to/from internet
ProvisionAuthorize
Traffic
VPC Subnet Route Table DeployProvision
Internet Gateway
Network ACL
Security Groups
Server Configuration
Solves problem to manually install and configure packages once hardware is ready.
Chef is one which helps us setup all configuration
Can deploy exactly same configuration machines.
Opsworks has inbuilt support for chef.
Chef Server
EC2
EC2
EC2
Chef client Pull recipes from server and run them
Recipes help set up base configuration, giving proper permissions to usersbased on his roles, installing and running services and lot more.
Chef● Provide framework to automate your infrastructure● Ensures node complies with policy● Policy is determined by configuration in each node’s run list● Reduce management complexity through abstraction● Policy states what state each resource to be in
○ Resource represent a piece of the system and things to be done: ■ Package to be installed■ Service to be running■ File should be generated■ Users and groups to be managed etc
● Chef client pull all policies from Chef server
Deployment
Deploy applications everyday and doing it manually can be real pain.
Scripts saves our life here.
Plan to move to Jenkins.
Using ECR with ECS for deployment of services.
Collect Logs
Crucial piece to tracking user operation and finding bugs easier.
Make sure we track everything.
Logentries is used which is a paid Saas service with free version.
Monitoring
Crucial piece to manage and optimizing servers and databases.
Make sure we track everything.
New Relic is used which is a paid Saas service with free version. We track all action’s response time, db time and lot more matrix.
Thanks