How to move "Home" and "Log" folders on a tentacle

I’ve seen the documentatoin for moving the Home directory for the Octopus Server, but would like to do the same for a Tentacle.

Hi Larry,

Thanks for getting in touch!

You can follow the same process as for moving the Octopus Home directory, but instead of using Octopus.Server.exe, you use Tentacle.exe. E.g.

$oldHome = "C:\Octopus"
$newHome = "C:\YourNewHomeDir"
$octopus = "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe"
& "$octopus" service --stop
mv $oldHome $newHome
& "$octopus" configure --home="$newHome"
& "$octopus" service --start

Hope that helps!

Henrik

I tried this, but when I did the configure step, I got output saying “C:\octopus\Tentacle\Tentacle.config could not be found”

Hi Kneumei,

The code below relies on knowing where the Tentacle was installed. If the home directory was changed from “C:\Octopus” you will have to update the below values.

Hope this helps!
Vanessa

Hi All on this Thread (any anyone who stumbles in here),

The tentacle needs an extra step when its moved.

$oldHome = "C:\Octopus"
$newHome = "C:\YourNewHomeDir"
$octopus = "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe"
& "$octopus" service --stop
mv $oldHome $newHome
& "$octopus" configure --home="$newHome"
& "$octopus" configure --appdir="$newHome"
& "$octopus" service --start

Please see that there is also an appdir configuration.

I’m also receiving the same error that the tentacle.config file cannot be found. I’ve included the correct install path, but it’s still looking at the old location for the config file and ultimately throwing that error. Where does tentacle identify where the config file is?

Hi Mike,

There’s a few missing bits in the PoSh script provided below, we have updated our docs for moving an Octopus server / Tentacle here: http://docs.octopusdeploy.com/display/OD/Move+the+Octopus+Home+folder+and+the+Tentacle+Home+and+Application+folders

If you have already moved the folder, you just need to run the following commands (on the Tentacle server, updating the necessary variables to match your settings of course). (The delete-instance command will not delete any data, just remove the registry keys associated with the Tentacle instance)

$instance = "Tentacle"
$newHome = "C:\YourNewHomeDir"
$newConfig = "$newHome\$instance\${instance}.config"
$tentacleExe = "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe"
# Stop the current Tentacle service
& "$tentacleExe" service --instance $instance --stop

# Delete the current Tentacle instance
& "$tentacleExe" delete-instance --instance $instance
# Create the new Tentacle instance with its new configuration file
& "$tentacleExe" create-instance --instance $instance --config $newConfig
 
# Configure the Tentacle's Home and Application folders
& "$tentacleExe" configure --home $newHome
& "$tentacleExe" configure --app $newHome
 
# Start the new Tentacle service
& "$tentacleExe" service --instance $instance --start

Hope that helps!

Henrik

I followed the instructions here: http://docs.octopusdeploy.com/display/OD/Move+the+Octopus+Home+folder+and+the+Tentacle+Home+and+Application+folders
It removed the old folder and set up a new different folder structure so instead of
Applications
Files
Logs
Tentacle

I now have
Actors
Logs
Streams
Tentacle

My old data seems to have gone and the Tentacle installation is corrupt and the service won’t start.

I’ve attached the script I ran under an admin account. Did I miss something?
Tentacle version is 2.6.3.886

Thanks

MoveHomeFolderOnTentacle.ps1 (942 Bytes)

Hi Conrad,

The Tentacle logs (D:\Octopus\Logs) should give some idea why the service isn’t starting. (If the config didn’t transfer properly, they could also be in the old location).
Can you look inside the Tentacle folder in the new directory, it should have your Tentacle.config and Tentacle folders.

Let me know what you find and what the logs say.
Vanessa

Hi Vanessa,

Thanks for the reply.

I couldn’t get the script on your website working even though we have a default set-up. My remit was just to move the Applications directory of the tentacle, so I ended manually copying the folder and just using the attached script which has worked without issue. Apologies as I can’t provide any log files. They are long gone as I had to re-install the tentacles many times whilst trying to fix the script.

Although we now have many production deployments with Octopus, today was the first production deployment today using a CI pipeline together with Octopus, Thanks for your continual hard work. Still loving your product!

MoveApplicationFolderOnTentacle.ps1 (503 Bytes)

Hi Conrad,

Yeah no worries. It is very odd though that you did not have to redefine the config placement.

Thanks for the kind words! I have shared them with the team :slight_smile:

Vanessa