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

Xxkel sd/multiple spaces #378

Closed

Conversation

xxkel-sd
Copy link

Are you a customer of Octopus Deploy? Please contact our support team so we can triage your PR, so that we can make sure it's handled appropriately.

Background

Add ability to apply multiple configurations for a tentacle - for instance have the tentacle registered in multiple spaces.

Results

Fixes #377

How to review this PR

Test that change is backwards compatible by not using the new ConfigDir environment variable
Test that using the new ConfigDir environment variable will apply the configurations in the ConfigDir - once for each .conf file. This should be tested for Linux as well as Windows.

Quality ✔️

Pre-requisites

  • [ x ] I have read How we use GitHub Issues for help deciding when and where it's appropriate to make an issue.
  • [ x ] I have considered informing or consulting the right people, according to the ownership map.
  • [ x ] I have considered appropriate testing for my change.

@CLAassistant
Copy link

CLAassistant commented Jun 15, 2022

CLA assistant check
All committers have signed the CLA.

@xxkel-sd xxkel-sd requested a review from a team as a code owner August 18, 2022 06:32
Copy link
Contributor

@N-lson N-lson left a comment

Choose a reason for hiding this comment

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

Hey @xxkel-sd, sorry about the delay. Thanks for submitting a PR! This would be a useful addition to the docker image. I've tested using the Linux image and found that ${CONFIG_DIR} wasn't set to anything which I've left a comment on.

Could you please rebase/merge the latest changes from main into this branch along with checking that env var is the value we're passing in? Once that's done feel free to request a review from myself again and we'll get this merged 🙇

echo "Configuring Octopus Deploy Tentacle"
echo "==============================================="
configureTentacle
for filename in $(realpath ${CONFIG_DIR}/*.conf); do
Copy link
Contributor

Choose a reason for hiding this comment

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

Should ${CONFIG_DIR} be ${ConfigDir} like line 215?

@@ -59,6 +59,15 @@ docker run --publish 10931:10933 --tty --interactive --env "ListeningPort=10931"
- **ListeningPort**: The port that the Octopus Server will connect back to the Tentacle with. Defaults to 10933. Implies a listening Tentacle.
- **PublicHostNameConfiguration**: How the url that the Octopus server will use to communicate with the Tentacle is determined. Can be `PublicIp`, `FQDN`, `ComputerName` or `Custom`. Defaults to `PublicIp`.
- **CustomPublicHostName**: If `PublicHostNameConfiguration` is set to `Custom`, the host name that the Octopus Server should use to communicate with the Tentacle.
- **ConfigDir**: If specified all files matching *.conf in this directory will be used for configuring the tentacle. Each .conf file allows overriding the environment variables specified for the container. If there's no override the environment variable for the container will be used. This will allow for multiple configurations of the same tentacle and could be used for registering the same tentacle in multiple spaces.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- **ConfigDir**: If specified all files matching *.conf in this directory will be used for configuring the tentacle. Each .conf file allows overriding the environment variables specified for the container. If there's no override the environment variable for the container will be used. This will allow for multiple configurations of the same tentacle and could be used for registering the same tentacle in multiple spaces.
- **ConfigDir**: Allows registering multiple configurations of the same Tentacle. If specified, all files matching `*.conf` in this directory will be used to configure and register a Tentacle. Each `.conf` file allows overriding the environment variables specified for the container. A new configuration will be created for each `.conf` file. Any environment variables with no override will default to the container-level environment variable value. This can be used for registering the same Tentacle in multiple spaces.

@@ -59,6 +59,15 @@ docker run --publish 10931:10933 --tty --interactive --env "ListeningPort=10931"
- **ListeningPort**: The port that the Octopus Server will connect back to the Tentacle with. Defaults to 10933. Implies a listening Tentacle.
- **PublicHostNameConfiguration**: How the url that the Octopus server will use to communicate with the Tentacle is determined. Can be `PublicIp`, `FQDN`, `ComputerName` or `Custom`. Defaults to `PublicIp`.
- **CustomPublicHostName**: If `PublicHostNameConfiguration` is set to `Custom`, the host name that the Octopus Server should use to communicate with the Tentacle.
- **ConfigDir**: If specified all files matching *.conf in this directory will be used for configuring the tentacle. Each .conf file allows overriding the environment variables specified for the container. If there's no override the environment variable for the container will be used. This will allow for multiple configurations of the same tentacle and could be used for registering the same tentacle in multiple spaces.

#### Example on a .conf file:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#### Example on a .conf file:
#### Example .conf file:

@APErebus APErebus closed this Oct 31, 2023
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.

Allow tentacle to register in multiple spaces
4 participants