Tip:
Highlight text to annotate it
X
In this video, I'll show you a very quick and simple way to deploy a web site to a remote IIS server.
Here I have a simple HTML file. The HTML file also uses a CSS file.
I have an Octopus Deploy server, with a Tentacle which I set up earlier.
That Tentacle is running the Microsoft IIS server.
The IIS server currently has a default web site.
To deploy my application, I'll need to package it up.
To do this, I'm going to use the NuGet Package Explorer, which is a tool that makes it easy to create NuGet packages.
First, I edit the metadata of my package, giving it an ID and a version number.
NuGet packages should be write-once. If you ever change a package, you should increment the version number.
There's lots of other metadata you can provide with a NuGet package, but the ID and version are the most important.
Next, I'll need to add content to my package. I'll do this by dragging my content files into NuGet Package Explorer.
You can see that the files are now embedded in the package.
I've created a folder at C:\Packages on my Octopus server which I'll use to store the package.
Now that I have a package, I need to tell Ocotpus about it.
To do this, I'll go to the Configuration tab in the Octopus web portal.
Next, I'll go to the NuGet tab.
I'll click Add feed, and give my feed a name and the path to the feed.
NuGet feeds are typically exposed over HTTP, and you can read more about setting them up in the Octopus documentation.
After adding a feed, we can test whether it works by searching for packages.
My feed works. Let's configure Octopus to deploy this package to my IIS server. I'll start by creating a Project.
A project is a collection of steps that define how to deploy some software, plus configuration variables.
I'll click on the Process tab to define my deployment process.
A deployment process can contain many steps, but for this simple application I'm just going to deploy a NuGet package.
I fill in the details of the step. I need to choose the roles it will be deployed to – in this case, any machine in the web-server role.
I'll also specify the ID of the NuGet package.
A NuGet package step can have features, which lets you perform addition actions on deployment.
Octopus has a bunch of built-in features to make .NET application deployment easier.
For this simple application, we'll use the IIS web site feature to create and configure an IIS web site.
I'll tell Octopus the name of the IIS web site that I want to create; in fact,
I'll go and delete the existing site from IIS, so that Octopus can create a new one.
If a site with the name I specific already exists, that's OK too; Octopus will just reconfigure it.
I'll also enter the name of an application pool that this web site will run under.
When configuring an application pool, I can choose the identity that the pool should run under, including using a custom user account.
I can also configure the bindings – the ports and protocols that the site will listen on.
Lastly, Octopus lets me choose the authentication method to use.
Since this site is so awesome, I'll allow anyone to see it.
Now that I've defined a deployment process, I create a release.
A release is a set of versions of your software that will be deployed together.
You create a release, and then you deploy it to each environment.
Now that I have a release, I can deploy this release to an environment.
When I choose the environment to deploy to, Octopus shows me a preview of which servers each step will run on.
If I choose production, I'll get a warning, because I don't have any production machines in the web-server role at the moment.
Let’s deploy this application!
Woohoo! My deployment completed successfully.
I can view the deployment log – which includes output generated on both the Ocotpus server and any remote machines involved –
to see what actually happened.
Let's see if this worked…
In this video we used NuGet package explorer to create packages manually.
In the next video, we'll look at a tool called OctoPack which is a much better solution for long-term application development.