
Product
Go Support Is Now Generally Available
Socket's Go support is now generally available, bringing automatic scanning and deep code analysis to all users with Go projects.
docker-hive
Advanced tools
Preconfigured docker swarm. Portainer GUI. Built-in monitoring stack with prometheus and grafana.
Docker hive is a cli app on top of docker swarm. It doesn't do much, just sets up your docker swarm easily. The main purpose of docker hive is to install the monitoring stack, recommended for docker swarm infrastructure. Once installed, it will expose all services required for the swarm management like prometheus, grafana, portainer, etc.
The nodejs based cli app is just to make our life easier, installing the full pack and updating it.
This is not a fun project, it's meant for production use.
Basically, you install the package on all nodes.
On the master run: hive init
On the workers and secondary managers run: hive join
Run hive iptables
to check the iptables rules you need to accept connections to the current node.
Run hive nodes
to check if the list of nodes gets regularly updated.
Run hive config
to edit the config file with nano. You need to restart the hive stack after that with hive restart
.
A service will be installed after you init or join a swarm, it will update the nodes ip list when the master adds or removes a node. This can be connected with an iptables callback that updates your iptables rules.
It's recommended to expose the hive management ports over a VPN
hive restart
.It's preferred if you don't publish the ports, but only publish them to the internal network with VPN. No matter if they are published, or not, you can assess the services on these ports:
Usage: hive <cmd> <args ...>
Commands:
hive init [-h <host>] [-i <interface>] Create a new docker swarm.
hive join [-t <type>] [-h <host>] [-i <interface>] Join a docker swarm, managed by hive.
hive leave Leave the current swarm.
hive reset Reset the hive stack volumes.
hive config Edit the config with nano.
hive start Start the hive stack.
hive stop Stop the hive stack.
hive restart Restart the hive stack.
hive node-add [ip] Allow node to connect.
hive node-rm [ip] Remove node from the allowed list.
hive nodes List the allowed nodes.
hive serve Serve config to the worker/manager nodes.
hive sync Sync config with the master node.
hive iptables [-s <file>] Print all iptables accept rules.
hive install-dependencies Install dependencies (Ubuntu/Debian).
Options:
--version Show version number [boolean]
--help Show help [boolean]
This app is an "automation". It doesn't do magic and the code is not long or hard to read. Check it out.
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -; sudo apt-get install -y nodejs
npm install -g docker-hive
hive --help # If the hive command is busy, use docker-hive
For Ubuntu/Debian distributions:
hive install-dependencies
For other distributions you will need to install:
curl
docker-ce/ee
Inspired by: https://github.com/stefanprodan/swarmprom
docker rm -f $(docker ps -qa)
docker ps -a | grep 'weeks ago' | awk '{print $1}' | xargs docker rm
docker rm -v $(docker ps -a -q -f status=exited)
docker stop $(docker ps -aq) && docker rm -v $(docker ps -aq)
docker rmi $(docker images -q -f dangling=true)
docker rmi $(docker images -q)
docker volume rm $(docker volume ls -q -f dangling=true)
docker network rm $(docker network ls)
FAQs
Preconfigured docker swarm. Portainer GUI. Built-in monitoring stack with prometheus and grafana.
The npm package docker-hive receives a total of 12 weekly downloads. As such, docker-hive popularity was classified as not popular.
We found that docker-hive demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Go support is now generally available, bringing automatic scanning and deep code analysis to all users with Go projects.
Security News
vlt adds real-time security selectors powered by Socket, enabling developers to query and analyze package risks directly in their dependency graph.
Security News
CISA extended MITRE’s CVE contract by 11 months, avoiding a shutdown but leaving long-term governance and coordination issues unresolved.