How to run "deploy a package step" on Octopus server same as script task step

1.2k Views Asked by At

We are using octopus deploy as Continuous delivery. We have already setup all web related configuration on octopus "Deploy Package Step" where we are deploying nuget package to octopus server and then it is deploying the application to multiple server nodes.

Now we are planning to implement database automation using DBUP on octopus server.We are creating a nuget package and using "Deploy.ps1" which contains the power shell command to execute the console exe application on server.

We are using "Deploy Package step " for the same we don't want to install tentacles on DB server we want to use the same connection string which is already configured for our web application. We have just created DB user with DDL access(Create,Alter..).

As for our web environment we have multiple VM in environment so we don't want to execute the script on multiple environment.

with "Deploy Package" step on octopus we are not getting any option where we can configure to execute the package on octopus server.

Please share your thoughts on the same.

2

There are 2 best solutions below

4
On

2 options:

  • As @JaydenPlatell mentioned, Run a script step and then you can select the feed and package. Though in that case your deployment script has to be part of the package itself.
  • Have a tentacle installed on 1 deployment machine (for example could be the same as Octopus Server). Give it a role of "DB deployer" or similar and use it for deploying. Benefit of this is that you can have one DB deploy" Script module shared for different deployment projects.
0
On

Disclaimer: I am an Octopus employee.

I'd recommend using the "Run a script" step rather than "Deploy a package" for your SQL deployment. This step allows you to run the script on the Octopus server, and the script can still be inside a package.

Feel free to also reach out to us at our usual support channels such as our support forum or email. Details at https://octopus.com/support