promenade/doc/source/distribution.rst
Egorov, Stanislav (se6518) 886007b36e New CLI option to extract hyperkube
New option --extract-hyperkube to declare the way how hyperkube
will be delivered.

By default this option is disabled which means hyperkube should be
extracted before running promenade container for the first time.

When it's enabled the appropriate env vars should be set for
promenade container to be able to extract hyperkube binary from image.

Change-Id: I2c45100e1e953d859d768ec80f268bd490ce3a81
2019-07-15 20:21:34 +00:00

1.2 KiB

Distribution

Promenade is using Hyperkube for all Kubernetes components: kubelet, kubectl, etc. By default Hyperkube binary should be extracted from the image before running Promenade. This is done by external scripts and is not integrated into Promenade source code. The other way is to let Promenade do the job and extract binary. This one is more complicated, needs to share Docker socket inside Promenade container and is optional.

Default behavior

IMAGE_HYPERKUBE should be exported and set to appropriate value. Before running build-all CLI for Promenade need to run utility container which will copy binary from image to a shared location. See tools/g2/stages/build-scripts.sh for reference.

Integrated solution

To let Promenade extract binary need to provide more env vars and shared locations for Promenade container. Also need to enable option --extract-hyperkube in Promenade CLI.

Define var for Docker socket(it should be available for user to read/write): DOCKER_SOCK="/var/run/docker.sock"

Provide it for container: -v "${DOCKER_SOCK}:${DOCKER_SOCK}" -e "DOCKER_HOST=unix:/${DOCKER_SOCK}"

Provide additional var(it's for internal operations): -e "PROMENADE_TMP_LOCAL=/${PROMENADE_TMP_LOCAL}"