You can define environment variables that handle required configuration. In Pachyderm, you can define the following types of environment variables:
pachd variables: Used for your Pachyderm daemon container.
Pachyderm worker variables: Used by the Kubernetes pods that run your pipeline code.
You can reference environment variables in your code. For example,
if your code writes data to an external system and you want
to know the current job ID, you can use the
environment variable to refer to the current job ID.
pachd Environment Variables #
You can find the list of
pachd environment variables in the
pachd manifest by running the following command:
kubectl get deploy pachd -o yaml
The following tables list all the
Global Configuration #
|The host on which the etcd service runs.
|The etcd port number.
|The GRPs port number.
pachd port number.
|The HTTP port number.
|The port for pachd-to-pachd communication.
|The namespace in which Pachyderm is deployed.
PachD Configuration #
|The max number of
pachd pods that can run in a
|The storage backend defined for the Pachyderm cluster.
|The host path to storage.
|An IP address that Kubernetes exports
automatically for your code to communicate with
the Kubernetes API. Read access only. Most variables
that have use the
are Kubernetes environment variables. For more information,
see Kubernetes environment variables.
|Defines whether anonymous Pachyderm metrics are being
collected or not.
|The size of the block cache in
|The base Docker image that is used to run your pipeline.
pachd image that is used as a worker sidecar.
|The pull policy that defines how Docker images are
pulled. You can set
a Kubernetes image pull policy as needed.
|Verbosity of the log output. If you want to disable
logging, set this variable to
0. Viable Options
For more information, see Go logrus log levels.
|The role that defines permissions for Pachyderm in AWS.
|The Kubernetes secret for image pull credentials.
|Controls access to internal Pachyderm API.
|Controls root access in the worker container.
|The S3 gateway port number
|A feature flag that disables commit propagation
progress counter. If you have a large DAG,
setting this parameter to
true might help
improve etcd performance. You only need to set
this parameter on the
pachd pod. Pachyderm passes
this parameter to worker containers automatically.
Storage Configuration #
|Defines the storage memory threshold.
|Defines the storage shard threshold.
Pipeline Worker Environment Variables #
Pachyderm defines many environment variables for each Pachyderm worker that runs your pipeline code. You can print the list
of environment variables into your Pachyderm logs by including the
env command into your pipeline specification. For example,
if you have an
images repository, you can configure your pipeline specification like this:
"cmd": ["sh" ],
Run this pipeline and, upon completion, you can view the log with variables by running the following command:
pachctl logs --pipeline=env
You should see a lengthy list of variables. Many of them define internal networking parameters that most probably you will not need to use.
Most users find the following environment variables particularly useful:
|The ID that contains your AWS access key; requires
pfs.s3: true or
s3Out:true in your pipeline spec.
|The name of the secret which contains your AWS access key; requires
pfs.s3: true or
s3Out:true in your pipeline spec.
|The ID of the current job. For example,
|The ID of the current Datum.
join_on match to the pipeline’s job.
group_by match to the pipeline’s job.
|The ID of the commit in the output repo for
the current job. For example,
|The PPS namespace. For example,
|The hash of the pipeline specification commit.
This value is tied to the pipeline version. Therefore, jobs that use
the same version of the same pipeline have the same spec commit.
|The name of the pipeline pod. For example,
|The name of the pipeline that this pod runs.
|The port that you can use to
exposed metrics to Prometheus from within your pipeline. The default value is 9090.
|The path to the home directory. The default value is
|The path to the filesystem that is
defined in the
input in your pipeline specification. Pachyderm defines
such a variable for each input. The path is defined by the
glob pattern in the
spec. For example, if you have an input
images and a glob pattern of
Pachyderm defines the
images=/pfs/images variable. If you
have a glob pattern of
/*, Pachyderm matches
the files in the
images repository and, therefore, the path is
|The ID of the commit that is used for the input.
|A Pachyderm S3 gateway sidecar container endpoint.
If you have an S3 enabled pipeline, this parameter specifies a URL that
you can use to access the pipeline’s repositories state when a
particular job was run. The URL has the following format:
An example of accessing the data by using AWS CLI looks like this: `echo foo_data
In addition to these environment variables, Kubernetes injects others for Services that run inside the cluster. These variables enable you to connect to those outside services, which can be powerful but might also result in processing being retried multiple times.
For example, if your code writes a row to a database, that row might be written multiple times because of retries. Interaction with outside services must be idempotent to prevent unexpected behavior. Furthermore, one of the running services that your code can connect to is Pachyderm itself. This is generally not recommended as very little of the Pachyderm API is idempotent, but in some specific cases it can be a viable approach.