pallet.configure documentation

Pallet configuration using ~/.pallet/config.clj, the pallet.config namespace or from settings.xml.

config.clj should be in ~/.pallet or a directory specified by the PALLET_HOME environment variable.

service definitions can also be specified as clojure maps in ~/.pallet/services/*.clj

admin-user

fn

[]

Instantiate an admin-user.

If passed no arguments, then the blobstore service is looked up in the following order: - from a var referenced by pallet.config.admin-user system property - from pallet.config/admin-user if defined - the :admin-user top level key in config.clj

Service specific admin-user values should be specified through a :user key on the :environment for the service.

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.

admin-user-from-config

fn

[config]

Set the admin user based on a config map

admin-user-from-config-file

fn

[]

Create an admin user form a configuration map.

admin-user-from-config-var

fn

[]

Set the admin user based on pallet.config setup.

admin-user-from-property

fn

[]

If the pallet.config.admin-user property is defined, and refers to a var then return its value.

blobstore-from-config

fn

[config service options]

Create a blobstore service form a configuration map.

blobstore-from-map

fn

[credentials]

Create a blobstore service from a credentials map. Uses :provider, :identity, :credential and :blobstore-provider, :blobstore-identity and :blobstore-credential. Blobstore keys fall back to the compute keys

blobstore-lookup

var

Translate compute provider to associated blobstore provider

blobstore-service

fn

[]
[service-name & {:as options}]

Instantiate a blobstore service.

If passed no arguments, then the blobstore service is looked up in the following order: - from a var referenced by pallet.config.blobstore-service system property - from pallet.config/blobstore-service if defined - the first service in config.clj - the service from the first active profile in settings.xml

If passed a service name, it is looked up in external configuration (~/.pallet/config.clj or ~/.m2/settings.xml). A service name is one of the keys in the :services map in config.clj, or a profile id in settings.xml.

When passed a provider name and credentials, the service is instantiated based on the credentials. The provider name should be a recognised provider name (see pallet.blobstore/supported-providers to obtain a list of these).

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.

blobstore-service-from-config-file

fn

[service options]
[]

Create a blobstore service form a configuration map.

blobstore-service-from-config-var

fn

[]

Checks to see if pallet.config/service is a var, and if so returns its value.

blobstore-service-from-property

fn

[]

If the pallet.config.service property is defined, and refers to a var, then return its value.

compute-service

fn

[]
[service-name & {:as options}]

Instantiate a compute service.

If passed no arguments, then the compute service is looked up in the following order: - from a var referenced by the pallet.config.service system property - from pallet.config/service if defined - the first service in config.clj - the service from the first active profile in settings.xml

If passed a service name, it is looked up in external configuration (~/.pallet/config.clj or ~/.m2/settings.xml). A service name is one of the keys in the :services map in config.clj, or a profile id in settings.xml.

When passed a provider name and credentials, the service is instantiated based on the credentials. The provider name should be a recognised provider name (see pallet.compute/supported-providers to obtain a list of these).

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.

compute-service-from-config

fn

[config service provider-options]

Compute service from a defpallet configuration map and a service keyword.

compute-service-from-config-file

fn

[service provider-options]
[]

Return a compute service from the configuration in ~/.pallet/config.clj and ~/.pallet/service/*.clj.

service is a keyword used to find an entry in the :services map.

provider-options is a map of provider options to be merged with the service configuration in the configuration file.

compute-service-from-config-var

fn

[]

Checks to see if pallet.config/service is a var, and if so returns its value.

compute-service-from-map

fn

[credentials]

Create a compute service from a credentials map. Uses the :provider, :identity, :credential, :extensions and :node-list keys. The :extensions and :node-list keys will be read with read-string if they are strings.

compute-service-from-property

fn

[]

If the pallet.config.service property is defined, and refers to a var, then return its value.

compute-service-properties

fn

[config service]

Helper to read compute service properties. Given a config file return the selected service definition as a map.

config-file-path

fn

[]

Returns a java.io.File for the user's config.clj file

default-compute-service

fn

[config]

Returns the default compute service

defpallet

macro

[& {:keys [provider identity credential providers admin-user], :as config-options}]

Top level macro for the pallet config.clj file.

pallet-config

fn

[]

Read pallet configuration from config.clj and services/*.clj files. The files are taken from ~/.pallet or $PALLET_HOME if set.

service-files

fn

[]

Read all service definitions in ${PALLET_HOME:~/.pallet}/services.

service-map

fn

[]
[service-name]

Instantiate service objects. The service objects are returned in a map with keys as expected by configure or lift.

service-resources

fn

[]

Read all service definitions in pallet_services/ resources.