Skip to content

Instantly share code, notes, and snippets.

@ryanrousseau
Last active October 8, 2021 15:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanrousseau/652025cbf86fae481433e416e8ff288a to your computer and use it in GitHub Desktop.
Save ryanrousseau/652025cbf86fae481433e416e8ff288a to your computer and use it in GitHub Desktop.
serverUrl=$1
thumbprint=$2
apiKey=$3
space=$4
environment=$5
publicHostName=$6
role=$7
configFilePath="/etc/octopus/default/tentacle-default.config"
applicationPath="/home/Octopus/Applications/"
apt-key adv --fetch-keys https://apt.octopus.com/public.key
add-apt-repository "deb https://apt.octopus.com/ stretch main"
apt-get update
apt-get install tentacle
/opt/octopus/tentacle/Tentacle create-instance --config "$configFilePath"
/opt/octopus/tentacle/Tentacle new-certificate --if-blank
/opt/octopus/tentacle/Tentacle configure --port 10933 --noListen False --reset-trust --app "$applicationPath"
/opt/octopus/tentacle/Tentacle configure --trust $thumbprint
echo "Registering the Tentacle $name with server $serverUrl in environment $environment with role $role"
/opt/octopus/tentacle/Tentacle register-with --server "$serverUrl" --apiKey "$apiKey" --space "$space" --publicHostName "$publicHostName" --env "$environment" --role "$role"
/opt/octopus/tentacle/Tentacle service --install --start
serverUrl=$1
thumbprint=$2
apiKey=$3
space=$4
environment=$5
tenantTag=$6
publicHostName=$7
role=$8
configFilePath="/etc/octopus/default/tentacle-default.config"
applicationPath="/home/Octopus/Applications/"
apt-key adv --fetch-keys https://apt.octopus.com/public.key
add-apt-repository "deb https://apt.octopus.com/ stretch main"
apt-get -y update
# asp.net core
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
apt-get -y install apt-transport-https
apt-get -y update
apt-get -y install aspnetcore-runtime-3.0
# nginx
apt-get -y install nginx
rm /etc/nginx/sites-enabled/default
# tentacle
apt-get install tentacle
/opt/octopus/tentacle/Tentacle create-instance --config "$configFilePath"
/opt/octopus/tentacle/Tentacle new-certificate --if-blank
/opt/octopus/tentacle/Tentacle configure --port 10933 --noListen False --reset-trust --app "$applicationPath"
/opt/octopus/tentacle/Tentacle configure --trust $thumbprint
echo "Registering the Tentacle $name with server $serverUrl in environment $environment with role $role" >> /var/log/fhf/customscript.log
/opt/octopus/tentacle/Tentacle register-with --server "$serverUrl" --apiKey "$apiKey" --space "$space" --publicHostName "$publicHostName" --env "$environment" -tenantTag="$tenantTag" --role "$role"
echo "Starting service" >> /var/log/fhf/customscript.log
/opt/octopus/tentacle/Tentacle service --install --start
serverUrl=$1
thumbprint=$2
apiKey=$3
space=$4
environment=$5
tenantId=$6
publicHostName=$7
role=$8
configFilePath="/etc/octopus/default/tentacle-default.config"
applicationPath="/home/Octopus/Applications/"
apt-key adv --fetch-keys https://apt.octopus.com/public.key
add-apt-repository "deb https://apt.octopus.com/ stretch main"
apt-get -y update
# asp.net core
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
apt-get -y install apt-transport-https
apt-get -y update
apt-get -y install aspnetcore-runtime-3.0
# nginx
apt-get -y install nginx
rm /etc/nginx/sites-enabled/default
# tentacle
apt-get install tentacle
/opt/octopus/tentacle/Tentacle create-instance --config "$configFilePath"
/opt/octopus/tentacle/Tentacle new-certificate --if-blank
/opt/octopus/tentacle/Tentacle configure --port 10933 --noListen False --reset-trust --app "$applicationPath"
/opt/octopus/tentacle/Tentacle configure --trust $thumbprint
echo "Registering the Tentacle $name with server $serverUrl in environment $environment with role $role"
/opt/octopus/tentacle/Tentacle register-with --server "$serverUrl" --apiKey "$apiKey" --space "$space" --publicHostName "$publicHostName" --env "$environment" -tenant="$tenantId" --role "$role"
/opt/octopus/tentacle/Tentacle service --install --start
serverUrl=$1
thumbprint=$2
apiKey=$3
space=$4
environment=$5
unused=$6
publicHostName=$7
role=$8
configFilePath="/etc/octopus/default/tentacle-default.config"
applicationPath="/home/Octopus/Applications/"
apt-key adv --fetch-keys https://apt.octopus.com/public.key
add-apt-repository "deb https://apt.octopus.com/ stretch main"
apt-get -y update
# asp.net core
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
apt-get -y install apt-transport-https
apt-get -y update
apt-get -y install aspnetcore-runtime-3.0
# nginx
apt-get -y install nginx
rm /etc/nginx/sites-enabled/default
# tentacle
apt-get install tentacle
/opt/octopus/tentacle/Tentacle create-instance --config "$configFilePath"
/opt/octopus/tentacle/Tentacle new-certificate --if-blank
/opt/octopus/tentacle/Tentacle configure --port 10933 --noListen False --reset-trust --app "$applicationPath"
/opt/octopus/tentacle/Tentacle configure --trust $thumbprint
echo "Registering the Tentacle $name with server $serverUrl in environment $environment with role $role" >> /var/log/fhf/customscript.log
/opt/octopus/tentacle/Tentacle register-with --server "$serverUrl" --apiKey "$apiKey" --space "$space" --publicHostName "$publicHostName" --env "$environment" --role "$role"
echo "Starting service" >> /var/log/fhf/customscript.log
/opt/octopus/tentacle/Tentacle service --install --start
serverUrl=$1
thumbprint=$2
apiKey=$3
space=$4
publicHostName=$5
workerPoolName=$6
policyName=$7
configFilePath="/etc/octopus/default/tentacle-default.config"
applicationPath="/home/Octopus/Applications/"
echo "Installing docker"
apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
apt-get update
apt-get install docker-ce -y
echo "Installing tentacle"
apt-key adv --fetch-keys https://apt.octopus.com/public.key
add-apt-repository "deb https://apt.octopus.com/ stretch main"
apt-get update
apt-get install tentacle -y
/opt/octopus/tentacle/Tentacle create-instance --config "$configFilePath"
/opt/octopus/tentacle/Tentacle new-certificate --if-blank
/opt/octopus/tentacle/Tentacle configure --port 10933 --noListen False --reset-trust --app "$applicationPath"
/opt/octopus/tentacle/Tentacle configure --trust $thumbprint
echo "Registering the Tentacle $name with server $serverUrl in environment $environment with role $role"
/opt/octopus/tentacle/Tentacle register-worker --server "$serverUrl" --apiKey "$apiKey" --space "$space" --publicHostName "$publicHostName" --workerpool="$workerPoolName" --policy="$policyName"
/opt/octopus/tentacle/Tentacle service --install --start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment