Docker Swarm & Flocker Driver Integration

Docker Swarm and Flocker are evolving technologies & I was trying to integrate them but there was some lack of documentation efforts & really its challenge to integrate these two technologies. After putting lots of integration efforts I came up with useful configuration steps.

First of all, let’s check the background of these technologies – Docker Swarm is the cluster management tool for the Docker containers. Docker Swarm provides native clustering capabilities to turn a group of Docker engines into a single node.

Flocker is an open-source container data volume manager for your Dockerized applications. Flocker manages Docker containers and data volumes together. Flocker allows you to use external persistent storage and move it between containers using Docker Swarm.

 

Docker Swarm & Flocker Driver integration Steps

1. Check Status Flocker Node list

root@flockerdev1-virtual-machine:/home/flocker-dev1# flockerctl list-nodes
SERVER     ADDRESS
 
53bbc30e   172.17.58.212
 
295aabcd   172.17.58.211
 
root@flockerdev1-virtual-machine:/home/flocker-dev1#

2. Check Flocker Volume list

root@flockerdev1-virtual-machine:/home/flocker-dev1# flockerctl ls

DATASET   SIZE   METADATA   STATUS   SERVER
 
root@flockerdev1-virtual-machine:/home/flocker-dev1#

3. Create a Flocker Volume

root@flockerdev1-virtual-machine:/home/flocker-dev1# docker volume create --driver flocker --name yp-pune -o size=1GB

yp-pune
 
root@flockerdev1-virtual-machine:/home/flocker-dev1#

4. Now again Check Flocker Volume list

root@flockerdev1-virtual-machine:/home/flocker-dev1# flockerctl ls

/usr/local/bin/flockerctl: 3: read: Illegal option -d
 
DATASET                                SIZE    METADATA                               STATUS         SERVER
 
938e66cf-95ef-4131-9c3a-52c0fe5236e5   1.00G   maximum_size=1073741824,name=yp-pune   attached ✅   295aabcd (172.17.58.211)
 
root@flockerdev1-virtual-machine:/home/flocker-dev1#

5. Check the Swarm Cluster Node status

root@flockerdev1-virtual-machine:/home/flocker-dev1# sudo docker node list

ID                           HOSTNAME                     STATUS  AVAILABILITY  MANAGER STATUS
 
3c4w4zvcyzmwhrr0mrxfkc5pf *  flockerdev1-virtual-machine  Ready   Active        Leader
 
4j8ir0rya0x3nh068xxbct4z6    flockerdev2-virtual-machine  Ready   Active
 
root@flockerdev1-virtual-machine:/home/flocker-dev1#

6. Now create a Swarm Service

root@flockerdev1-virtual-machine:/home/flocker-dev1# docker service create --mount type=volume,source=yp-pune,target=/Calsoft --name yogesh centos sh -c 'while true; do touch /Calsoft/$(hostname)-$(date +%F-%T); sleep 5; done'

0pdnne9urig6kp23130hrp285
 
root@flockerdev1-virtual-machine:/home/flocker-dev1#

7. Check status of Swarm Service

root@flockerdev1-virtual-machine:/home/flocker-dev1# sudo docker service ls

ID            NAME    REPLICAS  IMAGE   COMMAND
 
0pdnne9urig6  yogesh  1/1       centos  sh -c while true; do touch /Calsoft/$(hostname)-$(date +%F-%T); sleep 5; done
 
root@flockerdev1-virtual-machine:/home/flocker-dev1#

8. Find out on which node service is running

root@flockerdev1-virtual-machine:/home/flocker-dev1# sudo docker service ps yogesh

ID                         NAME      IMAGE   NODE                         DESIRED STATE  CURRENT STATE               ERROR
 
1nowf2k2zmjv79zkdk9m3ewh6  yogesh.1  centos  flockerdev1-virtual-machine  Running        Running about a minute ago
 
root@flockerdev1-virtual-machine:/home/flocker-dev1#

9. Check the IO on the Flocker volume

root@flockerdev1-virtual-machine:/home/flocker-dev1# ls /flocker/938e66cf-95ef-4131-9c3a-52c0fe5236e5

c8e89ca73b93-2016-09-22-09:59:53  c8e89ca73b93-2016-09-22-10:00:38  c8e89ca73b93-2016-09-22-10:01:24  c8e89ca73b93-2016-09-22-10:02:09
 
c8e89ca73b93-2016-09-22-09:59:58  c8e89ca73b93-2016-09-22-10:00:43  c8e89ca73b93-2016-09-22-10:01:29  c8e89ca73b93-2016-09-22-10:02:14
 
c8e89ca73b93-2016-09-22-10:00:08  c8e89ca73b93-2016-09-22-10:00:54  c8e89ca73b93-2016-09-22-10:01:39
 
root@flockerdev1-virtual-machine:/home/flocker-dev1#

10. Now trigger the failure on the active Swarm Node

root@flockerdev1-virtual-machine:/home/flocker-dev1# sudo docker node update --availability drain flockerdev1-virtual-machine

flockerdev1-virtual-machine
 
root@flockerdev1-virtual-machine:/home/flocker-dev1#

11. Now Check the Swarm Node status

root@flockerdev1-virtual-machine:/home/flocker-dev1# sudo docker node list

ID                           HOSTNAME                     STATUS  AVAILABILITY  MANAGER STATUS
 
3c4w4zvcyzmwhrr0mrxfkc5pf *  flockerdev1-virtual-machine  Ready   Drain         Leader
 
4j8ir0rya0x3nh068xxbct4z6    flockerdev2-virtual-machine  Ready   Active
 
