Skip to main content

Octopose

PyPI - Downloads

Octopose is a manifest / state driven deployment framework for Octopus Deploy. Octopose allows you to create a manifest file based on your releases or deployments that are in Octopus Deploy.

Why Octopose?

Installation

pip install octopose

Configuration

Running Octopose requires various configuration variables which can be found in config.master.yaml:

OCTOPUS_URI: ""
OCTOPUS_HEADERS:
  "x-octopus-apikey": ""
PROJECTS:
  - ""
STAGING: "~\\StagingLocation"
PACKAGE_SOURCES:
  - ""

Create a copy of this file called config.yaml with your desired variables and copy it to ~\.octopose\config.yaml

Usage

Creating a Manifest File

Create a manifest file from the projects in config.yaml:

octopose generate

This will output to stdout a manifest based on those projects and the packages within them:

{
    'Projects':
    {
        'Huddle.ABC':
            {
                'Packages': ['Huddle.ABC']
            },
        'Huddle.XYZ':
            {
                'Packages': ['Huddle.XYZ1', 'Huddle.XYZ2']
            }
    },
    'StagingLocation': 'D:\\dev\\huddle\\StagingLocation'
}

Generate a manifest based on packages in a given environment

octopose generate -e uklive

This will add the specific versions of the releases that are currently deployed into that environment:

{
    'Projects':
    {
        'Huddle.ABC':
            {
                'Packages': ['Huddle.ABC'],
                'Version': '1.0.0'
            },
        'Huddle.XYZ':
            {
                'Packages': ['Huddle.XYZ1', 'Huddle.XYZ2'],
                'Version': '2.3.0'
            }
    },
    'StagingLocation': 'D:\\dev\\huddle\\StagingLocation'
}

Generate a manifest to only deploy certain packages

octopose generate -p Huddle.ABC Huddle.XYZ

This will only add the specified projects to the manifest:

{
    'Projects':
    {
        'Huddle.ABC':
            {
                'Packages': ['Huddle.ABC'],
                'Version': '1.0.0'
            },
        'Huddle.XYZ':
            {
                'Packages': ['Huddle.XYZ1', 'Huddle.XYZ2']
            }
    },
    'StagingLocation': 'D:\\dev\\huddle\\StagingLocation'
}

Generate a manifest and ignore certain packages

octopose generate -i Tasks Publishing
octopose generate --ignore Tasks 

This will remove projects from the manfest.

Save manifest to a file

octopose generate > manifest.json

Deploy to local environment

Deploying to a local environment helps set up developers with the latest code or reproduce a given environment for debugging on your developer workstation.

It reads in the manifest file supplied that describes the state of the local environment.

octopose deploy .\manifest.json

Or

cat .\manifest.json | octopose deploy .\octopose.py

This will pull down releases (or given versions) from the NuGet package sources specified in config.yaml. The run through the PreDeploy.ps1, Deploy.ps1, and PostDeploy.ps1 executing them for the given release.

The commands can also be piped together:

octopose generate | octopose deploy

Deploy to a known Octopus Deploy environment

Octopose can also be used to deployed to remote environments such as staging and production using the releases and versions specified in the manifest.json file.

The following command will deploy the state described in the supplied manifest.json to the environment uklive.

octopose deploy -e uklive .\manifest.json

--force flag will ensure the package is re-downloaded even if it is already deployed into the target environment.

--wait flag will cause octopose to continually poll the Octopus Deploy Tasks till they are complete.

--verbose (or -v) flag will cause octopose to output all logs from the *Deploy.ps1 files. Otherwise there will only be logs from a script if a non-zero exit code is returned.

octopose deploy -e staging --wait --force --verbose

Metadata

Release files for octopose 0.2.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for octopose 0.2.14
File Size Uploaded
octopose-0.2.14.tar.gz 1.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for octopose 0.2.14
File Interpreter ABI Platform
octopose-0.2.14-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 3.7 MB

Release files / octopose-0.2.14.tar.gz

Download URL octopose-0.2.14.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
d3a1e31be25a43b92dd0c17c10292d15f1fa997d89b9b5745335c7f0f35dca15
BLAKE2b-256 checksum
How to use checksums
5fd44a244d0ad26b19b0f531d3638ca66513872407633b74da6ed749d9bc7d32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.1

Release files / octopose-0.2.14-py2.py3-none-any.whl

Download URL octopose-0.2.14-py2.py3-none-any.whl
Size 1.9 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9d5fa8ed93c2a246605086fce3125a8e9ecafb2483532c5896efa461f2469397
BLAKE2b-256 checksum
How to use checksums
bc43e2f687acb9e317aff808836fc92dd2eb03aee13aa9fb146750a110d0203c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.1

Release history Release notifications | RSS feed

This release

0.2.14 This release

2 release files

0.2.13

2 release files

0.2.12

2 release files

0.2.11

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.2

1 release file

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page