Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Infrastructure-as-Code with Pulumi - Better than all the others (like Ansible)?

318 views

Published on

There's a new Infrastructure-as-Code (IaC) kid on the block: Pulumi is there to frighten the established: Chef, Puppet, Terraform, Cloudformation, Ansible... But is it really the "better" tool and how could they be compared? Is it only hype-driven? We'll find out, incl. lot's of example code. (ContainerConf / Continuous Lifecycle 2019 Talk in Mannheim)

Example GitHub code: https://github.com/jonashackt/pulumi-python-aws-ansible
https://github.com/jonashackt/pulumi-typescript-aws-fargate

Published in: Software
  • Be the first to comment

Infrastructure-as-Code with Pulumi - Better than all the others (like Ansible)?

  1. 1. Jonas Hecht | Senior IT-Nerd | Infrastructure-as-Code with Pulumi Better than all the others (like Ansible)? @jonashackt github.com/jonashackt https://jonashackt.io
  2. 2. 4+1jonashackt.io
  3. 3. 3 Our industry is like…
  4. 4. 4
  5. 5. blog.daftcode.pl/hype-driven-development-3469fc2e9b22
  6. 6. Pulumi?
  7. 7. = YOUNG! published June 2018 1.0 September 2019
  8. 8. pulumi.com/docs/intro/concepts/how-pulumi-works/
  9. 9. pulumi.com/docs/intro/languages Pulumi is language agnostic to support multiple programming languages at the same time
  10. 10. pulumi.com/docs/intro/languages
  11. 11. API reference: pulumi.com/docs/reference/pkg Examples: github.com/pulumi/examples
  12. 12. github.com/jonashackt/pulumi-typescript-aws-fargate Pulumi Program (Typescript) Node.js Package Management Typescript config Pulumi Stack definition Pulumi Project config
  13. 13. Pulumi program example
  14. 14. Create projects
  15. 15. Multicloud?
  16. 16. pulumi.com/docs/intro/cloud-providers
  17. 17. github.com/pulumi/examples
  18. 18. State
  19. 19. State is stored in the Pulumi Service Backend
  20. 20. pulumi.com/docs/intro/concepts/how-pulumi-works Pulumi Service Backend
  21. 21. Service Backend options app.pulumi.com Self-managed backend on-premise app.pulumi.com (Enterprise version only) pulumi.com/docs/intro/concepts/state/
  22. 22. Example: app.pulumi.com/jonashackt A Stack defines the State of a Pulumi project
  23. 23. Pulumi.YourStackName.yaml
  24. 24. Resource Providers aka „Terraform Wrappers“
  25. 25. pulumi.com/docs/intro/concepts/how-pulumi-works Resource Providers
  26. 26. pulumi.com/docs/intro/concepts/how-pulumi-works Resource Providers
  27. 27. = „Terraform Wrapper“ 2019! (except Kubernetes provider) pulumi.com/docs/intro/vs/terraform/#converting-from-terraform
  28. 28. github.com/pulumi/pulumi/wiki/Roadmap
  29. 29. Pulumi vs. X
  30. 30. ?
  31. 31. vs.
  32. 32. 1. Academic comparison 2. Handle configuration drift 3. Current state of my infrastructure? 4. Tools shouldn‘t suck! (no master!, no agents!) 5. Able to do the job! (all major Clouds & on-premise)
  33. 33. 1. Academic comparison
  34. 34. Configuration Management Provisioning docs.ansible.com/ansible/latest/modules/list_of_cloud_modules.html
  35. 35. Pulumi is fundamentally different than these tools and works great alongside them pulumi.com/docs/intro/vs/
  36. 36. Configuration Management Provisioning +
  37. 37. 2. How do they handle configuration drift?
  38. 38. the state of the machine drifts from the baseline due to manual changes and updates shadow-soft.com/ansible-idempotency-configuration-drift
  39. 39. Mutable Infrastructure Provision Configure same servers, changed every time
  40. 40. Immutable Infrastructure Provision Configure new servers, every time
  41. 41. What if we don‘t allow „manual changes“? Use software engineering practices like Continuous Integration for your infrastructure code!
  42. 42. Mutable Infrastructure Immutable Infrastructure Provision Configure Provision Configure Running our Infrastructure code in CI/CD pipelines, this comparison become less relevant!
  43. 43. Provision Configure Test Demo time! github.com/jonashackt/pulumi-python-aws-ansible
  44. 44. 3. Current state of my infrastructure?
  45. 45. There‘s this 3rd comparison called Procedural vs. Declarative… But remember the Continuous Integration thingy?
  46. 46. 4. Tools shouldn‘t suck (no master!, no agents!)
  47. 47. master no master • central place to see status of your infrastructure • continuously enforce configuration in the background • extra infrastructure! • needs to be maintained • client-2-master & master-2-servers communication needs ports & security Remember the Continuous Integration Thingy again?
  48. 48. master no master
  49. 49. Agent needs to be installed on the server No Agent needed
  50. 50. 5. Able to do the job! (all major Clouds & on-premise)
  51. 51. stackshare.io/stackups/ansible-vs-terraform-vs-pulumi
  52. 52. google.com stackoverflow.com documentation blog & articles count community size Both config mgt. & provisioning on-premise also
  53. 53. But that‘s just today!
  54. 54. pulumi.com/docs/guides/crosswalk/aws Crosswalk for AWS supports “day one” tasks, such as creating your initial container-based workloads using ECS/Fargate/EKS & serverless workloads (API Gateway / Lambda)
  55. 55. pulumi.com/docs/guides/crosswalk/aws
  56. 56. github.com/jonashackt/pulumi-typescript-aws-fargate App: github.com/jonashackt/spring-boot-vuejs
  57. 57. github.com/pulumi/pulumi/wiki/Roadmap
  58. 58. Summary
  59. 59. blog.daftcode.pl/hype-driven-development-3469fc2e9b22 Pulumi
  60. 60. 2019
  61. 61. No matter what IaC tool you use… Automatically update dependencies (e.g. renovatebot) Use Testframeworks – or even do TDD! Run Tests automatically - in your Continuous Integration Pipeline! Treat your infrastructure code AS CODE! Always aim for reproducible builds (aka dependency management) Run your infrastructure code frequently! (scheduled CI jobs)
  62. 62. github.com/jonashackt/pulumi-talk @jonashackt

×