Skip to content

edosrecki/oopsiee-server

Repository files navigation

oopsiee-server

oOPSiee Server Version Build Status Code Coverage Dependencies Status

An HTTP API service that simplifies daily operations and on-call duty by letting you run repeated and cumbersome tasks in no time!

Can be accessed with oOPSiee CLI tool, Postman, Paw, httpie, or any other client of your choosing which speaks HTTP.

  • Supports synchronous commands

  • Supports asynchronous jobs

  • Easily extensible

  • One command startup

  • Ready for Docker

  • Uses private/public key authentication

  • Written in TypeScript

  • 100% test coverage

  • Has proper dependency injection

  • Semi-automatic dependency updates with Dependabot

  • Contains examples


Procedures

Each oOPSiee CLI command must have a corresponding procedure in oopsiee-server. CLI command is mapped to a procedure via config file. oOPSiee CLI tool simply reads the config file to know which procedure to call. Procedures are called through HTTP API.

Adding a new procedure

See example:

Authentication

oOPSiee CLI uses your private key to sign a JWT token containing your username, and sends it over to oopsiee-server in the Authorization header. To use the CLI add your public key to the server.

Adding your public key

Add your public key in PEM format to keys/ directory. File name must only contain your username without any file extensions.

Hint: To convert your RSA public key to PEM format, run: ssh-keygen -f id_rsa.pub -m 'PEM' -e > <USERNAME>

Run

Development mode

Docker

make up
make down
make restart

Note: Containers will reload automatically on code changes. However, if changes were made to package.json, it is necessary to run make restart.

Manual

nvm use
npm install

# Start Redis manually
npm run start:job-processor:dev
npm run start:web:dev

Production mode

Docker

make prod-up
make prod-down
make prod-restart

Manual

nvm use
npm install
npm run clean
npm run build

# Start Redis manually
npm run start:job-processor:prod
npm run start:web:prod

Test

npm test
npm run test:watch

Deploy

To deploy a new version of oopsiee-server, merge master branch into release branch. New version will automatically get released by CI system.

About

An HTTP API service that simplifies daily operations and on-call duty by letting you run repeated and cumbersome tasks in no time!

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published