$30 off During Our Annual Pro Sale. View Details »

HashiCorp Tools for Windows

HashiCorp Tools for Windows

An overview of why you should use Packer, Terraform and Vagrant in a Windows Ecosystem.

Hibri Marzook

October 20, 2016
Tweet

More Decks by Hibri Marzook

Other Decks in Technology

Transcript

  1. HashiCorp Tools for the
    Windows Ecosystem
    @hibri
    Consultant at @ContinoHQ

    View Slide

  2. The Developer
    Machine
    @hibri WinOps October 2016

    View Slide

  3. View Slide

  4. How is this solved ?
    • Golden images.
    • Not refreshed regularly
    • Designed by committee
    • Doesn’t fit individual needs
    • Requires someone spending a day or two to build.
    • Every developer has special needs.
    • Self built
    • Not repeatable
    • Time wasted, less productive
    @hibri WinOps October 2016

    View Slide

  5. Packer
    @hibri WinOps October 2016

    View Slide

  6. What does Packer look like?
    @hibri WinOps October 2016

    View Slide

  7. • Download Packer from https://www.packer.io/
    • Clone https://github.com/joefitzgerald/packer-
    windows
    • packer build windows_10.json
    @hibri WinOps October 2016

    View Slide

  8. Provisioning with Packer
    @hibri WinOps October 2016

    View Slide

  9. Packer does cloud too..
    @hibri WinOps October 2016

    View Slide

  10. @hibri WinOps October 2016

    View Slide

  11. Why Vagrant
    • Create lightweight (Windows weight ? )
    environments
    • Repeatable
    • Share it
    • Trash it
    • Gateway to thinking about infrastructure as code
    @hibri WinOps October 2016

    View Slide

  12. vagrant up
    @hibri WinOps October 2016

    View Slide

  13. Provisioning with Vagrant
    @hibri WinOps October 2016

    View Slide

  14. Provisioning with Puppet
    and Chocolatey
    @hibri WinOps October 2016

    View Slide

  15. Do’s and Don’ts
    • Do script Vagrant with config management scripts
    • Do have a Vagrant file per project
    • Do use the same config management scripts as used for
    production services.
    • Avoid provisioning heavyweight apps ( Visual Studio, SQL
    server) . Use Packer to build these instead.
    • Encourage reuse within your organisation.
    • Also see Boxen (https://github.com/boxen) and Boxstarter
    (http://boxstarter.org/)
    @hibri WinOps October 2016

    View Slide

  16. Terraform
    @hibri WinOps October 2016

    View Slide

  17. Why do I useTerraform ?
    • Tool for building, changing and versioning
    infrastructure.
    • Manages dependencies between infrastructure
    components.
    • Share your infrastructure code.
    • Use the same declarative language between
    different providers.
    @hibri WinOps October 2016

    View Slide

  18. With Powershell
    @hibri WinOps October 2016

    View Slide

  19. With Terraform
    @hibri WinOps October 2016

    View Slide

  20. @hibri WinOps October 2016

    View Slide

  21. Resources
    @hibri WinOps October 2016

    View Slide

  22. Resources and Modules
    @hibri WinOps October 2016

    View Slide

  23. Resources and Modules
    @hibri WinOps October 2016

    View Slide

  24. Do’s and Dont’s
    • Do use CI pipeline to apply changes from the
    beginning of a project.
    • Don’t use Terraform to provision applications. Use
    appropriate tooling for it. Puppet, Chef etc.
    • Do use Terraform to provision the infrastructure so
    that other provisioners can run.
    @hibri WinOps October 2016

    View Slide

  25. Summary
    • Packer to build Vagrant boxes for virtualisation and
    cloud images.
    • Vagrant to spin up and share development
    environment setups.
    • Terraform to simplify creating infrastructure and to
    version.
    • All of these tools are automation friendly.
    • Add automation tactically
    @hibri WinOps October 2016

    View Slide

  26. Links
    • Packer for Windows https://github.com/
    joefitzgerald/packer-windows
    • Packer for Windows 2016 and Windows Containers
    https://github.com/StefanScherer/packer-windows
    • Terraform Azure Provider https://www.terraform.io/
    docs/providers/azurerm/index.html
    @hibri WinOps October 2016

    View Slide

  27. Fin
    Questions ?
    [email protected]
    twitter @hibri
    http://www.hibri.net
    @hibri WinOps October 2016

    View Slide