Skip to content

Commit

Permalink
Merge branch 'main' into dg/update-control-center-manage-subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-gordon-octopus authored Jan 9, 2025
2 parents a32b2ac + 93129c8 commit 77061b7
Show file tree
Hide file tree
Showing 21 changed files with 1,067 additions and 1,248 deletions.
4 changes: 3 additions & 1 deletion dictionary-octopus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ALLUSERSPROFILE
anglin
Anglin
anotherdir
Antiforgery
apikey
apikeys
APPNAME
Expand Down Expand Up @@ -96,6 +97,7 @@ Dockerfiles
dockerhub
Domainname
DONTVALIDATEPATH
DPAPI
dpkg
dryrun
Dspring
Expand Down Expand Up @@ -396,7 +398,7 @@ SSPI
SSRS
statefulset
statefulsets
stepsprodpackages.blob.core.windows.net
stepsprodpackages
sthumb
strconv
struct
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"watch": "onchange 'src/**/*.{js,mjs,ts,astro,css}' 'public/docs/js/**/*.js' 'public/docs/css/**/*.css' -- prettier --write --plugin=prettier-plugin-astro {{changed}}"
},
"dependencies": {
"@astrojs/mdx": "^2.3.1",
"@pnpm/exe": "^9.13.0",
"astro": "^4.16.12",
"astro-accelerator-utils": "^0.3.28",
"cspell": "^8.16.0",
"@astrojs/mdx": "^4.0.1",
"@pnpm/exe": "^9.15.0",
"astro": "^5.0.3",
"astro-accelerator-utils": "^0.3.32",
"cspell": "^8.16.1",
"glob": "^11.0.0",
"gray-matter": "^4.0.3",
"hast-util-from-selector": "^3.0.0",
"hast-util-from-selector": "^3.0.1",
"html-to-text": "^9.0.5",
"keyword-extractor": "^0.0.28",
"optional": "^0.1.4",
Expand All @@ -39,12 +39,12 @@
"sharp": "^0.33.5"
},
"devDependencies": {
"@playwright/test": "^1.48.2",
"csv-parse": "^5.5.6",
"@playwright/test": "^1.49.0",
"csv-parse": "^5.6.0",
"npm-run-all": "^4.1.5",
"onchange": "^7.1.0",
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.13.0"
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1"
},
"pnpm": {
"overrides": {
Expand Down
2,185 changes: 998 additions & 1,187 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/layouts/Author.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// warning: This file is overwritten by Astro Accelerator
import type { Frontmatter } from 'astro-accelerator-utils/types/Frontmatter';
import Author from '@layouts/Author.astro';
import AuthorLayout from '@layouts/Author.astro';
// Properties
Expand All @@ -13,6 +13,6 @@ type Props = {
const { frontmatter, headings } = Astro.props satisfies Props;
---

<Author frontmatter={frontmatter} headings={headings}>
<AuthorLayout frontmatter={frontmatter} headings={headings}>
<slot />
</Author>
</AuthorLayout>
5 changes: 1 addition & 4 deletions src/layouts/Default.astro
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ const search =
const searchUrl = search && accelerator.urlFormatter.formatAddress(search.url);
const isSearchPage =
accelerator.urlFormatter.formatAddress(Astro.url.pathname) === searchUrl;
console.log(
accelerator.urlFormatter.formatAddress(Astro.url.pathname),
searchUrl
);
const showSearch = !isSearchPage;
---

Expand Down
6 changes: 3 additions & 3 deletions src/layouts/Redirect.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// warning: This file is overwritten by Astro Accelerator
import type { Frontmatter } from 'astro-accelerator-utils/types/Frontmatter';
import Redirect from '@layouts/Redirect.astro';
import RedirectLayout from '@layouts/Redirect.astro';
// Properties
type Props = {
Expand All @@ -12,6 +12,6 @@ type Props = {
const { frontmatter, headings } = Astro.props satisfies Props;
---

<Redirect frontmatter={frontmatter} headings={headings}>
<RedirectLayout frontmatter={frontmatter} headings={headings}>
<slot />
</Redirect>
</RedirectLayout>
9 changes: 4 additions & 5 deletions src/pages/docs/deployments/dotnet/netcore-webapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ASP.NET Core is fast becoming the de-facto web framework in .NET. Compared to ea

If you are new to ASP.NET Core you can start with the [Tutorial: Get Started ASP.Net Core tutorial](https://docs.microsoft.com/en-us/aspnet/core/getting-started/?view=aspnetcore-5.0).

## Publishing and packing the website {#DeployingASP.NETCoreWebApplications-PublishingandPackingtheWebsite}
## Publishing and packing the website {#publishing-and-packing-the-website}

When your application is ready, it needs to be published:

Expand All @@ -29,7 +29,7 @@ octo pack --id MyApp.Web --version 1.0.0 --basePath published-app

For more information about packaging applications see [Creating packages using the Octopus CLI](/docs/packaging-applications/create-packages/octopus-cli).

If you are using the [built-in repository](/docs/packaging-applications/package-repositories/built-in-repository/#pushing-packages-to-the-built-in-repository) you can create a [zip file](/docs/packaging-applications/create-packages/octopus-cli/#create-zip-packages).
If you are using the [built-in repository](/docs/packaging-applications/package-repositories/built-in-repository/#pushing-packages-to-the-built-in-repository) you can create a [zip file](/docs/packaging-applications/create-packages/octopus-cli#create-zip-packages).

When you have your generated nupkg or zip file it needs to be [pushed to a repository](/docs/packaging-applications/package-repositories).

Expand All @@ -54,7 +54,7 @@ When running under IIS, ensure the .NET CLR Version is set to `No Managed Code`.

The `.AspNetCore.Antiforgery` cookie created by ASP.NET Core uses the application path to generate its hash. By default Octopus will deploy to a new path every time, which causes a new cookie to be set every deploy. This results in many unneeded cookies in the browser. See this [blog post](http://blog.novanet.no/a-pile-of-anti-forgery-cookies/) for more details. To change this behavior, set the Antiforgery token in your `startup.cs` like this:

```
```csharp
public void ConfigureServices(IServiceCollection services)
{
services.AddAntiforgery(opts => opts.CookieName = "AntiForgery.MyAppName");
Expand All @@ -65,7 +65,7 @@ public void ConfigureServices(IServiceCollection services)

Similar to antiforgery cookies, cookie authentication in ASP.NET Core 2 uses Microsoft's data protection API (DPAPI) which can use the application path to isolates applications from one another. This can cause older cookies to simply not work. To change this behavior, you need to set the application name in your `startup.cs` like this:

```
```csharp
public void ConfigureServices(IServiceCollection services)
{
services.AddDataProtection().SetApplicationName("my application");
Expand All @@ -76,7 +76,6 @@ public void ConfigureServices(IServiceCollection services)

Refer to [structured configuration variables](/docs/projects/steps/configuration-features/structured-configuration-variables-feature) on how to setup configuration.


## Learn more

- Generate an Octopus guide for [ASP.NET Core and the rest of your CI/CD pipeline](https://octopus.com/docs/guides?application=ASP.NET%20Core).
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ navOrder: 1

The sample project for this guide is the [Angular project template with ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/client-side/spa/angular?view=aspnetcore-2.1) application. The template consists of an ASP.NET Core project to act as an API backend and an Angular CLI project to act as a UI. The base project has been modified slightly to host the Angular CLI project outside of the ASP.NET Core project to enable us to configure NGINX both as a reverse proxy to the ASP.NET Core project while also serving the Angular CLI project as static content from the file system.

## Upload the package to the built-in repository {#Create&PushASP.NETCoreProject-Uploadthepackagetothebuilt-inrepository}
## Upload the package to the built-in repository

Firstly we need to make the package available for Octopus to deploy.

:::div{.success}
We've crafted and packaged v1.0.0 of this sample application for you to try out (see the link below). Alternatively you can create your own application and [package the application](/docs/packaging-applications) yourself to try it out. Click [here](#Create&PushASP.NETCoreProject-PublishingandPackingtheWebsite) for steps to publish and package the ASP.NET Core project.
We've crafted and packaged v1.0.0 of this sample application for you to try out (see the link below). Alternatively you can create your own application and [package the application](/docs/packaging-applications) yourself to try it out. Click [here](#publishing-and-packing-the-website) for steps to publish and package the ASP.NET Core project.
:::

1. Download [NginxSampleWebApp.1.0.0.zip](/docs/attachments/nginxsamplewebapp.1.0.0.zip).
2. [Upload it to the Octopus Built-In repository](/docs/packaging-applications/package-repositories/built-in-repository/#pushing-packages-to-the-built-in-repository) (you can do this by going to **Library ➜ Packages** and clicking the **Upload package** button).

## Publishing and packing the website {#Create&PushASP.NETCoreProject-PublishingandPackingtheWebsite}
## Publishing and packing the website {#publishing-and-packing-the-website}

```powershell
# Publish the application to a folder
Expand All @@ -31,7 +31,7 @@ octo pack --id NginxSampleWebApp --version 1.0.0 --basePath published-app
```

:::div{.hint}
If you are using the built-in repository, you can create a [zip file](/docs/packaging-applications/create-packages/octopus-cli/#create-zip-packages) instead. The generated nupkg or zip file should then be then be [pushed to a repository](/docs/packaging-applications/package-repositories).
If you are using the built-in repository, you can create a [zip file](/docs/packaging-applications/create-packages/octopus-cli#create-zip-packages) instead. The generated nupkg or zip file should then be then be [pushed to a repository](/docs/packaging-applications/package-repositories).
:::

## Learn more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ which results in the server retrieving that file, at the end of that step. Keep

The package and any supporting deployment files are uploaded via SFTP.

## File footprint {#SSHTargets-Footprint}
## File footprint

- The root directory for all Octopus work is `$HOME/.octopus`
- All packages are deployed to a relative location at `$HOME/.octopus/Applications/#{instance}/#{environment}/#{package}/#{version}`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Before you install Tentacle, review the software and hardware requirements depen
- [Versions prior to Tentacle 3.1](/docs/infrastructure/deployment-targets/tentacle/windows/requirements/legacy-requirements).
- Linux [system prerequisites](/docs/infrastructure/deployment-targets/linux/#requirements)


## Communication mode

Tentacles can be configured to communicate in Listening mode or Polling mode. Listening mode is the recommended communication style. Learn about the differences between the two modes and when you might choose to use Polling mode instead of Listening mode on the [Tentacle communication](/docs/infrastructure/deployment-targets/tentacle/tentacle-communication) page.
Expand All @@ -37,8 +36,9 @@ Tentacles can be configured to communicate in Listening mode or Polling mode. Li
## Configure a Listening Tentacle (recommended)

To install and configure Tentacles in listening mode, see either:
- The [Windows Listening Tentacle installation docs](/docs/infrastructure/deployment-targets/tentacle/windows/#configure-a-listening-tentacle-recommended).
- The [Linux Tentacle Automation scripts](/docs/infrastructure/deployment-targets/tentacle/linux/#automation-scripts), selecting the tab for either a Listening deployment target or worker for your Linux distro.

- The [Windows Listening Tentacle installation docs](/docs/infrastructure/deployment-targets/tentacle/windows/#configure-a-listening-tentacle-recommended).
- The [Linux Tentacle Automation scripts](/docs/infrastructure/deployment-targets/tentacle/linux/#automation-scripts), selecting the tab for either a Listening deployment target or worker for your Linux distro.

### Update your Tentacle firewall

Expand All @@ -53,19 +53,21 @@ Don't forget to allow access in any intermediary firewalls between the Octopus S
Listening Tentacles are recommended, but there might be situations where you need to configure a Polling Tentacle. You can learn about the difference between Listening Tentacles and Polling Tentacles on the [Tentacle communication](/docs/infrastructure/deployment-targets/tentacle/tentacle-communication) page.

To install and configure Tentacles in polling mode, see either:
- The [Windows Polling Tentacle installation docs](/docs/infrastructure/deployment-targets/tentacle/windows/#configure-a-polling-tentacle).
- The [Linux Tentacle Automation scripts](/docs/infrastructure/deployment-targets/tentacle/linux/#automation-scripts), selecting the tab for either a Polling deployment target or worker for your Linux distro.

- The [Windows Polling Tentacle installation docs](/docs/infrastructure/deployment-targets/tentacle/windows#configure-a-polling-tentacle).
- The [Linux Tentacle Automation scripts](/docs/infrastructure/deployment-targets/tentacle/linux/#automation-scripts), selecting the tab for either a Polling deployment target or worker for your Linux distro.

### Update your Octopus Server firewall

To allow Tentacle to connect to your Octopus Server, you'll need to allow access to port **10943** on the Octopus Server (or the port you selected during the installation wizard - port 10943 is just the default). You will also need to allow Tentacle to access the HTTP Octopus Web Portal (typically port **80** or **443** - these bindings are selected when you [install the Octopus Server](/docs/installation)).

If your network rules only allow port **80** and **443** to the Octopus Server, you can either:

- Change the server bindings to either HTTP or HTTPS and use the remaining port for polling Tentacle connections.
- The listening port Octopus Server uses can be [changed from the command line](/docs/octopus-rest-api/octopus.server.exe-command-line/configure) using the `--commsListenPort` option.
Even if you do use port **80** for Polling Tentacles, the communication is still secure.
- Use a reverse proxy to redirect incoming connections to the Tentacle listening port on Octopus Server by differentiating the connection based on Hostname (TLS SNI) or IP Address
- The polling endpoint Tentacle uses can be [changed from the command line](/docs/infrastructure/deployment-targets/tentacle/polling-tentacles-over-port-443/#self-hosted) using the `--server-comms-address` option.
- The polling endpoint Tentacle uses can be [changed from the command line](/docs/infrastructure/deployment-targets/tentacle/polling-tentacles-over-port-443/#self-hosted) using the `--server-comms-address` option.
- You can learn about this configuration on the [Polling Tentacles over standard HTTPS port](/docs/infrastructure/deployment-targets/tentacle/polling-tentacles-over-port-443) page.

Note that the port used to poll Octopus for jobs is different to the port used by your team to access the Octopus Deploy web interface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ When choosing a communication mode, we recommend Listening mode when possible.
Listening mode uses the least resources (listening on a TCP port is cheaper than actively trying to connect to one). It also gives you the most control (you can use rules in your firewall to limit which IP addresses can connect to the port). [Octopus and Tentacle use SSL when communicating](/docs/security/octopus-tentacle-communication), and Tentacle will outright reject connections that aren't from an Octopus Server that it trusts, identified by an X.509 certificate public key that you provide during setup.

To install and configure Tentacles in listening mode, see either:
- The [Windows Listening Tentacle installation docs](/docs/infrastructure/deployment-targets/tentacle/windows/#configure-a-listening-tentacle-recommended).
- The [Linux Tentacle Automation scripts](/docs/infrastructure/deployment-targets/tentacle/linux/#automation-scripts), selecting the tab for either a Listening deployment target or worker for your Linux distro.

- The [Windows Listening Tentacle installation docs](/docs/infrastructure/deployment-targets/tentacle/windows/#configure-a-listening-tentacle-recommended).
- The [Linux Tentacle Automation scripts](/docs/infrastructure/deployment-targets/tentacle/linux/#automation-scripts), selecting the tab for either a Listening deployment target or worker for your Linux distro.

## Polling Tentacles

Expand All @@ -44,8 +45,9 @@ The advantage to Polling mode is that you don't need to make any firewall change
Polling mode is good for scenarios that involve Tentacles being behind NAT or a dynamic IP address. A good example might be servers at branch offices or a chain of retail stores, where the IP address of each server running Tentacle changes.

To install and configure Tentacles in polling mode, see either:
- The [Windows Polling Tentacle installation docs](/docs/infrastructure/deployment-targets/tentacle/windows/#configure-a-polling-tentacle).
- The [Linux Tentacle Automation scripts](/docs/infrastructure/deployment-targets/tentacle/linux/#automation-scripts), selecting the tab for either a Polling deployment target or worker for your Linux distro.

- The [Windows Polling Tentacle installation docs](/docs/infrastructure/deployment-targets/tentacle/windows#configure-a-polling-tentacle).
- The [Linux Tentacle Automation scripts](/docs/infrastructure/deployment-targets/tentacle/linux#automation-scripts), selecting the tab for either a Polling deployment target or worker for your Linux distro.

## SSL offloading is not supported

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ dotnet publish ./OctoWeb.csproj --output ./dist
dotnet octo pack ./dist --id="OctoWeb" --version="1.0.0"
```

Please refer to [Microsoft's publish and packing](/docs/deployments/dotnet/netcore-webapp/#DeployingASP.NETCoreWebApplications-PublishingandPackingtheWebsite) documentation for more information.
Please refer to [Microsoft's publish and packing](/docs/deployments/dotnet/netcore-webapp/#publishing-and-packing-the-website) documentation for more information.

## Packaging a .NET Core library

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: src/layouts/Default.astro
pubDate: 2023-01-01
modDate: 2024-09-16
modDate: 2024-12-16
title: Unsupported Configuration as Code Scenarios
description: Unsupported scenarios for the Configuration as Code feature in Octopus Deploy.
icon: fa-brands fa-git-alt
Expand Down Expand Up @@ -92,4 +92,8 @@ Configuration as Code is an all-or-nothing feature. You'll be unable to say mana

Use the [Octopus Terraform Provider](https://registry.terraform.io/providers/OctopusDeployLabs/octopusdeploy/latest/docs) to create a deployment process template. Use Terraform's [variable functionality](https://www.terraform.io/language/values/variables) to manage the different projects. For example, have a variable for target roles; one project has **OctoFX-WebApi** while another uses **RandomQuotes-WebApi**.

One advantage to this approach is the flexibility to decide what resources are managed by the Terraform Provider and what resources are managed by users in the Octopus UI. The downside to this approach is you'll be unable to use the Octopus Deploy UI to manage your deployment processes. In addition, you'll need to convert your existing deployment process into Terraform manually. The files generated by Configuration as Code has a similar syntax as the Terraform provider, but it is not a 1:1 match.
One advantage to this approach is the flexibility to decide what resources are managed by the Terraform Provider and what resources are managed by users in the Octopus UI. The downside to this approach is you'll be unable to use the Octopus Deploy UI to manage your deployment processes. In addition, you'll need to convert your existing deployment process into Terraform manually. The files generated by Configuration as Code has a similar syntax as the Terraform provider, but it is not a 1:1 match.

## Submodules

Submodules are a convenient way to reference one repository from within a subdirectory of another repository. Octopus currently does not support the use of submodules for the storing of Configuration as Code files. This means that your configuration files must all be stored directly in the connected repository.
Loading

0 comments on commit 77061b7

Please sign in to comment.