infrastructure agile avec cloudformation · valider vos templates cloudformation : aws...

26
© 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

Upload: others

Post on 16-Oct-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

© 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

Page 2: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

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, removedfrom customer

Cycle-times: Long (months)

Picture: Wikimedia Commons

Page 3: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

Hardware-driven IT

Old IT

Software on virtual hardware

“Private Cloud”

Even older IT

Software on hardware

1:1

Page 4: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

“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 uncertainprojects

Culture: Business-centric, close tocustomer

Cycle-times: Short (days, weeks)

Picture: Wikimedia Commons

Page 5: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

New IT

• Unlimited resources

• No financial risk

• Software-defined,

dynamic architecture

• 100% automated

• Flexible

• Deployed in minutes

• World-wide

• Secure

• Robust

Page 6: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)
Page 7: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Antoine Guy, Infrastructure Architect

Viadeo

Page 8: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

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.

Page 9: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

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 10: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

Automatisation Scalabilité Agilité

Bonus : Intégration et Déploiement continus.

Page 11: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

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 12: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

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 13: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)
Page 14: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

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 15: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)
Page 16: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

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 17: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)
Page 18: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)
Page 19: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

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 20: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

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 21: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

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 22: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)
Page 23: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

Des questions ?

Page 24: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

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/

Page 25: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

AWS User Groups

Lille

Paris

Rennes

Nantes

Bordeaux

Lyon

Montpellier

Toulouse

facebook.com/groups/AWSFrance/

@aws_actus

Page 26: Infrastructure agile avec CloudFormation · Valider vos templates cloudformation : aws cloudformation validate-template Créez vos outils de tests et déploiement (sdk, cli, api)

Merci!