Infrastructure agile avec Cloudformation - AWS Summit 2016
-
Upload
antoine-guy -
Category
Technology
-
view
113 -
download
1
Transcript of Infrastructure agile avec Cloudformation - AWS Summit 2016
![Page 1: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/1.jpg)
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Antoine Guy – Infrastructure Architect @Viadeo
31/05/2016
Infrastructure agile avec Cloudformation
![Page 2: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/2.jpg)
§ Architecture SOA récente. § Backend métier java (CQRS, DDD, Event based) § Frontend apps in nodejs (***) § Mobiles apps and middleends. § Backends : Mysql, ES, RabbitMQ, memcached, hadoop, spark. § 100% Puppet. § 15 baies en colocation.
![Page 3: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/3.jpg)
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.
![Page 4: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/4.jpg)
Automatisation
Scalabilité Agilité
Bonus : Intégration et Déploiement continus.
![Page 5: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/5.jpg)
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
![Page 6: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/6.jpg)
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.
![Page 7: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/7.jpg)
![Page 8: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/8.jpg)
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
![Page 9: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/9.jpg)
![Page 10: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/10.jpg)
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 !
![Page 11: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/11.jpg)
![Page 12: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/12.jpg)
![Page 13: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/13.jpg)
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.
![Page 14: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/14.jpg)
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.
![Page 15: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/15.jpg)
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 !
![Page 16: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/16.jpg)
Questions ?
![Page 17: Infrastructure agile avec Cloudformation - AWS Summit 2016](https://reader035.fdocuments.in/reader035/viewer/2022062523/58f2cd451a28ab09248b4567/html5/thumbnails/17.jpg)
Merci!