Skip to main content

Command line tools for managing local and remote octopus deploys using manifests.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

octopose-0.2.14.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

octopose-0.2.14-py2.py3-none-any.whl (1.9 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file octopose-0.2.14.tar.gz.

File metadata

  • Download URL: octopose-0.2.14.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for octopose-0.2.14.tar.gz
Algorithm Hash digest
SHA256 d3a1e31be25a43b92dd0c17c10292d15f1fa997d89b9b5745335c7f0f35dca15
MD5 80a355f58fe2450fdefb010feba7589d
BLAKE2b-256 5fd44a244d0ad26b19b0f531d3638ca66513872407633b74da6ed749d9bc7d32

See more details on using hashes here.

File details

Details for the file octopose-0.2.14-py2.py3-none-any.whl.

File metadata

  • Download URL: octopose-0.2.14-py2.py3-none-any.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for octopose-0.2.14-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9d5fa8ed93c2a246605086fce3125a8e9ecafb2483532c5896efa461f2469397
MD5 c60aa344af3df54ef778014304794976
BLAKE2b-256 bc43e2f687acb9e317aff808836fc92dd2eb03aee13aa9fb146750a110d0203c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page