- Docker should be installed and running. It should be started with root privileges because containers are started with the
- Docker should be accesible on tcp (as opposed to the default unix socket) - example here.
docl can be installed by running
pip install docl
cloudify CLI is a dependency of
docl init and supply the different configuration options based on your setup.
--simple-manager-blueprint-pathis mandatory and will be used when running
--ssh-key-pathshould point to a private key that will have access to created containers.
--docker-hostshould point to the docker endpoint.
--source-rootshould point to the root directory in which all cloudify related projects are cloned. This is used for mounting code from the host machine to the relevant manager directories.
After the initial configuration, most commands don't require any additional configuration to work with.
To bootstrap a manager a manager using the simple manager blueprint suppplied during initial configuration, simply run
bootstrap accepts a
--serve-resources-tar flag that will download the resources tar locally and will act as a local file server during the bootstrap process. The resources tar will not be re-downloaded if it already exists unless the invalidate cache flag (
--serve-resources-tar-invalidate-cache) is supplied as well.
If you want to bootstrap on your own, create an empty container (CentOS 7 with systemd and ssh enabled suitable for bootstrap), by running
This will start a container and generate an inputs file
inputs.yaml that can be used to manually bootstrap the manager using the simple manager blueprint.
docl bootstrap, run
To create an manager image from the currently installed manager. This step is required for mounting user code on manager containers.
If you started a container by running
docl run and made some changes to it that you'd like to perserve, you can run
docl save-image as well.
To pull the latest built image from S3 (instead of running
bootstrap and then
save-image to create your own image), run
To start a new manager container based on the last image created using
If you want the container to start with directories mounted based on code residing on the host machine, supply the optional
To install docker within a running container (used by the integration tests), run
You may pass the optional
--version flag to install a specific version, otherwise, the version installed on the host machine
will be installed on the container.
To remove all containers started by
Note that the image saved by running
docl save-image will still be available to you.
If a manager was started using
docl run --mount you may need to restart certain services after making code changes. One option to do so is to run
ssh into a container created by
If you want to create a new
centos based agent package on a manager container that was started using
docl run --mount, run
This command is blocking and will monitor changes made to any package that is mounted on the manager container. On changes, it will
restart relevant services for you so you don't have to run
docl restart-services every time.
If you want the centos agent package to be built as well on changes to relevant packages that affect the agent package, supply the
--rebuild-agent flag to the
To execute a command on a container, run
docl exec <COMMAND>
To copy a file from or to a container, run
docl cp SOURCE_PATH TARGE_PATH
If you wish to copy from the container, prefix the
:, If you wish to copy to the container, prefix the
For example, to copy
/tmp/some_file from the host machine to a container on
docl cp /tmp/some_file :/root/configuration.txt