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

feat: support custom branch for upscale #273

Merged
merged 6 commits into from
Jan 6, 2025

Conversation

jacderida
Copy link
Contributor

  • 2133a2d chore: remove remaining traces of network keys

    These were removed from antnode and are no longer required.

  • ca32ee4 chore: use different version retrieving mechanism

    The versions for both antnode and antctl can just come from a random VM rather than the node
    registry.

  • ca780ed feat: support custom branch for upscale

    The upscale does not build the binaries. Instead it uses the build from the original deployment. The
    binary option can be set to the same owner/branch reference as the previous deployment, and this
    means Ansible will pick up the URL where the custom binary was uploaded to.

  • 07ef86b chore: remove redundant args from upscale cmd

    The --desired-auditor-vm-count and --downloaders-count arguments do not apply any more.

  • 5ae4436 refactor: use shared mechanism for apply and plan args

    The terraform plan and terraform apply arguments should be identical to each other, such that
    the plan will be producing the same change set as the apply. There were different code paths for
    each of them, which meant they could diverge easily.

    Extract a full function for obtaining the resource value from the Terraform state. The closure was
    large, so it was making the enclosing function more difficult to read. The vm_size variable was
    renamed because it was misleading: the function retrieves the value of any resource, not just the
    size of a VM.

    BREAKING CHANGE: I removed the plan command as part of this refactor. This command on its own just
    didn't make a whole lot of sense. It makes more sense to be used with an upscale.

  • 0d057a4 feat: obtain machine sizes from previous deploy

    It's possible to launch the original deployment with values different from those in the tfvars file.
    If you then try to upscale, Terraform will then want to apply the values from the tvfars file, which
    could be smaller or larger.

    The sizes are therefore obtained from the original deployment by inspecting the current state.

These were removed from `antnode` and are no longer required.
The versions for both `antnode` and `antctl` can just come from a random VM rather than the node
registry.
The upscale does not build the binaries. Instead it uses the build from the original deployment. The
binary option can be set to the same owner/branch reference as the previous deployment, and this
means Ansible will pick up the URL where the custom binary was uploaded to.
The `--desired-auditor-vm-count` and `--downloaders-count` arguments do not apply any more.
The `terraform plan` and `terraform apply` arguments should be identical to each other, such that
the plan will be producing the same change set as the apply. There were different code paths for
each of them, which meant they could diverge easily.

Extract a full function for obtaining the resource value from the Terraform state. The closure was
large, so it was making the enclosing function more difficult to read. The `vm_size` variable was
renamed because it was misleading: the function retrieves the value of any resource, not just the
size of a VM.

BREAKING CHANGE: I removed the `plan` command as part of this refactor. This command on its own just
didn't make a whole lot of sense. It makes more sense to be used with an upscale.
It's possible to launch the original deployment with values different from those in the tfvars file.
If you then try to upscale, Terraform will then want to apply the values from the tvfars file, which
could be smaller or larger.

The sizes are therefore obtained from the original deployment by inspecting the current state.
@jacderida jacderida force-pushed the feat-support_url_on_upscale branch from 0d057a4 to 5db0cd4 Compare January 5, 2025 12:58
@jacderida jacderida merged commit 5139a62 into maidsafe:main Jan 6, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants