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

[]

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

[config]

Set the admin user based on a config map

admin-user-from-config-file

[]

Create an admin user form a configuration map.

admin-user-from-config-var

[]

Set the admin user based on pallet.config setup.

admin-user-from-property

[]

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

blobstore-from-config

[config profiles]

Create a blobstore service form a configuration map.

blobstore-from-map

[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

Translate compute provider to associated blobstore provider

blobstore-service

[]
[service-name]
[provider-name & {:keys [identity credential extensions node-list endpoint environment], :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

[& profiles]

Create a blobstore service form a configuration map.

blobstore-service-from-config-var

[]

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

blobstore-service-from-property

[]

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

compute-service

[]
[service-name]
[provider-name & {:keys [identity credential extensions node-list endpoint environment], :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

[config profiles]

Compute service from a defpallet configuration map and a list of active profiles (provider keys).

compute-service-from-config-file

[& profiles]

Compute service from ~/.pallet/config.clj. Profiles is a sequence of service keys to use from the :services map.

compute-service-from-config-var

[]

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

compute-service-from-map

[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

[]

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

compute-service-properties

[config profiles]

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

config-file-path

[]

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

defpallet

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

Top level macro for the pallet config.clj file.

pallet-config

[]

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

service-map

[]
[service-name]

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