root@flockerdev1-virtual-machine:/home/flocker-dev1#

12. Now Check the Swarm Service Status

root@flockerdev1-virtual-machine:/home/flocker-dev1# sudo docker service ps yogesh

ID                         NAME          IMAGE   NODE                         DESIRED STATE  CURRENT STATE            ERROR
 
0kb2mmgmzvmiqyx2krigo2j09  yogesh.1      centos  flockerdev2-virtual-machine  Running        Starting 52 seconds ago
 
1nowf2k2zmjv79zkdk9m3ewh6   \_ yogesh.1  centos  flockerdev1-virtual-machine  Shutdown       Shutdown 55 seconds ago
 
root@flockerdev1-virtual-machine:/home/flocker-dev1#

14. Now Check the volume status in flockerctl [Volume & Containers are automatically migrated to other active node]

root@flockerdev1-virtual-machine:/home/flocker-dev1# flockerctl ls

/usr/local/bin/flockerctl: 3: read: Illegal option -d
 
DATASET                                SIZE    METADATA                               STATUS         SERVER
 
938e66cf-95ef-4131-9c3a-52c0fe5236e5   1.00G   maximum_size=1073741824,name=yp-pune   attached ✅   53bbc30e (172.17.58.212)
 
root@flockerdev1-virtual-machine:/home/flocker-dev1#

15. Now Check IO on the Flocker volume [IO is continued from the other active node on the same Flocker volume]

root@flockerdev2-virtual-machine:/home/flocker-dev1# ls /flocker/938e66cf-95ef-4131-9c3a-52c0fe5236e5

c8e89ca73b93-2016-09-22-09:59:53  c8e89ca73b93-2016-09-22-10:00:38  c8e89ca73b93-2016-09-22-10:01:24  c8e89ca73b93-2016-09-22-10:02:09
 
c8e89ca73b93-2016-09-22-09:59:58  c8e89ca73b93-2016-09-22-10:00:43  c8e89ca73b93-2016-09-22-10:01:29  c8e89ca73b93-2016-09-22-10:02:14
 
5cc6b2b33d59-2016-09-22-10:10:10  c8e89ca73b93-2016-09-22-10:00:23  c8e89ca73b93-2016-09-22-10:01:44  c8e89ca73b93-2016-09-22-10:03:04
 
5cc6b2b33d59-2016-09-22-10:10:19  c8e89ca73b93-2016-09-22-10:00:28  c8e89ca73b93-2016-09-22-10:01:49  c8e89ca73b93-2016-09-22-10:03:09

Using these steps we can easily access Flocker Volumes in the Swarm Docker Cluster. Hope this document will helps you.

Container Ecosystem Services

Calsoft has deep expertise in containerization of Storage and Networking products. With our in-depth understanding of various containerization technologies like Docker, Kubernetes, Apache Mesos and Coreos, we have helped ISVs to design and develop solutions in and around these technologies.

To know more email: marketing@calsoftinc.com

Save

Save

Save

Save

Save

 
Share:

Related Posts

Navigating Big Data Storage Challenges

Navigating Big Data Storage Challenges

The last decade or so has seen a big leap in technological advancements. One of the technologies to come up at this time and see a rapid…

Share:

A Deep Dive into 5G Service-Based Architecture (SBA)

5G technology roll out signifies an immense revenue opportunity for telecom industry.

Share:
Unlocking Network Agility Open RAN and the Future of Service Management & Orchestration (SMO)

Unlocking Network Agility: Open RAN and the Future of Service Management & Orchestration (SMO)

Recently, Open RAN turned out to be a transformative and innovative solution in the telecom industry. Service Management Orchestration (SMO) serves at the core of this transformative solution, revolutionizing the way mobile networks are deployed and managed. SMO in Open RAN framework foster openness, flexibility, interoperability supporting multi-vendor and cost-effective network deployments. SMO is paving the way for a new era of wireless connectivity, shaping the future of Open RAN deployments. Read the blog to explore the significance of SMO platform in Open RAN framework.

Share:
Technical Documentation

Technical Documentation Review and Tips

Technical reviews are vital for effective and quality documentation. To make this happen, have documentation and its reviews listed as one of the deliverables – just like development or testing. This will place priority on the process, and ensure everyone involved understands the importance of proper and thorough reviews.

Share:
Importance of System Integration in Next-Generation Telecom Networks

Importance of System Integration in Next-Generation Telecom Networks

The telco sector is evolving, and the significance of system integration cannot be overplayed in the industry. The next-generation networks are ever more complex, including diverse technologies like 5G, IoT, cloud computing, and more. To ensure reliable and high-quality services, seamless system integration becomes the cornerstone. Integration ensures that distinct components and services work harmoniously, stimulating efficient communication and streamlined operations. It facilitates the interconnectivity of various subsystems, enabling real-time data exchange, advanced service delivery, and enhanced end-user experiences. Read the blog to explore the significance of system integrators in telecom industry.

Share:
5G Transport Architecture xHaul Transport

5G Transport Architecture: xHaul Transport

The telecom industry is witnessing a rapid network transformation, enabled by a wide range of pioneering technology trends. The network transformation is towards a virtualized, software defined, flexible, and open framework to support next generation 5G use cases. To effectively realize a high quality 5G user experience, future transport networks will play a crucial role to meet service requirements such as peak data rates, maximum coverage, ultra-low latency, synchronization, and security. Read the blog to explore 5G transport technologies and the key advancements in 5G transport architecture.

Share:

This Post Has One Comment

Comments are closed.