@notabene/ops
v1.9.1
Published
CLI for Notabene Ops
Downloads
30
Readme
Notabene Ops CLI
Internal CLI tool to make development faster.
Documentation • Prerequisites • Installation
Prerequisites
You'll need to install the following packages first:
Installation
Install the library globally using Yarn:
yarn global add @notabene/ops
or NPM:
npm i -g @notabene/ops
Make sure that the path to globally installed packages are in your $PATH
environment variable.
The Ops CLI is then available using nb
.
Setup & Auth
You can configure your AWS CLI by calling:
nb setup
Then you'll need to authenticate a session with AWS which you can initiate with:
nb login
Databases
Login
List all databases in an environment:
nb db:list --env {env}
Credentials
Get credentials for a specific database:
nb db:credentials --env {env} --db {db}
Connect
Connect to an AWS RDS database by mounting a local port:
nb db:connect --env {env} --db {db} --port {localPort}
Note: You can then use a tool like Postico to connect to the database on the local port you mounted.
Kafka
Brokers
Get a list of brokers for the Kafka instance running in an environment:
nb kafka:brokers --env {env}
UI
Connect to the Kafka UI running in an environment by mounting a local port:
nb kafka:ui --env {env} --port {localPort}
Note: You can then access the UI by going to http://localhost:{localPort}
Service
List
Get a list of all services running in an environment:
nb service:list --env {env}
Logs
Tail the logs of a service running in an environment:
nb service:logs --env {env} --service {service}
Redis
List
Get a list of Redis clusters running in an envionment:
nb redis:list --env {env}
Connect
Connect to a Redis cluster running in an environment by mounting a local port:
nb redis:connect --env {env} --cluster {cluster} --port {localPort}
Note: You can now use a tool like RedisInsight to connect to the Redis cluster on the port you mounted.
Network
IPs
Get a list of static IPs of the NAT Gateways in an environment. This is usually useful for customers that need to whitelist the IPs of our services when we send webhooks to them.
nb network:ips --env {env}
Bastion
Connect
Start a terminal session connected to the bastion instance running in an environment:
nb bastion:connect --env {env}