Install Sentinel CLI
Sentinel is a policy framework that is embedded in the enterprise versions of HashiCorp tools. The policies you write are deployed to these applications and enforced there.
The Sentinel CLI is a command-line interface for local development and testing. For the getting started guide, we'll use the CLI to learn how to write policies for Sentinel-enabled applications. The Sentinel CLI is distributed as a binary package for all supported platforms and architectures.
Installation Instructions
To install the Sentinel CLI, find the appropriate package for your system and download it. The CLI is packaged as a zip archive.
After downloading Sentinel, unzip the package. The CLI runs as a single binary
named sentinel
. Any other files in the package can be safely removed and
Sentinel will still function.
The final step is to make sure that the sentinel
binary is available on the PATH
.
See this page
for instructions on setting the PATH on Linux and Mac.
This page
contains instructions for setting the PATH on Windows.
Verifying the Installation
After installing the Sentinel CLI, verify the installation worked by opening a
new terminal session and checking that the sentinel
binary is available. By
executing sentinel
, you should see help output similar to the following:
$ sentinel
Usage: sentinel [--version] [--help] <command> [<args>]
Available commands are:
apply Execute a policy and output the result
fmt Format Sentinel policy to a canonical format
test Test policies
version Prints the Sentinel version
If you get an error that the binary could not be found, then your PATH
environment variable was not setup properly. Please go back and ensure that your
PATH
variable contains the directory where Sentinel was installed.
Otherwise, the CLI is installed and ready to go. Let's celebrate by writing our first policy!