linchpin module

The linchpin module contains calls to implement the Command Line Interface within linchpin. It uses the Click command line interface composer.

linchpin.init()

Initializes a linchpin project, which generates an example PinFile, and creates the necessary directory structure for topologies and layouts.

Parameters:ctx – Context object defined by the click.make_pass_decorator method
linchpin.up()

Provisions nodes from the given target(s) in the given PinFile.

Parameters:
  • ctx – Context object defined by the click.make_pass_decorator method
  • pinfile – path to pinfile (Default: ctx.workspace)
  • targets – Provision ONLY the listed target(s). If omitted, ALL targets in the appropriate PinFile will be provisioned.
linchpin.rise()

DEPRECATED. Use ‘up’

linchpin.destroy()

Destroys nodes from the given target(s) in the given PinFile.

Parameters:
  • ctx – Context object defined by the click.make_pass_decorator method
  • pinfile – path to pinfile (Default: ctx.workspace)
  • targets – Destroy ONLY the listed target(s). If omitted, ALL targets in the appropriate PinFile will be destroyed.
linchpin.drop()

DEPRECATED. Use ‘destroy’.

There are now two functions, destroy and down which perform node teardown. The destroy functionality is the default, and if drop is used, will be called.

The down functionality is currently unimplemented, but will shutdown and preserve instances. This feature will only work on providers that support this option.