Quick start - Docker

Container image for notops CLI is available on Dockerhub which can be pulled down by executing following command:

docker pull notops/notops-cli:latest

Steps for running notops-CLI docker image

Create a working directory for use with notops. This is where we'd store some local state and config files.

mkdir notops && cd notops

Create AWS credentials file named aws_credentials once an IAM user has been created by following the steps mentioned here.

In the following command, replace your_access_key_id_here with your AWS_ACCESS_KEY_ID and your_secret_access_key_here with your AWS_SECRET_ACCESS_KEY. Additionally, you can pick a different AWS region

cat > aws_credentials << EOF
AWS_ACCESS_KEY_ID=your_access_key_id_here
AWS_SECRET_ACCESS_KEY=your_secret_access_key_here
AWS_REGION=eu-west-2
EOF

Create a sub-folder to store config files for different environments. And create a config file (using the text editor of your choice) for an environment named dev

mkdir configs && vim ./configs/dev.yaml

Once editor opens, paste the following yaml content and save the config file.

environmentName: dev # you can change this to something else

aws:
  region: us-east-2 # you can use some other region here too
  routing:
    domainName: "dev.notops.io"

Create a folder to save local state file. For the purpose of this quickstart, we'll be storing state locally, and not in S3.

Now run the following command:

docker run --env-file ./aws_credentials \
-v ./configs:/app/configs \
-v ./notops_state:/app/.notops/state \
--name notops-cli notops/notops-cli:latest \
apply -c configs/dev.yaml

Template for Docker run command

docker run --env-file <aws_credentials_file_location> \
-v <replace/with/path/to/configs>:/app/configs \
-v <replace/with/path/to/state/folder>:/app/.notops/state \
--name notops-cli  notops/notops-cli:latest \
<notops_commands_with_configs_options_goes_here>

Last updated