Kitematic: Use This Tool

Hey everybody!

If you use Docker and don’t use Kitematic, you’re missing out!

TL;DR

Kitematic is an awesome addition to your Docker toolbox. Download it here.

What is Kitematic?

It’s a graphical tool that lets you see what is running in your local Docker environment.

You’re probably used to docker ps, and docker images, and so on, to see what Docker is doing. But Kitematic can show you that information in a GUI.

So?

Okay, so I’m working on Part 3 of a tutorial series I’m doing for IBM developerWorks, and I have Hyperledger Fabric running in Docker.

Contrast this:

Ix:~ sperry$ docker ps
 CONTAINER ID        IMAGE                                                                                                                        COMMAND                  CREATED             STATUS              PORTS                                            NAMES
 c8e71d740f38        dev-peer0.org1.example.com-digitalproperty-network-0.14.3-b524d4b38bf773adade74e18741aacd93212883d30ef9b63def86797a270f038   "chaincode -peer.a..."   44 minutes ago      Up 44 minutes                                                        dev-peer0.org1.example.com-digitalproperty-network-0.14.3
 2931d5073686        dev-peer0.org1.example.com-perishable-network-0.14.3-02848cbd757516cb261270e628f79e44a5d478431848d48302bac059fa1b3fd5        "chaincode -peer.a..."   21 hours ago        Up 21 hours                                                          dev-peer0.org1.example.com-perishable-network-0.14.3
 9e4edf0acb21        hyperledger/fabric-peer:x86_64-1.0.3                                                                                         "peer node start -..."   21 hours ago        Up 21 hours         0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp   peer0.org1.example.com
 7392660e2da1        hyperledger/fabric-ca:x86_64-1.0.3                                                                                           "sh -c 'fabric-ca-..."   21 hours ago        Up 21 hours         0.0.0.0:7054->7054/tcp                           ca.org1.example.com
 61ffea441cc6        hyperledger/fabric-orderer:x86_64-1.0.3                                                                                      "orderer"                21 hours ago        Up 21 hours         0.0.0.0:7050->7050/tcp                           orderer.example.com
 8034e8baa63e        hyperledger/fabric-couchdb:x86_64-1.0.3                                                                                      "tini -- /docker-e..."   21 hours ago        Up 21 hours         4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp       couchdb
 Ix:~ sperry$

With this:

Screenshot 2017-11-06 11.43.13

You can see the same info, but in a GUI format. Now, I love the command line as much as anybody, but sometimes figuring out what is going on with Docker through the command line can be frustrating. Not that the information isn’t there; just that it’s not super easy to tease out the information I’m looking for.

What else?

With Kitematic, you can see the logs for each container, just as you can with the docker logs command.

Compare this:

$ docker logs 61ffea441cc6

2017-11-05 20:19:38.265 UTC [orderer/main] main -> INFO 001 Starting orderer:
 Version: 1.0.3
 Go version: go1.7.5
 OS/Arch: linux/amd64
2017-11-05 20:19:38.274 UTC [bccsp_sw] openKeyStore -> DEBU 002 KeyStore opened at [/etc/hyperledger/msp/orderer/msp/keystore]...done
2017-11-05 20:19:38.274 UTC [bccsp] initBCCSP -> DEBU 003 Initialize BCCSP [SW]
2017-11-05 20:19:38.275 UTC [msp] getPemMaterialFromDir -> DEBU 004 Reading directory /etc/hyperledger/msp/orderer/msp/signcerts
.
.
2017-11-06 16:49:34.979 UTC [fsblkstorage] updateCheckpoint -> DEBU a7f Broadcasting about update checkpointInfo: latestFileChunkSuffixNum=[0], latestFileChunksize=[213666], isChainEmpty=[false], lastBlockNumber=[7]
2017-11-06 16:49:34.979 UTC [orderer/multichain] WriteBlock -> DEBU a80 [channel: composerchannel] Wrote block 7
2017-11-06 16:49:34.979 UTC [fsblkstorage] retrieveBlockByNumber -> DEBU a81 retrieveBlockByNumber() - blockNum = [7]
2017-11-06 16:49:34.979 UTC [fsblkstorage] newBlockfileStream -> DEBU a82 newBlockfileStream(): filePath=[/var/hyperledger/production/orderer/chains/composerchannel/blockfile_000000], startOffset=[205101]
2017-11-06 16:49:34.979 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU a83 Remaining bytes=[8565], Going to peek [8] bytes
2017-11-06 16:49:34.979 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU a84 Returning blockbytes - length=[8563], placementInfo={fileNum=[0], startOffset=[205101], bytesOffset=[205103]}
2017-11-06 16:49:34.979 UTC [orderer/common/deliver] Handle -> DEBU a85 [channel: composerchannel] Delivering block for (0xc4208547c0)

With this:

You can see the logs (under the Home tab on the right-hand side of the UI), in addition to information about the port that is exposed on localhost, the volumes that are mounted, and settings for both.

Get Kitematic

How do you use Kitematic? Go to the Docker drop-down menu in the status tray (mine is at the top of the screen on my Mac),

And select Kitematic. The first time you do this, you’ll see this dialog:

Click the “here” link (which takes you to https://download.docker.com/kitematic/Kitematic-Mac.zip). Once the ZIP file is downloaded, unzip it. It contains the Kitematic app, which you then drag and drop into your Applications folder. The next time you select Kitematic from the Docker drop-down, it fires up seamlessly.

You can sign into Docker Hub if you have an ID (if not, just select “Skip for Now”).

That’s it! Now you can use Kitematic.

Fini

I’m not suggesting you shouldn’t use the Docker command line tools. They’re great. But Kitematic is another tool in your Docker arsenal.

Enjoy. And thanks for reading!

–jsp

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s