Use openssl to generate Flocker certificates.
Switch branches/tags
Clone or download
Pull request Compare This branch is 4 commits ahead, 3 commits behind ClusterHQ:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

OpenSSL with Flocker

WARNING: This is EXPERIMENTAL support for using openssl tools with Flocker.

Generating Flocker Certificates OpenSSL

This script will help generate the following certificates for Flocker in ./cluster/<cluster_name> directory.

  • Cluster CA (cluster.crt/.key)
  • Control Cert (control-service.crt/.key)
  • Node Cert (node-<AGENT_NODE>.crt/.key)
  • API User (api_user.crt/.key)

For more information on Flocker Authentication see:

Generate Flocker Certificates

You can view help message by

$ ./flocker-openssl/ -h

  ./ new (-i=<control_ip> | -d=<control_fqdn>) [--force] [-f=openssl_conf] [-n=<node>[,<node> ... ]] -c=<cluster_name>
  ./ node [-f=openssl_conf] [--force] -c=<cluster_name> -n=<node>[,<node> ... ]

# Positional arguments
  new                   Creates new cluster keypair group
  node                  Creates/signs node keypairs with existing cluster keypair
                          (Assumes output dir contains cluster.crt and key)

# Arguments
  -i=, --control_ip=    Control Service IP
  -d=, --control_fqdn=  Control Service FQDN
  -c=, --cluster_name=  Cluster name. Should be unique (Default=mycluster)
  -k=, --key_size=      RSA keysize (Default=4096)
  -o=, --output-dir=    Key destination (Default=./clusters/<cluster_name>)
  -f=, --openssl_file=  OpenSSL conf file location (Default=./openssl.cnf)
  -n=, --nodes=         Comma seperated list of nodes
  --force               Force overwrite of files if they already exist

# Other
  -h, --help            This help message


./flocker-openssl/ new -k=1024 -c=staging-1 -n=one,two
./flocker-openssl/ new -d="" -n=",node2,node3" -f=/etc/flocker/ssl/flockeropenssl/openssl.cnf
# Control service node
./flocker-openssl/ new -o=/etc/flocker -k=2048 -c=staging-1

# New node added to cluster
./flocker-openssl/ node -o=/etc/flocker -k=2048 -c=staging-1 -n=new-node

All relevant certificates can be found in clusters/<cluster_name>unless -o override is specified.

How to use the certificates?

Control node

$ scp cluster/cluster-1/cluster.crt user@cluster-master:/etc/flocker/
$ scp cluster/cluster-1/control-service.* user@cluster-master:/etc/flocker/


$ scp cluster/cluster-1/cluster.crt user@cluster-master:/etc/flocker/
$ scp cluster/cluster-1/plugin.* user@cluster-master:/etc/flocker/
$ scp cluster/cluster-1/node-1.crt user@cluster-master:/etc/flocker/node.crt
$ scp cluster/cluster-1/node-1.key user@cluster-master:/etc/flocker/node.key

Then start the Flocker services. Learn more here.