Deploying a package to a Worker to be able to deploy a database (dacpac)


(doug.bloch) #1

So I may have missed this, but I’m attempting to use “deploy package” and the community step “Deploy Dacpac” as my 2 steps in the process. Since this is a database deployment I’d prefer to run the deployments all via a worker since the machine really isn’t the destination of the database. I don’t want to (can’t - company policy) run a tentacle on the SQL servers.

I’m unable to figure out how to deploy the Octopus Package (contents dacpac) to the Worker machine.

I’m running Octopus 2018.9.4.


(Jim Burger) #2

Hi @dougbloch

Apologies for the delay in our response to you. Thanks for reaching out with your question in regards to database deployments using dacpacs. There are many database related circumstances that prevent the installation of a tentacle so you are not alone in this.

We do have some advice regarding deployments to databases - we currently recommend setting up a tentacle on a ‘jump box’ https://octopus.com/docs/deployment-examples/sql-server-databases#SQLServerdatabases-Tentacles rather than using workers at this stage.

While you could use workers for this, there are some limitations to using workers here at the moment:

  • At the moment they you would need to stick with SQL authentication only
  • Workers don’t yet support scoped variables
    • We are in the process of adding this ability to allow you to scope different credentials for different worker pools / environments

In terms of the mechanics of getting the dacpac to where ever you need it, the following blog post shows an example of how to do it from first principles but in essence it could be as simple as zipping up the dacpac and uploading that to Octopus Deploy. Another approach could be to use a network share and a simple file copy operation from the run a script step.

We also now support referencing packages in the run a script step which can reduce the number of steps you need - now you can have the dacpac and powershell script all in the one step.

I hope this helps you, let me know if there is any further information I can get you.

Kind regards,


(system) #3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.