DevOps tools: chmod, CIDR, Docker Compose

These tools cover the settings that are short to write and easy to get wrong: a permission mode, a subnet, a container’s flags, an ignore file, a version range.

The chmod calculator converts between 755 and rwxr-xr-x, setuid, setgid and the sticky bit included, and reads the mode column of ls -l. The CIDR calculator gives a block’s range, netmask and usable hosts for IPv4 and IPv6, splits it into subnets and checks whether an address is inside. The Docker converter turns a docker run command into a Compose service and back. The gitignore generator combines templates and tests a path the way git check-ignore does, and the semver checker shows which versions an npm range like ^1.2.3 accepts.

The gotchas are the ones that bite in production. chmod 777 is never the fix for a permission error. Cloud subnets reserve addresses of their own, five in every AWS subnet, so a /24 holds fewer hosts there than on paper. A file git already tracks isn’t affected by a new ignore rule until you git rm --cached it. And ^0.2.3 allows only patch updates, because npm treats the leftmost nonzero digit as the breaking one.

The games teach the tools these settings live in: Vim Moves for getting around a file without the mouse, Git Quest for branches, merges and rebases checked against real git, and Shell Pipes for chaining commands.

The tools

Learn it by playing

Answers

chmod Calculator17

CIDR & Subnet Calculator17

docker run to Compose Converter10

Gitignore Generator17

Semver Range Checker8