We are using TeamCity for builds and Octopus for deployment. Octopus uses Deploy.ps1 powershell script for MVC website deployment to IIS.
I am looking for a powershell that can
check if website exists and if not create one
check if appPool exists and if not create one
check if webapplication exists and if not create one with appPool from step2.
Any useful links that show how this deployment can be automated?
Thanks
I think this information might be useful for you.
The IIS Website and Application Pool feature in Octopus allows for a large number of options to be configured during deployment.
..
Web Site
If enabled, Tentacle will use use the PowerShell Web Administration module to attempt to create or modify an IIS Web Site and Application Pool using the settings below.
http://docs.octopusdeploy.com/display/OD/IIS+Websites+and+Application+Pools
Related
I am using azure release pipeline, an i am stuck in IIS web app manage task.
I want to add dynamically IIS website name in Additional appcmd.exe command, but I am not getting how to add it
azure IIS deployment task
I wanted to add a website name without using a hardcore value (myApsSiteName) in Additional appcmd.exe command, for example,
I dont want this way -->delete myApsSiteName
I want this way --> delete Website name
How to add website name without using hardcore website name value?
I am setting up a release for the first time in 2018 Release Management. We have a website that we want deployed to IIS.
The build definition is setup and has created the artifacts. When I setup the release definition I select the IIS Website Deployment template which gives me two tasks.
IIS Web App Manage
IIS Web App Deploy
They seem to cover similar ground, but I cannot find documentation to tell me how they are different. Do I need both?
When I configure IIS Web App Deploy, the Website Name field is grayed out. The link icon tells me
This setting is linked to the 'Website name' (Parameters.WebsiteName)
process parameter.
So I created the process parameter in the release definition and the build definition with a different name. However the Website Name does not update. Is there a way to manually edit this field?
In short:
IIS Web App Manage
This task does provisioning, for example creating an IIS Web Site and Application Pool. Typically this is only needed the first time deploying to a target machine, but there is no harm in running it on every deploy, since it then just skips creating already existing items.
IIS Web App Deploy
This task deploys your code.
You need to create a Deployment Group before using the IIS Website Deployment template. Deployment groups in VSTS/TFS make it easier to organize the servers that you want to use to host your app. A deployment group is a collection of machines with a VSTS/TFS agent on each of them. Each machine interacts with VSTS/TFS to coordinate deployment of your app.
Useful link and blog for your reference:
https://learn.microsoft.com/en-us/vsts/build-release/archive/apps/aspnet/aspnet-from-vsts-to-windows-vm?view=vsts
https://abelsquidhead.com/index.php/2017/11/28/build-and-deploy-to-multiple-iis-servers-and-sql-server-using-vsts/
If you don't want to use this template, you could also try other extensions, such as IIS Web App Deployment Using WinRM.
Both tasks are needed. The website name is set on the Environment level then referenced in all of the tasks within.
I want to host a .Net application on azure VM using IIS. I know the basics of Windows azure like creating a VM & other things.
I want to automate this whole process of creating a VM & hosting an application on IIS on that VM using VSTS (Visual Studio Team System). I know its possible to do it using VSTS (DevOps) also I know basics of VSTS like creating a build definition on it, but I am facing problems in automating my current scenario using DevOps on azure.
All I want to know is how to initiate things like creating VM & installing IIS & hosting application on it automatically using VSTS build steps.
There are a few ways you could go about creating a VM with IIS+App in Azure. To create resources in Azure in an automated workflow, I usually think of using Azure Resource Manager Templates for the configuration. To do that in VSTS, you can take a look at this article.
https://learn.microsoft.com/en-us/azure/vs-azure-tools-resource-groups-ci-in-vsts
There are two ways to use AzureRM templates in VSTS build/release tasks, both are doc'd there. The doc shows how to use an Azure Resource Group project in VSTS, but you could also just pull raw files from github (no project needed).
For a template that creates a VM, installs IIS and installs a web deploy package take a look at this sample:
https://github.com/bmoore-msft/AzureRM-Samples/tree/master/VMDSCWebDeploy
This uses DSC to install IIS, install and start web deploy and deploy a package/app. That will do everything in the DSC script, but you could separate deployment if you wanted to.
That help?
So I've got a scenario where numerous different teams are deploying with octopus to local team boxes. Octopus is used to make the deployment. However I'm facing a problem where octopus is deploying to a separate drive to our IIS pool for our web apps.
Is it possible to set IIS to be configured for the alternative path without disrupting the other applications in the pool. It's not an option to change the deployment location as it would disrupt other groups. Because at the moment we're forced to copy it to the correct location after it deploys to the wrong location.
If you are packaging for msdeploy zip file, you should use common msdeploy options. You should add your octopus project iisapplicationname parameter and give it the specificied pool name with environment names. it will be deployed to the correct folders.
How to deploy azure webjob using Octopus deployment?
For me, octopus says it is deployed to azure but not able to see my webjob under the website.
Can anyone help how to achieve this?
There is a documentation on how to deploy a web job from octopus Azure Web Apps.
I was using Octopus Deploy 3.0 and in my case, I only wanted to deploy a webjob without a web app:
I've chosen Azure Web App Deployment Target:
And in the deployment section, specify the physical path.
For continuous job you can specify a path like that:
For triggered job you can specify a path like that:
have you try to publish your web jobs to your website using Visual Studio?
One way to verify whether your web jobs has been deployed to your website/web app is to access to the Kudu site of your website.
https://.scm.azurewebsites.net/azurejobs/#/jobs
Go to Debug Console (CMD), try to access D:\home\site\wwwroot\App_Data\jobs
and see if there is any web jobs underneath it
You can try using the nuspec to package your artifacts.
Put you web jobs under App_Data\jobs\trigger{webjob} or App_Data\jobs\continuous{webjob} based on your job type.
And then deploy using Octopus, Azure will be able to recognize it.
This might help:
http://blog.amitapple.com/post/74215124623/deploy-azure-webjobs/#.VVRSANNViko
Good luck