Skip to content

Commit

Permalink
Tweak ssh-deployments to reference all external feeds, not just nuget (
Browse files Browse the repository at this point in the history
…#2602)


Co-authored-by: Steve Fenton <99181436+steve-fenton-octopus@users.noreply.github.com>
  • Loading branch information
rain-on and steve-fenton-octopus authored Jan 6, 2025
1 parent 447cba4 commit 126da8d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions dictionary-octopus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ emptytitle
entra
environmentids
eprintfn
esac
expressjs
externalgroups
externalusers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@ If you are writing a cross-platform script, be aware of the differences between
:::div{.hint}
**Bash (and other shell) variables**
Octopus Deploy will log into the SSH target via a non-interactive shell. Because of this, startup files like `.bashrc` are not fully evaluated. If you are referencing bash variables `export`ed in these files, you should move them before the following common code block at the top of the file:
```

```bash
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
```

This will ensure that they are evaluated on non-interactive logins.
:::


### Example: Using variables in Bash

Your script can use a [variable value](/docs/projects/variables) by invoking the `get_octopusvariable` function. For example, to echo out the installation directory call
Expand All @@ -48,17 +49,17 @@ Your script can use a [variable value](/docs/projects/variables) by invoking the
You can also set an [output variable](/docs/projects/variables/output-variables):

> ```
> set_octopusvariable RandomNumber 3
> ```
```bash
set_octopusvariable RandomNumber 3
```

### Example: Collecting an artifact

Your script can tell Octopus to collect a file and store it as a [deployment artifact](/docs/projects/deployment-process/artifacts):

> ```
> new_octopusartifact "./subdir/anotherdir/myfile"
> ```
```bash
new_octopusartifact "./subdir/another_dir/my_file"
```

which results in the server retrieving that file, at the end of that step. Keep in mind that this means the file must be accessible over SFTP using the same credentials as that used during execution.

Expand All @@ -76,11 +77,11 @@ By making all paths relative to the user's home directory, you can then theoreti

## Package acquisition

Leveraging Calamari means that the deployment can obtain the package via the same methods as a target running the Tentacle agent; either pushed from the server or directly from a NuGet repository. There is therefore no bottleneck in acquisition if there are multiple SSH endpoints all trying to retrieve the same package independently.
Leveraging Calamari means that the deployment can obtain the package via the same methods as a target running the Tentacle agent; either pushed from the server or directly from a supported [external repository](/docs/packaging-applications/package-repositories). There is therefore no bottleneck in acquisition if there are multiple SSH endpoints all trying to retrieve the same package independently.

## Calamari

Calamari is the tool Octopus uses to execute deployments on a remote computer. Before any processing is begun we do an initial check to ensure the available Calamari executable on the endpoint is up to date with the server. If not, we push up the latest Calamari package and then recommence the task. The Calamari package is sent as a `.tar.gz` so it can be extracted with minimal dependencies. This means the server needs to be able to un-tar that package, however, this should be available by default in most distros.
Calamari is the tool Octopus uses to execute deployments on a remote computer. Before any processing is begun we do an initial check to ensure the available Calamari executable on the endpoint is up to date with the server. If not, we push up the latest Calamari package and then recommence the task. The Calamari package is sent as a `.tar.gz` so it can be extracted with minimal dependencies. This means the server needs to be able to un-tar that package, however, this should be available by default in most distributions.

## Learn more

Expand Down

0 comments on commit 126da8d

Please sign in to comment.