In the Rancher catalog, Rancher provides storage services that are capable of exposing volumes to containers. Currently, the storage services are pre-fixed with Convoy
in the catalog.
From the Catalog tab, select one of the Convoy services.
By default, we’ve auto-populated the required fields. Edit the fields to your desired choices. After filling in the form, click on Create.
After your storage service has been launched, a storage pool has been created and is viewable in Infrastructure -> Storage Pools. You will be able to see all the Convoy storage services that are running in your environment. The name of the storage pool is derived from the name of the stack.
In each storage pool, the hosts that have the storage service running will be listed. Besides the list of hosts, the lists of volumes used in the storage pool is also listed. For each volume, you can see the name of the volume (i.e. the name of the volume on the host(s)), and the mounts of each volume. For each mount, there is the container name and the directory path inside the container.
After your storage service has been launched, a storage pool has been created and is viewable in Infrastructure -> Storage Pools. Services can start using the shared storage. In the Volumes tab, provide a volume and a volume driver. The volume will be in the same syntax as Docker, <volume_name_on_host>:</path/in/container>
. Docker volumes default to mount in read-write mode, but you can set it to be mounted read-only by adding the :ro
at the end of the volume. The volume driver will be the name of the storage pool, that was created after launching the Convoy storage service.
After the storage service has been launched, you can start using the storage service as a volume_driver
in the docker-compose.yml
. The volume_driver
would be the name of the storage pool.
test:
tty: true
image: ubuntu:14.04.3
stdin_open: true
volumes:
- volume_name_on_host:/path/in/container
volume_driver: <name_of_storage_pool>
A volume can be added to a storage pool with two methods: