Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Power to the People: Combine Imperative with De...

Ringo
February 07, 2023

Power to the People: Combine Imperative with Declarative aspects

On a regular basis, articles and tweets pass by discussing whether some specific tool is imperative or declarative. It’s no surprise that Pulumi is often the tool being debated.

This talk will explain why the right combination of imperative and declarative implementation aspects on your tool(s) deliver the power you need to solve your problems.
Ringo will analyse the following tools and pinpoint which parts of them are imperative and declarative:

- an older tool (Chef)
- two current tools (Pulumi, Helm)
- a recent one from another domain (Dagger)

To wrap up, Ringo will reason why the introduction of imperative programming languages in our tooling solves our most pressing need: integration!

Talk given at CfgMgmtCamp 2023

Recording on YouTube

Ringo

February 07, 2023
Tweet

More Decks by Ringo

Other Decks in Programming

Transcript

  1. Both terms refer to how the user provides direction to

    the automation platform. With an imperative tool, you define the steps to execute in order to reach the desired solution. With a declarative tool, you define the desired state of the final solution, and the automation platform determines how to achieve that state. Source: https://www.linode.com/blog/devops/declarative-vs-imperative-in-iac/
  2. What is the behaviour when running multiple times? Imperative Run

    #1 all steps are executed and resources are created Run #2 All steps are executed and resources are created again Declarative Run #1 All resources are declared and converged Run #2 All resources are declared again, the tool remembers these are already converged, and does nothing
  3. Short recap • DSL in Ruby for configuration management •

    Resource • Recipe • Cookbook • And some more
  4. Language Host Pulumi CLI + Engine Pulumi Providers gRPC gRPC

    VPC IG Register resource Register resource
  5. Language Host Pulumi CLI + Engine Pulumi Providers gRPC gRPC

    VPC IG RT Register resource Register resource Register resource
  6. Language Host Pulumi CLI + Engine Pulumi Providers gRPC gRPC

    VPC IG RT Register resource Register resource Register resource SG Register resource
  7. Language Host Pulumi CLI + Engine Pulumi Providers gRPC gRPC

    VPC IG RT Register resource Register resource Register resource Create Resource Create Resource Create Resource 1 2 3 SG Create Resource 2 Register resource
  8. Language Host Pulumi CLI + Engine Pulumi Providers gRPC gRPC

    Pulumi Architecture An imperative language setup drives a … … declarative engine, which uses … … imperative calls to fulfil the desired state
  9. Pulumi Automation API Allows you to embed Pulumi in bigger

    automations Pulumi Engine Your automation project Automation API