About this project
# AliaJS
AliaJS is an infrastructure orchestrator designed for small operation-infrastructure teams that prefer JavaScript as their definition and execution language. It is currently in alpha status.
## Key Features
- **JavaScript-based Infrastructure as Code**: Define and execute infrastructure orchestration using JavaScript.
- **HTTP-first Design**: Takes HTTP as input and can communicate via HTTP as a first-class citizen. It is an Express.js service that runs shell commands and Node.js code.
- **All-in-one Solution**: Manages service infrastructure including secret vault integration (Bitwarden), monitoring, and alerting.
- **NGINX-oriented**: Built with NGINX in mind.
## Architecture
The project is structured with several core modules:
- `src/app.js`, `src/main.js`, `src/routes.js`: Main Express.js server files.
- `src/deploy.js`: Updates a running service.
- `src/new-image.js`: Creates and maintains virtual machine images based on scheduled jobs.
- `src/new-instance.js`: Creates new instances according to definitions in `configurations/instances.js`.
- `src/renew-certificates.js`: Manages SSL certificate renewal.
- `src/items.js`: Vault management utilities.
- `src/logger.js` and `utils.js`: Utility code.
- `templates/`: EJS template files.
- `configurations/`: Instance and image configuration definitions.
## Getting Started
1. Configure environment variables in `.env` according to your Bitwarden vault.
2. Run `npm install` and `npm run dev`.
## Usage
Set the `ALIAJS_AUTHORIZATION` environment variable in your shell.
**Update a running service:**
```bash
curl -v -N --header "Authorization: ${ALIAJS_AUTHORIZATION}" "https://aliajs-production.rotat.io/deploy?checkout=${CHECKOUT}&service_name=aliajs&tier=production"
```
**Start a new instance:**
```bash
curl -v -N --header "Authorization: ${ALIAJS_AUTHORIZATION}" "https://aliajs-production.rotat.io/new-instance?address=1.1.1.1&checkout=${CHECKOUT}&instance_name=aliajs-production&replace=false"
```
Query parameters for new-instance:
- `address`: `allocate` to request a permanent IP from the cloud provider, or a specific IP.
- `ephemeral`: Create a new ephemeral instance with a unique DNS (default `false`).
- `exclude`: Filter out operation types (e.g., `exclude=backup`).
- `replace`: Replace the current running instance (default `false`).
- `target`: Filter to specific operation types (e.g., `target=initial&target=restore`).
## Limitations
- Not intended for large operation-infrastructure teams.
- Not well supported by a community yet.
This project is in early development and may change significantly.
Comments
0 people shared their preference · Deer Point appears after 10 participants
Sign in to join the discussion.