How to deploy SSIS project along with Environment variables in one step - deployment

I want to deploy my SSIS project using sql server on UAT , PROD server
I am already having project successfully implemented in DEV server.
I know we can deploy project using :
step 1 : export project from DEV server(integration service catalog-> SSISDB-> project_Name-> Projects
step 2: deploy on UAT server
step 3 : run scripts for creating environment setting
step 4 : run scripts to assign them to Environment variables
I am expecting something using which i will be able to export both project and its environments from DEV server and then import both on UAT server in 1 step.
any suggestions will be helpful

You can create a UAT version of your package in visual studio and build it which will create an .ispac file with UAT values for all your variables.
Then in one step you can deploy the .ispac file to your UAT server, creating the project, packages and environment variables all at once.

Related

Azure DevOps deploy Angular app to IIS with Octopus

I'm trying to deploy a Angular application to my IIS server using Octopus and Azure DevOps
My application has multiple environments, each environment with it's own settings (config.prod.json)
What I want to do
Basically Octopus should take the release from Azure DevOps, and copy the release to multiple folders, with different config.prod.json files.
Each folder corresponds to a specific IIS website.
Azure DevOps pipeline setup
Use Node 14.x
npm install
ng build --prod
Archive dis/angular-app ; Archive type: zip
Publish Artifact; Path $(Build.ArtifactStagingDirectory)
Triggers : Enable continuous integration
Azure DevOps Releases setup
1. Package Application for Octopus
2. Push Package(s) to Octopus
3. Create Octopus Release
Octopus setup
One step DEPLOY TO IIS
1. Package details
2. Custom Installation Directory
[![enter image description here][5]][5]
3. IIS Web Site and Application Pool
Errors
In IIS while I click Binding, Basic settings, I get this error: There was an error while performing this operation. The parameter is incorrect
Also, the folder mapped in iis for the website that I'm targeting. Contains a folder drop with the zip file 27.zip (27 is the release id)
How do I unzip the zip file?
How do I replicate the zip file to the other environments?
Is my configuration ok so far? What am I doing wrong?
Just a few of the links that I've checked:
https://octopus.com/docs/guides/deploy-aspnetcore-app/to-iis/using-octopus-onprem-azure-devops-builtin
https://www.youtube.com/watch?v=NFqrWsUPCAM&t=345s
https://www.youtube.com/watch?v=oeNYtYuhZQ4&t=2s

How to avoid bundling build outputs for each environment separately

I have multiple repositories, each with separate build. In VSTS release tasks, I bundle the build outputs into single ZIP, that I then deploy to multiple environments:
For the bundling I have created Task Group that I share among all environments, but it is not necessary to bundle it again and again for each environment.
It is possible to bundle it once and deploy to all environments?
If each environment run on different agent machines, you should bundle build artifacts in each environment separately.
If all the environments run on the same agent machine and if it’s ok for you to run all the environments sequentially, you can bundle build artifacts in the first environment, and then use the bundled artifacts in the following environments directly. Detail steps for changing the release definition as below:
Set Staging environment’s pre-deployment conditions
Select Development environment for After environment option, so that after deploying Development environment, Staging environment will be triggered.
Select skip download of artifacts option for the following environments
If you bundle the artifacts in Development environment, you should select skip download of artifacts option for the following environments (as Staging and Production environment in your case).

VSTS deployment from private agent in one network environment to on-premises server in other environment

Have 2 environments
1) Staging
2) Production and both these are in different network.
have created a private agent on one servers in the staging environment.
Have implemented CI-CD for the staging environment. Now I need to deploy the artifacts from staging to production environment.
As both the environments are in different network, how can I use the same private agent of staging environment to deploy the code in the production.
There is no difference between your networks for VSTS. That depends from your private agent. I see two ways for your situation:
Provide access for your private agent to production network and create steps for remote deployment.
Register second private agent in production network and update production environment definition to use it:
Is the destination system[production] accessible from source[Staging]?
If accessible, you can add an copy task like [Windows machine file copy / Copy Files Over SSH / FTP upload / Publish Build Artifacts /..] to your destination machine/File share. Release would proceed from here as usual
If not, you could use Hosted agent for CI and point your artifacts to drop folder of your source code. Later in Release, you can select the artifact drop folder as input something like [$(System.DefaultWorkingDirectory)/MyApplication/drop] and deploy to your required location in destination.
This is how I achieved the deployment:
1) In the staging environment build definition, added a copy task. This task copied the artifacts to the shared production drop folder.
2) Created a new production agent in prod environment.
3) The release definition has powershell task which pick up the desired files from the drop folder and does the deplyment.
4) This way both the environments are remain separated, except the drop folder.

Triggering Octopus deploy when files are available

I am currently doing an Octopus project using which I am trying to automate the below process,
Copy the installation files from the folder (TFS automatically drops the new builds to this place) to the octopus tentacle
Install and configure the application
Run the automated tests created using SOAP UI pro on the installed product
Send mail notifications to the user
Revert back the machine/Uninstalling the application
I have implemented all the above process using power shell in Octopus deploy. Only thing I am missing is the trigger process for project.
Requirement: Trigger the Octopus project containing above processes once a new build is created in TFS or new build is placed in the folder
There are two actions to "Trigger" Octopus Deploy to perform the steps defined in the project process, that can be initialised in a number of ways
Using the UI
1) Create a release
2) Deploy the release.
Using the API
1) Create a release and then instruct that release to be deployed to an environment (the important switch here is --deployto)
octo.exe create-release --server http://xxx --apikey SECRET --project xxx --version x.x.x --packageversion=x.x.x --deployto PRODUCTION
Note: this can also be done in two steps
Using Lifecycles
1) Create a release manually or using the API
2) Allow lifecycles to control what happens in environments when a release is created
Octopus Lifecycles Documentation
Hope this helps
You need to have the TFS build server upload newly built nuget packages to the Octopus Deploy server and create a Release post build.
https://octopus.com/blog/using-octopus-and-tfs-builds

How you deploy your reports (with Reporting Services)

Which one you choose?
Use the Deploy feature in VS
Build a rss script and execute it through rs.exe
Build a deployment package
Another option
Keep in mind that in many of your environments the report developers/designers don't have publish role in Reporting Server.
In Dev, we use the deploy feature in VS.
In Prod, our Prod support team will either upload them manually from the ReportServer website (if it's just one or two reports) or use a simple report upload utility that we wrote. The utility uses the SSRS web service.
For the developers we have a custom built ReportDeployer where we choose what environment to deploy to (development, test, production) and branch to deploy from (also development, test, production). There is a config file with all the reports available for deployment along with their directory structure. For production builds, the ReportDeployer has a command line interface and our build script pulls the latest reports from the Prod branch in TFS, then deploys all using our custom app.
Developers can publish to development using the deploy command in visual studio.
Admins move the reports from dev to prd with rsscripter.
We use rss scripts to get all reports from a folder and upload them to the given Report Server.