agile infrastructure with cloudformation (june 2016)
TRANSCRIPT
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Julien SIMON, Principal Technical Evangelist, AWS @julsimon
Antoine GUY, Infrastructure Architect, Viadeo
Infrastructure agile avec CloudFormation
Traditional IT
Goal: Reliability Value: Price/Performance Approach: Waterfall Governance: Plan-driven approvals Sourcing: Enterprise suppliers,
long-term deals Talent for: Processes, projects Culture: IT-centric, removed
from customer Cycle-times: Long (months)
Picture: Wikimedia Commons
Hardware-driven IT
Old IT Software on virtual hardware “Private Cloud”
Even older IT Software on hardware 1:1
“New Style” of IT
Goal: Agility Value: Revenue, brand,
customer experience Approach: Agile, Kanban
Governance: Empirical, continuous Sourcing: Small, new vendors,
short-term deals Talent for: New and uncertain
projects Culture: Business-centric, close to
customer Cycle-times: Short (days, weeks)
Picture: Wikimedia Commons
New IT
• Unlimited resources • No financial risk • Software-defined,
dynamic architecture • 100% automated • Flexible • Deployed in minutes • World-wide • Secure • Robust
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Antoine Guy, Infrastructure Architect Viadeo
§ Architecture SOA récente. § Backend métier java (CQRS, DDD, Event based). § Frontend apps in node.js. § Mobiles apps and middle-ends. § Backends : MySQL, ES, RabbitMQ, memcached, Hadoop, Spark. § 100% Puppet. § 15 baies en colocation.
Problèmes ?
§ Un datacenter vieillissant et distant. § Des serveurs en fin de vie. § Une infra réseau compliquée à opérer. § Une agilité grandissante, mais une barrière entre
DevOps et infra. à Refonte complète de l’infrastructure.
Infrastructure as Code
§ Les meilleures pratiques venues du dev. § L’infra est versionnée, auditable, partagée. § L’infra est testée en continu. § Réutilisable dans toutes les régions!
= dette technique *
* Soofi Safavi - re:invent 2015 - https://youtu.be/WL2xSMVXy5w
Cloudformation § Infrastructure as Code sur AWS § Permet de créer un ensemble de resources et leur configuration :
une stack § Un language de template basé sur Json. § Des outils pour tester et déployer : web interface, cli, sdk.
Automate all the things!
§ Valider vos templates cloudformation : § aws cloudformation validate-template
§ Créez vos outils de tests et déploiement (sdk, cli, api) § standardiser l’utilisation § faciliter l’adoption
§ Intégrer le tout dans un outil de CI : circle-ci, jenkins.
= dette technique
Créer vos images machine : AMI baking
§ AMI = Amazon Machine Image. § Définir des roles/profiles dans le configuration management. § Utiliser Packer pour créer une AMI par rôle (packer.io). § Un changement dans le code déclenche un rebuild d’AMI => CI § Automate all the things !
Cloudformation best practices
§ Utiliser Cloudformer pour démarrer. § Organiser votre code :
§ Users, base network, dns, templates, backends, frontends…
§ Créer des templates réutilisables : Nested stacks, parameters. § Séparer chaque composant dans une stack. § Créer 2 stacks identiques pour du green/blue deploy. § Tagger tout, dès le début ! § Créer vos outils de test/déploiement.
Results, Numbers
§ 87 Stacks deployées en prod et staging § 7 templates génériques. § 250-300 instances, 6 VPCs. § 0 instance créé à la main. § < 10 mins pour créer un composant. § Quelques heures pour recréer toute l’infra.
Next?
§ Optimisation des coûts § Autoscaling = +50% de réduction de coût. § Spot instance pour EMR : 80% de réduction de
coût. § Changement de région
§ Se rapprocher de nos utilisateurs = gains de performance !
Pour aller plus loin
https://aws.amazon.com/fr/cloudformation/ https://aws.amazon.com/quickstart/
https://blogs.aws.amazon.com/application-management
https://aws.amazon.com/fr/awsomeday/
Prochaine édition le 28 juin à Paris
https://aws.amazon.com/fr/events/
AWS User Groups
Lille Paris Rennes Nantes Bordeaux Lyon Montpellier Toulouse
facebook.com/groups/AWSFrance/
@aws_actus