Running Docker Swarm Mode on a Single Bare-metal Server

Yes, it’s still worth it if you don’t have too many servers to set up a real cluster to benefit from load balancing.

Docker Swarm Mode comes with Docker Engine natively. You don’t need to install extra softwares. You just enable it.

It’s sharing most of the YAML format with Docker Compose, so you don’t have to learn a completely new thing.

Similar to other container orchestration tools, it gives you the ability to do rolling updates, scaling up/down, etc…

If Swarm Mode provides you with enough features, be happy with it.

The Docker company has recently marketed more about their support for Kubernetes, but it’s still developing its own Swarm actively. Just yesterday I received their invitation to a webinar presented by Citizens Bank about moving from Swarm to Kubernetes and back to Swarm again. Interesting!

Conclusion

Swarm is not going anywhere anytime soon, don’t worry about that. Plan to migrate to Kubernetes when your startup needs to run thousands of containers.

CentOS 7: Steps to Change SSH Port

Changing SSH port is a good idea if you want to reduce the possibility of being hacked by bots that scan every network node every day to try to log in your servers using popular weak passwords.

You don’t really need to change SSH port if:

  • your servers are running in a private network, not publicly exposed to the internet;
  • your servers are publicly exposed but you’ve disabled password authentication and you keep your SSH keys private.

Following is three basic steps:

  • Add a firewall rule to open the new port
  • If SELinux is enabled, modify its policy to allow the new port
  • Configure SSH daemon

The above order ensures that you won’t accidentally block yourself out.

Continue reading