{"id":13416022,"url":"https://github.com/humblec/dockit","last_synced_at":"2025-04-12T20:33:17.327Z","repository":{"id":18574847,"uuid":"21777745","full_name":"humblec/dockit","owner":"humblec","description":"Do docker actions and Deploy gluster containers!","archived":false,"fork":false,"pushed_at":"2014-11-04T19:40:01.000Z","size":906,"stargazers_count":107,"open_issues_count":5,"forks_count":15,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-26T15:12:16.461Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/humblec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-12T22:20:12.000Z","updated_at":"2024-10-03T05:11:38.000Z","dependencies_parsed_at":"2022-09-25T00:51:24.123Z","dependency_job_id":null,"html_url":"https://github.com/humblec/dockit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humblec%2Fdockit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humblec%2Fdockit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humblec%2Fdockit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humblec%2Fdockit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humblec","download_url":"https://codeload.github.com/humblec/dockit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248630581,"owners_count":21136469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T21:00:53.718Z","updated_at":"2025-04-12T20:33:16.996Z","avatar_url":"https://github.com/humblec.png","language":"Python","readme":"dockit\n======\n\nDockit is an application to make your life better wrt managing docker actions (ex: run , pull, build, create, start ...etc) and to also help massive deployment of containers.\n\nThis is also glued with gluster  (-g option of this binary) wrt huge gluster deployment. When in gluster action mode, it can be used to start any number of containers using the bricks exported ( configuration read from the config file) from host system. The gluster volume is created automatically ( volume name can be given as user input)  from the exported bricks .\n\nAll you need to do is, mount gluster volume in your client!!\n\nYou can use this (dockit)executable for:\n\n* Installing required docker packages in fedora/centos/rhel for docker.\n* This binary is capable of starting docker deamon if its not running in your system.\n* This binary can be used to pull docker images.\n* This binary can build containers based on dockerfile.\n* This binary can start containers based on provided image.\n* This binary can be used to install any number of containers running with specified version of glusterfs binary\n  and also to deploy gluster trusted pool on containers.\n\n\nDemo Video:\n\n\n\n\u003ca href=\"http://www.youtube.com/watch?feature=player_embedded\u0026v=s7OCkyPuaVs\n\" target=\"_blank\"\u003e\u003cimg src=\"http://img.youtube.com/vi/s7OCkyPuaVs/0.jpg\" \nalt=\"Dockit Demo Video\" width=\"440\" height=\"280\" border=\"10\" /\u003e\u003c/a\u003e\n\n\n#### PREPARE YOUR SETUP:\n\n* Install python-setuptools package or make sure you have 'setuptools' module available in your python path.\n* If you are running in RHEL6 systems , please subscribe to EPEL channels as mentioned here (https://docs.docker.com/installation/rhel/)to make docker packages available.\n* Base/official image 'pulling' (ex: ubuntu official image) is disabled for this version.  How-ever if you have specified base image in docker file, it should work..\n* The image which you use for gluster deployment should have \"ssh\" deamon running in it. The password will be prompted from the user if invoked in gluster mode. An example image can be found @https://index.docker.io/u/humble/fed20-gluster/\n* If you are trying to install GlusterFs binary for a particular version (--gi) its better to use an image which has glusterfs build prerequisites installed (  http://gluster.org/community/documentation/index.php/Building_GlusterFS )\u0026 ssh deamon running( the password will be prompted when gluster mode is enabled), such an image can be found here:https://registry.hub.docker.com/u/humble/f20-glusterfs-source/, otherwise it can take long time.\n\n* Finally read the \"help\" output to use this in its full strength.\n* When running this binary it may require 'image tag' at times, you can use default tag called 'latest' if you dont have any other choice.\n\n* If you come across any issues when running the dockit binary with options, please refer \"Troubleshooting_guide.md\". You may have solution there itself.\n\n#### Using Vagrant\nFor ease-of-use, this repository includes a Vagrantfile so you can use [Vagrant](http://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads) to get Dockit up and running very quickly on a CentOS 7 VM. This is great for development work on Dockit.\n\nOn your workstation, simply:\n\n```console\n$ git clone https://github.com/humblec/dockit.git\n$ cd dockit\n$ vagrant up\n$ vagrant ssh\n```\n\nThen you'll have a shell on a CentOS 7 machine with Dockit built from your local code. You can use Dockit immediately, like:\n\n```console\n$ sudo dockit -i humble/fed20-gluster -t latest -s -n 4 -g -c /home/vagrant/dockit/configfile --gv\n```\n\n#### How to start\n\nStep 1: Clone the repo\n```\nhttps://github.com/humblec/dockit.git\n```\nStep 2: Install 'dockit'\n\n```\n#cd dockit\n#python setup.py install\n```\n\nStep 3: Verify there exist a binary called 'dockit`\n\nStep 4: Read dockit's help\n\n```\n#dockit --help\n```\n\nStep 5: If you are planning to use it for gluster deployment ( -g option flag ) and for automatic volume creation (--gv), there are 2 ways to give input:\n\n\n1) Give the configuration manually.\n2) Let dockit read the configuration from a configuration file (-c option)\n\nEither of above, you need a configuration file in your filesystem. The configuration file should have atleast  below entry.\n\n```\n[root@ dockit]# cat /configfile\nBRICKS=\"/brick6,/brick7,/brick8,/brick9\"\n[root@dockit]#\n\n```\nIf you opt for option 1 :\n\n```\nGluster Volume Type (ex: 2x2x1 where (distribute,replica, stripe count in order)     :2x2x1\nGluster Volume Name (ex: glustervol)     :myvol\nGluster Export Dir Name (ex: /rhs_bricks)    :/humble\nGluster brick file (ex: /home/configfile)    :/configfile\n```\n\nWhere 'Volume Type' is the configuration of gluster configurtion wrt distribut-replica-stripe.. Volume name is self explanatory and 'Export Dir Name' will be the mount point inside the containers where brick is configured. The brick file is mentioned above.\nFor ex: If you give options like '2x2x1' which means it create 4 containers and brick names will be fetched in order from above config file. Make sure you have equal number of entries in your config file against the number of gluster containers you wish to spawn..\n\nIf you opt for option 2, you may define these variables in config file,otherwise it will take default values for Volume name, Export Dir, Volume type..etc\n\n```\n[root@ dockit]# cat /configfile\nBRICKS=\"/brick6,/brick7,/brick8,/brick9\"\nVOLNAME=\"testvol\"\nVOL_TYPE=\"2x2x1\"\nSERVER_EXPORT_DIR=\"/rhs_bricks\"\n\n[root@dockit]#\n```\n\n\nStep 7: Use it and Report bugs/comment/suggestions/RFEs @humble.devassy@gmail.com , if you come across any.\n\n\n#### TODO:\n\n\n\n\n*    Currently dockit is supporting fedora, centos, rhel as base system or host OS, expand dockit to support ubuntu and other OSs. -- UPDATE: Support for ubuntu added from version 2.0\n\n*    If we want to install gluster on spawned containers, ssh deamon should be running in those images with password \"redhat\" , The password dependency has to be nullified and it has to be fetched from a config file. - UPDATE : The password dependency is removed from Version 2.0 : Its now prompted from user when operating on gluster mode.\n\n*    Make dockit accept \"containers\" ( ID/HOSTNAME/IP) (I prefer containers IDs as an input to binary) and start working on gluster mode.\n\n*    Also try to accept multi nodes as command input and configure a cluster/trusted pool based on multi nodes. - UPDATE kubernates and other solutions are getting evaluated to achieve this functionality. \n\nFor more details refer# https://github.com/humblec/dockit/wiki/TODO\n\nLets run this executable:\n\n\n```\n[root@humbles-lap dockit]# dockit --help\n------------------------------------------------------------\n   M A I N - M E N U - O F - DOCKIT\n------------------------------------------------------------\nInvoke dockit with any of (-d , -p, -b, -s) options\n\n1. Install and Run Docker deamon                     (-d)   --\u003e  dryrun\n2. Pull image from docker repo and Run containers    (-p)   --\u003e  requires -i \u003cIMAGE\u003e and -r \u003cDOCKERREPO\u003e\n3. Build from dockerfile and Run Containers          (-b)   --\u003e  requires -f \u003cDOCKER FILE\u003e and -t \u003cIMAGE TAG\u003e\n4. Run container from existing image                 (-s)   --\u003e  requires -i \u003cIMAGE\u003e and -t \u003cIMAGE TAG\u003e -n \u003cCOUNT\u003e\n\n Optional:\n Create and start gluster containers  (-g)   --\u003e  Effective only with -s option\n\n                                                   (--gi) --\u003e  To install Gluster From Source\n\n                                                   (--gv) --\u003e  To auto configure Gluster Volume\n------------------------------------------------------------\nNone\ndockit      : INFO     Dockit starting..\nUsage: dockit [options]\n\nOptions:\n  -h, --help            show this help message and exit\n  -d, --dry_run         Do dry run - dont try to install any packages\n  -p, --pullimage       Whether to pull from the docker repo ? Need to specify\n                        dockerrepo and image name\n  -s, --startc          Whether to start from an image ? Need to specify image\n                        and tag\n  -b, --buildimage      Whether to build image from the dockerfile? Need to\n                        specify dockerfile path, and imagetag\n  -g, --gluster_mode    Configure gluster volume in containers\n  -i IMAGE, --image=IMAGE\n                        Image name  - Containers will be based on this image\n  -t IMAGETAG, --imgtag=IMAGETAG\n                        Image tag name  - Containers will be assigned this tag\n  -n COUNT, --count=COUNT\n                        Number of containers to start  -\n  -c CONFIGFILE, --configfile=CONFIGFILE\n                        COnfig file path to read gluster configuration  -\n  -f DOCKERFILE, --dockerfile=DOCKERFILE\n                        Docker file path to build the container  -\n  -r DOCKERREPO, --dockerrepo=DOCKERREPO\n                        Docker repository name with a trailing blackslash  -\n  --gv, --glustervolume\n                        Gluster Volume Creation  inside containers  - Valid\n                        with -g option\n  --gi=GLUSTERVERSION, --glusterinstall=GLUSTERVERSION\n                        Install gluster inside containers  - Valid with -g\n                        option\n```\n\nIf we run the binary with options:\n\nExample 1: Start an already existing fedora image (tag : latest) with command \"/bin/bash\" and run one instance.\n\n```\n[root@humbles-lap dockit]#  dockit -s -i fedora -t latest  -n 1  /bin/bash\n\ndockit      : INFO     Dockit starting.. Process logs are available at:/var/log/dockit/dockit.log\nDo you want to continue (y/n)y\ndockit      : INFO     Proceeding \ndockit      : INFO     Run containers natively, no mode configured\ndockit      : INFO     Distribution:fedora\ndockit      : INFO     Distribution:fedora Required ['docker-io', 'python-docker-py'] packages \n\t \t \t Making yum transactions\nLoaded plugins: langpacks, refresh-packagekit\ndockit      : INFO     docker-io -\u003e Installed\ndockit      : INFO     python-docker-py -\u003e Installed\n\ndockit      : INFO     Pre-requisites are installed\ndockit      : INFO     Requested process: docker -d is running\ndockit      : INFO     Successfully connected to docker deamon: \n\t \t \t pull/build/start containers accordingly.\ndockit      : INFO     Not trying to pull image:fedora.. continuing\ndockit      : INFO     Going to run the containers\ndockit      : INFO      Create and start containers with image :fedora:latest \nroot        : INFO     Enable Gluster Volume :0\n\ndockit      : INFO       Information about running containers \ndockit      : INFO     Containers are running successfully.. please login and work!!!!\n------------------------------------------------------------\ndockit      : INFO     Details about running containers..\n\ndockit      : INFO     Container IPs \t : [u'172.17.0.2']\n \ndockit      : INFO     Container Ids \t : [u'f7d7d7191218049c1970d709f6c40b0282d1cd086313856927876e7dd9ffd277'] \n \n------------------------------------------------------------\ndockit      : INFO     Done!\n\n\nCheck if the container is running :\n\n[root@humbles-lap dockit]# docker ps\nCONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                                          NAMES\nf7d7d7191218        fedora:latest       \"/bin/bash\"         16 seconds ago      Up 15 seconds       0.0.0.0:49153-\u003e22/tcp, 0.0.0.0:49154-\u003e80/tcp   lonely_mestorf\n\n```\n\nExample 2: Pull an image (fed20-gluster) from docker repo (humble) and start 3 containers from it.\n\n```\n[root@humbles-lap dockit]#  dockit -p -i fed20-gluster -r humble -s -n 3\n------------------------------------------------------------\n   M A I N - M E N U - O F - DOCKIT\n------------------------------------------------------------\nInvoke dockit with any of (-d , -p, -b, -s) options\n\n1. Install and Run Docker deamon                     (-d)   --\u003e  dryrun\n2. Pull image from docker repo and Run containers    (-p)   --\u003e  requires -i \u003cIMAGE\u003e and -r \u003cDOCKERREPO\u003e\n3. Build from dockerfile and Run Containers          (-b)   --\u003e  requires -f \u003cDOCKER FILE\u003e and -t \u003cIMAGE TAG\u003e\n4. Run container from existing image                 (-s)   --\u003e  requires -i \u003cIMAGE\u003e and -t \u003cIMAGE TAG\u003e -n \u003cCOUNT\u003e\n\n Optional:\n Create and start gluster containers  (-g)   --\u003e  Effective only with -s option\n\n                                                   (--gi) --\u003e  To install Gluster From Source\n\n                                                   (--gv) --\u003e  To auto configure Gluster Volume\n------------------------------------------------------------\nNone\ndockit      : INFO     Dockit starting..\nDo you want to continue (y/n)y\ndockit      : INFO     Proceeding\ndockit      : INFO     Run containers natively, no mode configured\ndockit      : INFO     Distribution:fedora Required ['docker-io', 'python-docker-py'] packages\n \t \t \t Making yum transactions\nLoaded plugins: langpacks, refresh-packagekit, versionlock\nRequirement already up-to-date: docker-py in /usr/lib/python2.7/site-packages\nRequirement already up-to-date: requests==2.2.1 in /usr/lib/python2.7/site-packages/requests-2.2.1-py2.7.egg (from docker-py)\nRequirement already up-to-date: six\u003e=1.3.0 in /usr/lib/python2.7/site-packages (from docker-py)\nRequirement already up-to-date: websocket-client==0.11.0 in /usr/lib/python2.7/site-packages/websocket_client-0.11.0-py2.7.egg (from docker-py)\nRequirement already up-to-date: mock==1.0.1 in /usr/lib/python2.7/site-packages (from docker-py)\nCleaning up...\ndockit      : INFO     Successfully pulled docker image:humble/fed20-gluster\nroot        : INFO     Enable Gluster Volume :0\ndockit      : INFO       Information about running containers\ndockit      : INFO     Containers are running successfully.. please login and work!!!!\n------------------------------------------------------------\ndockit      : INFO     Details about running containers..\n\ndockit      : INFO     Container IPs \t : [u'172.17.0.55', u'172.17.0.56', u'172.17.0.57']\n\ndockit      : INFO     Container Ids \t : [u'8ee194a323d7a28bfd70490c87bfbe3c76f48d578a24f89b063532874eceed77', u'8ee194a323d7a28bfd70490c87bfbe3c76f48d578a24f89b063532874eceed77', u'8ee194a323d7a28bfd70490c87bfbe3c76f48d578a24f89b063532874eceed77']\n\n------------------------------------------------------------\ndockit      : INFO     Done!\n\n```\n\n\nExample 3:\n\nStart 4 containers using image humble/fed20-gluster with tag 'latest' and run in gluster mode and auto start volume by reading configuration from file /home/hchiramm/config\n\n\n```\n[root@humbles-lap dockit]# dockit -i humble/fed20-gluster -t latest -s -n 4 -g -c /home/hchiramm/config --gv\n------------------------------------------------------------\n   M A I N - M E N U - O F - DOCKIT\n------------------------------------------------------------\nInvoke dockit with any of (-d , -p, -b, -s) options\n\n1. Install and Run Docker deamon                     (-d)   --\u003e  dryrun\n2. Pull image from docker repo and Run containers    (-p)   --\u003e  requires -i \u003cIMAGE\u003e and -r \u003cDOCKERREPO\u003e\n3. Build from dockerfile and Run Containers          (-b)   --\u003e  requires -f \u003cDOCKER FILE\u003e and -t \u003cIMAGE TAG\u003e\n4. Run container from existing image                 (-s)   --\u003e  requires -i \u003cIMAGE\u003e and -t \u003cIMAGE TAG\u003e -n \u003cCOUNT\u003e\n\n Optional:\n Create and start gluster containers  (-g)   --\u003e  Effective only with -s option\n\n                                                   (--gi) --\u003e  To install Gluster From Source\n\n                                                   (--gv) --\u003e  To auto configure Gluster Volume\n------------------------------------------------------------\nNone\ndockit      : INFO     Dockit starting..\nDo you want to continue (y/n)y\ndockit      : INFO     Proceeding\ndockit      : INFO\n Need to configure gluster volume..\n\ndockit      : INFO     Reading gluster configuration from config file\n{'BRICKS': '/brick9,/brick10,/brick11,/brick12', 'VOLNAME': 'DemoVolume', 'VOL_TYPE': '2x2x1'}\ndockit      : INFO     No of gluster containers to spawn:4\nDo you want to continue (y/n):y\ndockit      : INFO     Configuration read from configuration file\ndockit      : INFO     {'BRICKS': '/brick9,/brick10,/brick11,/brick12', 'VOLNAME': 'DemoVolume', 'SERVER_EXPORT_DIR': '/defaultExport', 'VOL_TYPE': '2x2x1'}\ndockit      : INFO     Distribution:fedora Required ['docker-io', 'python-docker-py'] packages\n \t \t \t Making yum transactions\nLoaded plugins: langpacks, refresh-packagekit, versionlock\nRequirement already up-to-date: docker-py in /usr/lib/python2.7/site-packages\nRequirement already up-to-date: requests==2.2.1 in /usr/lib/python2.7/site-packages/requests-2.2.1-py2.7.egg (from docker-py)\nRequirement already up-to-date: six\u003e=1.3.0 in /usr/lib/python2.7/site-packages (from docker-py)\nRequirement already up-to-date: websocket-client==0.11.0 in /usr/lib/python2.7/site-packages/websocket_client-0.11.0-py2.7.egg (from docker-py)\nRequirement already up-to-date: mock==1.0.1 in /usr/lib/python2.7/site-packages (from docker-py)\nCleaning up...\ndockit      : INFO     Bricks will be using in order:['/brick9', '/brick10', '/brick11', '/brick12']\nroot        : INFO     Enable Gluster Volume :1\n...\n...\n...\n...\ndockit      : INFO       Information about running containers\ndockit      : INFO     Containers are running successfully.. please login and work!!!!\n------------------------------------------------------------\ndockit      : INFO     Details about running containers..\n\ndockit      : INFO     Container IPs \t : [u'172.17.0.75', u'172.17.0.76', u'172.17.0.77', u'172.17.0.78']\n\ndockit      : INFO     Container Ids \t : [u'3bfbbe4d53ad0ff7424b87fdffa24f58cb176cbde9673e5ec3bddf2dc89fe005', u'3bfbbe4d53ad0ff7424b87fdffa24f58cb176cbde9673e5ec3bddf2dc89fe005', u'3bfbbe4d53ad0ff7424b87fdffa24f58cb176cbde9673e5ec3bddf2dc89fe005', u'3bfbbe4d53ad0ff7424b87fdffa24f58cb176cbde9673e5ec3bddf2dc89fe005']\n\n------------------------------------------------------------\ndockit      : INFO     Gluster installation not required\ndockit      : INFO     nodes are [u'172.17.0.76', u'172.17.0.77', u'172.17.0.75', u'172.17.0.78']\ndockit      : INFO     Number of nodes: 4\ndockit      : INFO     number of bricks:4\n\n\n\n\n\n\n\n\n\nvolume create: DemoVolume: success: please start the volume to access data\n\nroot        : INFO     Gluster Volume operations done\n\n```\n\nLets login to one of the container and check the gluster configuration:\n\n```\n[root@humbles-lap dockit]# ssh root@172.17.0.76\nThe authenticity of host '172.17.0.76 (172.17.0.76)' can't be established.\nRSA key fingerprint is c0:b6:86:7a:b6:61:21:f1:05:16:ee:62:c1:e8:d4:1f.\nAre you sure you want to continue connecting (yes/no)? yes\nWarning: Permanently added '172.17.0.76' (RSA) to the list of known hosts.\nroot@172.17.0.76's password:\n[root@bb7c8d37d5db ~]# gluster v i\n\nVolume Name: DemoVolume\nType: Distributed-Replicate\nVolume ID: 494574bc-ab2a-4034-996e-4a376395558a\nStatus: Started\nNumber of Bricks: 2 x 2 = 4\nTransport-type: tcp\nBricks:\nBrick1: 172.17.0.76:/defaultExport/DemoVolume_brick0\nBrick2: 172.17.0.77:/defaultExport/DemoVolume_brick1\nBrick3: 172.17.0.75:/defaultExport/DemoVolume_brick2\nBrick4: 172.17.0.78:/defaultExport/DemoVolume_brick3\n[root@bb7c8d37d5db ~]#\n[root@bb7c8d37d5db ~]# gluster peer status\nNumber of Peers: 3\n\nHostname: 172.17.0.77\nUuid: ec2a2b78-84fb-4f67-bff9-52c5ab8c1829\nState: Peer in Cluster (Connected)\n\nHostname: 172.17.0.75\nUuid: 266cdf12-01d7-4528-91b2-d932298127de\nState: Peer in Cluster (Connected)\n\nHostname: 172.17.0.78\nUuid: 71230049-ee31-40d1-80f2-58a0800f8ac0\nState: Peer in Cluster (Connected)\n[root@bb7c8d37d5db ~]#\n\n```\nCool, the gluster volume has started perfectly!!\n\nLets try to mount it on the host.\n\n```\n[root@humbles-lap dockit]# mount -t glusterfs 172.17.0.76:/DemoVolume /mnt\n[root@humbles-lap dockit]# ll /mnt/\ntotal 0\n[root@humbles-lap dockit]# mount |grep glusterfs\n172.17.0.76:/DemoVolume on /mnt type fuse.glusterfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072)\n[root@humbles-lap dockit]#\n\n\n```\n\n\nExample 4: Install 3.4 gluster binary on 2 containers started using humble/fed20-gluster images.\n\n```\n[root@humbles-lap dockit]# dockit -i humble/fed20-gluster -t latest -s -n 2 -g -c /home/hchiramm/config --gi 3.4\n------------------------------------------------------------\n   M A I N - M E N U - O F - DOCKIT\n------------------------------------------------------------\nInvoke dockit with any of (-d , -p, -b, -s) options\n\n1. Install and Run Docker deamon                     (-d)   --\u003e  dryrun\n2. Pull image from docker repo and Run containers    (-p)   --\u003e  requires -i \u003cIMAGE\u003e and -r \u003cDOCKERREPO\u003e\n3. Build from dockerfile and Run Containers          (-b)   --\u003e  requires -f \u003cDOCKER FILE\u003e and -t \u003cIMAGE TAG\u003e\n4. Run container from existing image                 (-s)   --\u003e  requires -i \u003cIMAGE\u003e and -t \u003cIMAGE TAG\u003e -n \u003cCOUNT\u003e\n\n Optional:\n Create and start gluster containers  (-g)   --\u003e  Effective only with -s option\n\n                                                   (--gi) --\u003e  To install Gluster From Source\n\n                                                   (--gv) --\u003e  To auto configure Gluster Volume\n------------------------------------------------------------\nNone\ndockit      : INFO     Dockit starting..\nDo you want to continue (y/n)y\ndockit      : INFO     Proceeding\ndockit      : INFO     Need to install gluster inside containers\ndockit      : INFO     Distribution:fedora Required ['docker-io', 'python-docker-py'] packages\n \t \t \t Making yum transactions\nLoaded plugins: langpacks, refresh-packagekit, versionlock\nRequirement already up-to-date: docker-py in /usr/lib/python2.7/site-packages\nRequirement already up-to-date: requests==2.2.1 in /usr/lib/python2.7/site-packages/requests-2.2.1-py2.7.egg (from docker-py)\nRequirement already up-to-date: six\u003e=1.3.0 in /usr/lib/python2.7/site-packages (from docker-py)\nRequirement already up-to-date: websocket-client==0.11.0 in /usr/lib/python2.7/site-packages/websocket_client-0.11.0-py2.7.egg (from docker-py)\nRequirement already up-to-date: mock==1.0.1 in /usr/lib/python2.7/site-packages (from docker-py)\nCleaning up...\nroot        : INFO     Enable Gluster Volume :0\ndockit      : INFO       Information about running containers\ndockit      : INFO     Containers are running successfully.. please login and work!!!!\n------------------------------------------------------------\ndockit      : INFO     Details about running containers..\n\ndockit      : INFO     Container IPs \t : [u'172.17.0.73', u'172.17.0.74']\n\ndockit      : INFO     Container Ids \t : [u'3930da92c5d15948452fbd4b7332747576bf1d88d1fc4ce7cf631c72296e2c52', u'3930da92c5d15948452fbd4b7332747576bf1d88d1fc4ce7cf631c72296e2c52']\n\n------------------------------------------------------------\ndockit      : INFO     Trying to install gluster on [u'172.17.0.74', u'172.17.0.73'] nodes\ndockit      : INFO     Configuring/installing on node:172.17.0.74\n\ndockit      : INFO     Continuing ..\n\ndockit      : INFO     Successfully configured GlusterFS binary on node:172.17.0.74\ndockit      : INFO     Configuring/installing on node:172.17.0.73\n\ndockit      : INFO     Successfully configured GlusterFS binary on node:172.17.0.73\ndockit      : INFO     Successful Gluster Package Installation and GlusterFS Binary installation on all the nodes!\ndockit      : INFO     Gluster Volume creation not required\n\n```\nSo glusterd binary has been installed on above containers with '3.4' version.\n\nLets confirm:\n\n```\nssh root[hchiramm@humbles-lap dockit]$ ssh root@172.17.0.74\nroot@172.17.0.74's password:\nLast login: Sun Jul 13 17:55:20 2014 from 172.17.42.1\n[root@2a04bf9182ad ~]# gluster\ngluster     glusterd    glusterfs/  glusterfsd\n[root@2a04bf9182ad ~]# glusterd --version\nglusterfs 3.4git built on Jul 13 2014 18:11:48\nRepository revision: git://git.gluster.com/glusterfs.git\nCopyright (c) 2006-2013 Red Hat, Inc. \u003chttp://www.redhat.com/\u003e\nGlusterFS comes with ABSOLUTELY NO WARRANTY.\nIt is licensed to you under your choice of the GNU Lesser\nGeneral Public License, version 3 or any later version (LGPLv3\nor later), or the GNU General Public License, version 2 (GPLv2),\nin all cases as published by the Free Software Foundation.\n[root@2a04bf9182ad ~]#\n```\n\n\nExample DockerFiles:\n\n```\n\n############################################################\n# Dockerfile to run Gluster Containers\n# Part of dockit project :https://github.com/humblec/dockit\n############################################################\n\n# Set the base image to Ubuntu if you need ubuntu\n\nFROM fedora\n\n# Set the file maintainer\n\nMAINTAINER Humble Chirammal humble.devassy@gmail.com\n\n\nRUN yum update\n\nRUN yum install -y gluster*\n\nRUN yum install -y openssh*\n\nRUN mkdir /var/run/sshd\n\nRUN echo \"root:redhat\"| chpasswd\n\nEXPOSE 22\n\nCMD [\"/bin/bash\"]\n\n\n\n[root@humbles-lap dockit]#\n\n```\n\nFrom a \"fedora\" base image it will install gluster packages and start containers from the built image.\n\n```\n###docker ps\n\n[root@humbles-lap dockit]# docker ps\nCONTAINER ID        IMAGE                 COMMAND                CREATED              STATUS              PORTS                                          NAMES\n7723fe4fdd15        mynewgluster:latest   /usr/bin/supervisord   About a minute ago   Up About a minute   0.0.0.0:49215-\u003e22/tcp, 0.0.0.0:49216-\u003e80/tcp   goofy_pare\n\n\n\n\n```\n\n#Changelog:\n\nVersion 2.5:\n* Making dockit a pep8 and flake8 compliant project.\n\nVersion 2.0:\n\n* Support added for Ubuntu Host system.\n* ssh password dependency avoided for the docker image. Its been prompted now from the user.\n\nVersion 1.5:\n\n* Dockit operate on gluster and general mode\n* Gluster installation and configuration added with --gi and --gv version\n*\n","funding_links":[],"categories":["Container Operations","Deployment","Python"],"sub_categories":["Deployment and Infrastructure"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumblec%2Fdockit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumblec%2Fdockit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumblec%2Fdockit/lists"}