Skip to content

Commit

Permalink
Allow multiple configurations for tentacle (OctopusDeploy OctopusDepl…
Browse files Browse the repository at this point in the history
  • Loading branch information
xxkel-sd committed Jun 15, 2022
1 parent 3b13fce commit 5b75633
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
28 changes: 19 additions & 9 deletions docker/linux/scripts/configure-tentacle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,25 @@ function registerTentacle() {
tentacle "${ARGS[@]}"
}

echo "==============================================="
echo "Configuring Octopus Deploy Tentacle"

validateVariables

echo "==============================================="

configureTentacle
registerTentacle
if [[ -z "${ConfigDir}" ]]; then
echo "==============================================="
echo "Configuring Octopus Deploy Tentacle"
validateVariables
echo "==============================================="
configureTentacle
registerTentacle
else
echo "==============================================="
echo "Configuring Octopus Deploy Tentacle"
echo "==============================================="
configureTentacle
for filename in $(realpath ${CONFIG_DIR}/*.conf); do
echo "processing $filename"
. $filename
validateVariables
registerTentacle
done
fi

touch $alreadyConfiguredSemaphore

Expand Down
9 changes: 9 additions & 0 deletions docker/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
```
Space=MySpace
TargetName=Testing
TargetWorkerPool=MyWorkerPool
```


### Ports

Expand Down

0 comments on commit 5b75633

Please sign in to comment.