krishna-project
v1.1.0
Published
D.A.A.L is a formal static analysis engine and Language Server for Kubernetes YAML configurations. It utilizes a true compiler-design architecture: - **Front-end (JS)**: Lexical and Syntax Analysis - **Analysis Engine (JS)**: Semantic Analysis, Cycle Dete
Readme
D.A.A.L (DevOps Automation Analysis Layer)
D.A.A.L is a formal static analysis engine and Language Server for Kubernetes YAML configurations. It utilizes a true compiler-design architecture:
- Front-end (JS): Lexical and Syntax Analysis
- Analysis Engine (JS): Semantic Analysis, Cycle Detection, and Security Scanning
- Optional Native Addon (C): Reserved for future performance-critical phases
Architecture
This project is built using a Client-Server Architecture:
- D.A.A.L Server (
server.js): A lightweight HTTP server that hosts the engine. It receives YAML payloads and returns diagnostics. - D.A.A.L Client (
client-stub.js): A mock IDE extension that demonstrates how a developer's editor would interact with the server in real-time.
Setup
Prerequisites
- Node.js
Installation
npm installRunning the Server
npm run startRunning the IDE Client Stub
In another terminal:
node src/js/client-stub.js path/to/your/deployment.yamlAPI
POST /compilebody: raw YAML- response:
{ success: true, diagnostics: [...] }
CLI
daal path/to/file-or-folder --exit-codeVS Code Extension (Dev Mode)
- Open vscode-extension in VS Code
- Press F5 to launch an Extension Development Host
Hosting (Linux VM)
Backend as a service (systemd)
- Install Node.js LTS on the VM
- Copy the project folder to the VM (or clone it)
- Create a service user:
sudo useradd -r -s /usr/sbin/nologin daal || true- Create a systemd unit at
/etc/systemd/system/daal.service:
[Unit]
Description=D.A.A.L backend
After=network.target
[Service]
Type=simple
User=daal
WorkingDirectory=/opt/daal
Environment=PORT=3000
Environment=HOST=127.0.0.1
ExecStart=/usr/bin/node /opt/daal/src/js/server.js
Restart=always
[Install]
WantedBy=multi-user.target- Enable + start:
sudo systemctl daemon-reload
sudo systemctl enable --now daal
sudo systemctl status daalIf you need to access the VM from your laptop, set HOST=0.0.0.0 and put Nginx/Caddy in front for HTTPS. If a browser client needs to call it, set CORS_ORIGIN to your frontend origin.
Distribution
CLI
- Recommended: publish to npm so users can install with
npm i -g <package-name> - Alternative: zip the repository (or a minimal bundle) and share it via GitHub Releases
VS Code Extension
- For demo: run in dev mode (F5)
- For sharing: package it into a VSIX (VS Code extension package) and share the VSIX file
Optional Native Addon
npm run build