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

Allow users to specify multiple Server Comms Addresses to support HA Server configurations #945

Merged
merged 3 commits into from
May 24, 2024

Conversation

scme0
Copy link
Contributor

@scme0 scme0 commented May 23, 2024

Background

We need to allow users to specify multiple server comms addresses to support Octopus Server running in an HA configuration.

[sc-75000]

Results

Fortunately, there is already a command in Tentacle that we can leverage to register extra server instances (poll-server) so I just added an extra variable which can have multiple values, one for each additional server to register.

To make things backwards compatible, I've kept the original variable and now support both in the following way:
If ServerCommsAddress (singular) is set, it will use that for the initial registration. In this case, if ServerCommsAddresses (plural) is also set, all those values will be registered via poll-server.

If ServerCommsAddress is not set, the first value of ServerCommsAddresses will be used instead, and the remaining values (if any) in ServerCommsAddresses will be registered via poll-server.

Related Helm Chart PR: OctopusDeploy/helm-charts#160

return;
fi

echo "Registering additional HA Servers..."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this will allow registering additional instances even non HA?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way I have this setup, it uses the ServerUrl to get the thumbprint and stuff, which points to the main server you're registering from. We could allow users to pass in different ServerUrls for each Comms Address, but they would also need to pass in different API keys or bearer tokens for each one too. 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed here, I think we can continue with this change and add registering with separate server instances later if there is a user call for it.

@scme0 scme0 force-pushed the scme/k8s-agent/add-ha-server-support branch from b25508f to 1c0adb9 Compare May 24, 2024 01:09
Copy link
Contributor

@APErebus APErebus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Can we just add a comment in script for the more complex bash stuff?

@scme0 scme0 merged commit 504c029 into main May 24, 2024
55 checks passed
@scme0 scme0 deleted the scme/k8s-agent/add-ha-server-support branch May 24, 2024 03:18
kevjt pushed a commit that referenced this pull request May 29, 2024
…Server configurations (#945)

* first pass

* Fix formatting

* Add comments
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.

None yet

3 participants