-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continuous Integration Publish: fc026a7
(build) Running into issue with Cake.Git cake-contrib/Cake_Git#77 Since there are only new/deleted files in this commit, need to ignore this check for now, and add it back in afterwards.
- Loading branch information
Showing
58 changed files
with
14,393 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,231 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta name="description" content=""> | ||
<meta name="author" content=""> | ||
<link rel="shortcut icon" href="/boxstarter.org/favicon.ico"> | ||
|
||
<title>Boxstarter</title> | ||
|
||
<!-- Bootstrap core CSS --> | ||
<link href="/boxstarter.org/assets/css/bootstrap.min.css" rel="stylesheet"> | ||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> | ||
<!--[if lt IE 9]> | ||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> | ||
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> | ||
<![endif]--> | ||
<style> | ||
.jumbotron { | ||
background-color: #fafad2; | ||
background-color: rgba(235, 214, 61, 0.24); | ||
padding-bottom: 10px; | ||
} | ||
|
||
.btn-navbar { | ||
margin-top: 8px; | ||
margin-left:20px; | ||
} | ||
|
||
.twitter-follow-button { | ||
margin-top: 8px; | ||
} | ||
|
||
.px-0 { | ||
padding: 0; | ||
} | ||
|
||
|
||
|
||
</style> | ||
</head> | ||
|
||
<body> | ||
|
||
<div class="navbar navbar-default" role="navigation"> | ||
<div class="container"> | ||
<div class="navbar-header"> | ||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> | ||
<span class="sr-only">Toggle navigation</span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
<a class="navbar-brand" href="/boxstarter.org/">Boxstarter</a> | ||
</div> | ||
<div class="navbar-collapse collapse"> | ||
<ul class="nav navbar-nav"> | ||
<li><a href="/boxstarter.org/WhyBoxstarter">Docs</a></li> | ||
<li class="active"><a href="/boxstarter.org/Learn/WebLauncher">Learn</a></li> | ||
<li><a href="https://github.com/chocolatey/boxstarter/issues">Issues</a></li> | ||
<li><a href="https://groups.google.com/forum/#!forum/boxstarter">Discussion</a></li> | ||
<li><a href="https://github.com/chocolatey/boxstarter">Source Code</a></li> | ||
<li><a href="/boxstarter.org/Blog">Blog</a></li> | ||
<li><a href="/boxstarter.org/License">License</a></li> | ||
</ul> | ||
<a class="btn btn-primary btn-navbar" role="button" href="/boxstarter.org/downloads/Boxstarter.2.13.0.zip"><span class="glyphicon glyphicon-cloud-download"></span> Download v2.13.0</a> | ||
</div><!-- /.nav-collapse --> | ||
</div><!-- /.container --> | ||
</div><!-- /.navbar --> | ||
|
||
|
||
|
||
<div class="container"> | ||
|
||
|
||
|
||
<div class="row"> | ||
<div class="col-sm-3" id="sidebar"> | ||
<div class="navbar" role="navigation"> | ||
<button type="button" class="btn btn-secondary center-block visible-xs" data-toggle="collapse" data-target=".navbar-left"> | ||
Table of Contents | ||
<span class="caret"></span> | ||
</button> | ||
<div class="navbar-collapse navbar-left px-0 collapse"> | ||
<div class="list-group"> | ||
<a href="/boxstarter.org/Learn/WebLauncher" class="list-group-item">Run with a Gist</a> | ||
<a href="/boxstarter.org/Learn/SimplePackage" class="list-group-item">Simple package creation</a> | ||
<a href="/boxstarter.org/Learn/RemotePackageWithArtifacts" class="list-group-item active">Deploying a web application remotely</a> | ||
</div> | ||
</div><!-- /.nav-collapse --> | ||
</div><!-- /.navbar --> | ||
</div> | ||
<div class="col-sm-9" role="main"> | ||
<div class="media"> | ||
<div class="media-body"> | ||
|
||
<h1>Installing web services and deploying a web application to a remote server</h1> | ||
<p class="lead">Sometimes a package may contain more than just a nuspec file and an install script. You may also want to install the package onto a remote machine.</p> | ||
<p class="lead"><span class="text-primary">Boxstarter can create a template package targeting an existing directory and install the package on any machine open to WINRM or WMI remoting.</span></p> | ||
|
||
</div> | ||
<div class="media-right"> | ||
<img class="media-object" src="/boxstarter.org/assets/images/boxLogo_sm.png" /> | ||
</div> | ||
</div> | ||
|
||
<p>This walk through will create a NuGet ODATA feed application and deploy it to a remote server after enabling web services on the server.</p> | ||
|
||
<h3>Step 1</h3> | ||
<h4><span class="text-primary">Create and Build the NuGet server</span></h4> | ||
<p>Create an empty Web Application in Visual Studio and add a NuGet reference to NuGet.Server. After the package install completes, build the solution. NOTE: This can be performed with the free Visual Studio Express for Web which can be installed via Chocolatey - <code>cinst VisualStudio2013ExpressWeb</code>.</p> | ||
<img class="img-responsive" src="/boxstarter.org/assets/images/NugetServer.png"> | ||
|
||
<h3>Step 2</h3> | ||
<h4><span class="text-primary">Install Boxstarter</span></h4> | ||
<p>If you have Chocolatey:</p> | ||
<pre>CINST Boxstarter</pre> | ||
<p>Otherwise, click on the download link at the top of this page and run the Setup.bat file. See <a href="/boxstarter.org/InstallBoxstarter">Installing Boxstarter</a> for details.</p> | ||
|
||
<h3>Step 3</h3> | ||
<h4><span class="text-primary">Invoke the Boxstarter shell</span></h4> | ||
<img class="img-responsive" src="/boxstarter.org/assets/images/shortcut.png"> | ||
<p>The Boxstarter install creates a shortcut to a shell that provides the easiest way to access Boxstarter commands especially if you are not familiar with PowerShell. See <a href="/boxstarter.org/UsingBoxstarter">Using Boxstarter Commands</a> for information about running Boxstarter in your own shell.</p> | ||
|
||
<h3>Step 4</h3> | ||
<h4><span class="text-primary">Create the Package</span></h4> | ||
<p>Lets assume that you saved the above Visual Studio project to c:\dev\NugetServer. You can now create a package with the artifacts of this project embedded in the package:</p> | ||
<pre> | ||
New-BoxstarterPackage -Name NugetServer | ||
Copy-Item c:\dev\NugetServer "$($Boxstarter.LocalRepo)\NugetServer" -Recurse -Force | ||
</pre> | ||
<p>This creates a skeleton Chocolatey package with the contents of your NugetServer application embedded in the package. You will need to complete the ChocolateyInstall.ps1 file.</p> | ||
|
||
<h3>Step 5</h3> | ||
<h4><span class="text-primary">Add installation details to ChocolateyInstall.ps1</span></h4> | ||
<p>Boxstarter has created a skeletal ChocolateyInstall.ps1 file at $($Boxstarter.LocalRepo)\NugetServer\tools\chocolateyInstall.ps1. Edit this file and replace its contents with the following script:</p> | ||
<pre> | ||
try { | ||
cinst DotNet4.5 | ||
|
||
#Enable Web Services | ||
cinst IIS-WebServerRole -source WindowsFeatures | ||
cinst IIS-ISAPIFilter -source WindowsFeatures | ||
cinst IIS-ISAPIExtensions -source WindowsFeatures | ||
|
||
#Enable ASP.NET on win 2012/8 | ||
cinst IIS-NetFxExtensibility45 -source WindowsFeatures | ||
cinst NetFx4Extended-ASPNET45 -source WindowsFeatures | ||
cinst IIS-ASPNet45 -source WindowsFeatures | ||
|
||
#Enable ASP.NET on win 7/2008R2 | ||
."$env:windir\microsoft.net\framework\v4.0.30319\aspnet_regiis.exe" -i | ||
|
||
#clean and create application | ||
Remove-Item c:\web\NugetServer -Recurse -Force -ErrorAction SilentlyContinue | ||
Mkdir c:\web\NugetServer -ErrorAction SilentlyContinue | ||
Copy-Item "$(Join-Path (Get-PackageRoot $MyInvocation ) NugetServer)\*" c:\web\NugetServer -Recurse -Force | ||
Import-Module WebAdministration | ||
Remove-WebSite -Name "Default Web Site" -ErrorAction SilentlyContinue | ||
Remove-WebSite -Name NugetServer -ErrorAction SilentlyContinue | ||
New-WebSite -ID 1 -Name NugetServer -Port 80 -PhysicalPath c:\web\NugetServer -Force | ||
|
||
#Client SKUs need to enable firewall | ||
netsh advfirewall firewall add rule name="Open Port 80" dir=in action=allow protocol=TCP localport=80 | ||
|
||
Write-ChocolateySuccess 'NugetServer' | ||
} catch { | ||
Write-ChocolateyFailure 'NugetServer' $($_.Exception.ToString()) | ||
throw | ||
} | ||
</pre> | ||
<p>This script enables the minimum IIS features for the application to run, copies the application to the computer installing the package, creates a web application in IIS to point to the application directory and allows http traffic through the firewall.</p> | ||
|
||
<h3>Step 6</h3> | ||
<h4><span class="text-primary">Build the package</span></h4> | ||
<p>We need to build our package script and application files into a single .nupkg file. Run:</p> | ||
<pre>Invoke-BoxstarterBuild -Name NugetServer</pre> | ||
|
||
<h3>Step 7</h3> | ||
<h4><span class="text-primary">Ensure PowerShell Remoting is enabled on the target machine</span></h4> | ||
<p>In many cases this step is unnecessary. If you are using either the builtin administrator account or a domain account with admin privileges on a server operating system, remoting is on by default. Otherwise, run the following command on the machine with a user who has admin privileges:</p> | ||
<pre>Enable-PSRemoting -Force</pre> | ||
|
||
<h3>Step 8</h3> | ||
<h4><span class="text-primary">Install the package on the target</span></h4> | ||
<p>Now we are ready to enable IIS services and deploy the application. We will create a PSCredential object and invoke the install:</p> | ||
<pre> | ||
$Creds = Get-Credential administrator | ||
Install-BoxstarterPackage -ComputerName MyMachine -PackageName NugetServer -Credential $creds -Force | ||
</pre> | ||
|
||
<h3>Step 9</h3> | ||
<h4><span class="text-primary">Run the application</span></h4> | ||
<p>Now we should be able to browse to our NuGet server application at http://MyServer</p> | ||
<img class="img-responsive" src="/boxstarter.org/assets/images/NugetServerWeb.png"> | ||
|
||
</div> | ||
</div> | ||
|
||
<hr> | ||
|
||
<footer> | ||
<p>© 2018 - 2020 <a href="https://chocolatey.org">Chocolatey Software, Inc</a></p> | ||
<p>© 2012 - 2018 <a href="https://www.hurryupandwait.io/">Matt Wrock</a></p> | ||
</footer> | ||
</div> <!-- /container --> | ||
|
||
|
||
<!-- Bootstrap core JavaScript | ||
================================================== --> | ||
<!-- Placed at the end of the document so the pages load faster --> | ||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> | ||
<script src="/boxstarter.org/assets/js/bootstrap.min.js"></script> | ||
<script type="text/javascript"> | ||
|
||
var _gaq = _gaq || []; | ||
_gaq.push(['_setAccount', 'UA-39271380-1']); | ||
_gaq.push(['_setDomainName', 'boxstarter.org']); | ||
_gaq.push(['_trackPageview']); | ||
|
||
(function() { | ||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | ||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | ||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | ||
})(); | ||
|
||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.