The Nikita API is simple and concise. It also powerful and comes with a lot of functionalities. This section detail the subtleties of the API organized by topics. A lot of efforts were made to illustrate each topic with clear examples.
Before going through the documentation, you must be familiar with the core concept of Nikita described in the tutorial.
The topics of this section are organized by relevance, the first ones being considered as the most relevant ones.
Get started with Nikita's core concepts from installing to using advanced concepts.
- Call and user-defined handlers
Nikita gives you the choice between calling your own function, which we call handlers, or calling a registered function by its name.
- Action promise
The status is information indicating whether an action had any impact or not. Its meaning may differ from one action to another, for example: touching a file, modification of a configuration file, checking if a port is open, ...
- Local and remote (SSH) execution
Actions are designed to run transparently either locally or remotely through SSH.
Conditions are executed before the action handlers to control and guarantee its execution.
Assertions are executed after the action handlers to validate the result of its execution.
- Debugging and Logging
Nikita provides multiple mechanisms to report, dive into the logs and intercept instructions. Most of them can be instantaneously activated and you are provided with simple building blocks to quickly write your own.
- Control Flow
Nikita runs every action sequentially. This behavior ensures there are no conflicts between two commands executed simultaneously. Moreover, this sequential nature is aligned with SSH which executes one command at a time over a given connection.
- Error handling
Nikita rejects errors when they occur with the action promise. When a promise rejects, the control jumps to the closest rejection handler.