Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApplyPlan: Calculate what changes would happen to each item #147

Open
azriel91 opened this issue Jun 27, 2023 · 0 comments
Open

ApplyPlan: Calculate what changes would happen to each item #147

azriel91 opened this issue Jun 27, 2023 · 0 comments

Comments

@azriel91
Copy link
Owner

azriel91 commented Jun 27, 2023

Enables deterministic execution, and history.

The apply execution plan for apply needs to include:

  • Upgrade Action for all items.
  • Items that need to be cleaned.
  • Items that need to be ensured.

Not sure if this should be part of DiffCmd. Diff for "what's different between environments", and "what's different between versions of this environment", is different to diff for "what will happen when apply is run".

This may turn into a CmdQueue, and later on be executed by a CmdQueueCmd:

  • An ApplyPlan contains:

    • Item instances to clean.

    • Item instances to create.

    • Order that those item instances are cleaned or created.

      • Some new items should be created before cleaning old items, e.g. newer servers should be created before taking away the older servers, then DNS switchover, then clean.
      • Some items cannot be created until the older items are cleaned, e.g. new servers should reuse existing IP addresses that are currently associated with existing servers.
  • CmdQueue: Queue of:

    1. StatesDiscoverCmd: Make sure the current state is the same as what the user has made a decision upon.
    2. EnsureCmd: Create items for minimizing downtime.
    3. CleanCmd: Clean items that are blocking new items from being created.
    4. EnsureCmd: Create items that are now unblocked.
    5. CleanCmd: Clean items that are no longer needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant