pallet.compute documentation

Abstraction of the compute interface

NodeTagReader

var

Provides a SPI for tagging nodes with values.

NodeTagWriter

var

Provides a SPI for adding tags to nodes.

admin-group

fn

[target]
[os-family os-version]

User that remote commands are run under

base-distribution

fn

[target]

Deprecated: true

Base distribution for the target.

boot-if-down

fn

[compute nodes]

Boot the specified nodes, if they are not running.

compute-service?

fn

[c]

Predicate for the argument satisfying the ComputeService protocol.

defmulti-os

macro

[name [& args]]

Defines a defmulti used to abstract over the target operating system. The function dispatches based on the target operating system, that is extracted from the session passed as the first argument.

Version comparisons are not included

ensure-os-family

fn

[compute group-spec]

Called on startup of a new node to ensure group-spec has an os-family attached to it.

instantiate-provider

fn

[provider-name & {:keys [identity credential extensions node-list endpoint environment sub-services], :as options}]

Instantiate a compute service. The provider name should be a recognised jclouds provider, "node-list", "hybrid", or "localhost". The other arguments are keyword value pairs.

  • :identity username or key
  • :credential password or secret
  • :extensions extension modules for jclouds
  • :node-list a list of nodes for the "node-list" provider.
  • :environment an environment map with service specific values.

Provider specific options may also be passed.

node-tag

fn

[compute node tag-name]
[compute node tag-name default-value]

Return the specified tag on the node.

node-taggable?

fn

[compute node]

Predicate to test the availability of tags on a node.

node-tags

fn

[compute node]

Return the tags on the node.

nodes

fn

[compute]

List nodes

packager-for-os

fn

[os-family os-version]

Package manager

reboot

fn

[compute nodes]

Reboot the specified nodes

run-nodes

fn

[compute group-spec node-count user init-script options]

Start node-count nodes for group-spec, executing an init-script on each, using the specified user and options.

service-properties

fn

[compute]

Return a map of service details. Contains a :provider key at a minimum. May contain current credentials.

shutdown

fn

[compute nodes user]

Shutdown specified nodes

shutdown-node

fn

[compute node user]

Shutdown a node.

supported-providers

fn

[]

Return a list of supported provider names. Each name is suitable to be passed to compute-service.

tag-node!

fn

[compute node tag-name value]

Set a value on the given tag-name on the node.