2022 Gartner® Magic Quadrant™ SIEM
Get the reportMore
Docker Shipyard is a handy tool for people who love Docker Swarm, but wish it did even more. While Swarm focuses on container orchestration through the CLI, Docker Shipyard takes things further by letting you manage app images and container registries in addition to containers themselves. Plus, Shipyard offers a Web-based graphical front-end and a rich API in addition to a CLI.
[Read More: What is Docker Swarm?]
Interested in taking a dive into Docker Shipyard? Keep reading for instructions on installing and configuring Shipyard for a simple Docker container cluster.
As you might expect, Shipyard needs to store some data in order to monitor your cluster. So before starting Shipyard itself, you need to create two Docker containers for data purposes. The first container will serve as a data container volume, and the second will serve as a database server.
Shipyard uses RethinkDB, so you’ll create your two data containers based on shipyard/rethinkdb images.
To start the two containers, first create the data volume container with:
docker create --name shipyard-rethinkdb-data shipyard/rethinkdb
Next, create a database server and link it to the data volume container you just created with:
docker run -it -d --name shipyard-rethinkdb --restart=always --volumes-from shipyard-rethinkdb-data -p 127.0.0.1:49153:8080 -p 127.0.0.1:49154:28015 -p 127.0.0.1:29015:29015 shipyard/rethinkdb
Now that you have a place for Shipyard to store its data, you can go ahead and create a Shipyard container listening on port 8080 with:
docker run -it -p 8080:8080 -d --restart=always --name shipyard --link shipyard-rethinkdb:rethinkdb shipyard/shipyard
Congratulations! Shipyard is now up and running.
Presumably, though, you actually want to use Shipyard, not just have it running on your cluster. You can access it in different ways. As I mentioned, one of Shipyard’s benefits is that it can be accessed through the CLI, an API or a Web interface.
Everyone loves a GUI (well, maybe not, but in this case getting a Web UI is probably a large part of the reason you want to use Shipyard in the first place), so let’s start with the Web interface. To access it, just point your browser to http://server_ip:8080. The default login name is admin and the default password is shipyard. (Yeah, I know. At least it’s not “password.”)
If you’re using Shipyard in production and you like privacy, you’ll probably want to change the default credentials. To do that, you need the CLI, which requires starting a separate container. So fire it up with:
docker run -ti --rm shipyard/shipyard-cli
We started this container with the –rm flag because we want Docker to shut it down when we’re done using it.
After you launch this container, it will open up a Shipyard CLI prompt. To change the default password, type:
It will ask for a URL, which is the IP address and port where Shipyard is listening (and in our case, that’s http://server_ip:8080). You’ll then be asked for a username and password, which are still admin and shipyard.
Once you log in, run this command to change the password:
Control-D will get you out of the Shipyard CLI.
You now know how to install Shipyard the hard way. But as a reward for having read this far, I’ll point out that Docker also offers an automated script for deploying Shipyard. With a cluster already set up, you can grab and execute the script with:
curl -sSL https://shipyard-project.com/deploy | bash -s
This tool offers some basic configuration options, which are documented here. But if you want to customize more items, like the port number, you’ll have to do things the manual way as previously described.
Shipyard API Basics
Alongside the Web UI, Shipyard’s API is what makes it a truly useful tool for container monitoring and management. So I can’t end this article without mentioning it.
The Shipyard API, which is documented here, can be used to build all manner of custom Web apps. Plus, Shipyard supports the Docker Remote API for managing containers on remote hosts, so you can combine the latter API with Shipyard’s native API when building your apps.
Now, you’ve taken a preliminary dive into Shipyard.
Editor’s Note: Managing Containers with Docker Shipyard is published by the Sumo Logic DevOps Community. Be sure to check out the Sumo Logic Open Source page for free tools, API’s and example code that will enable you to monitor and troubleshoot applications from code to production.
Reduce downtime and move from reactive to proactive monitoring.
Build, run, and secure modern applications and cloud infrastructures.Start free trial