Getting Started
Get started with Kosli for automated DevOps change tracking and compliance evidence collection
Overview
This guide walks you through setting up Kosli for your first project. By the end, you'll have Kosli tracking your deployments and collecting compliance evidence automatically.
Prerequisites
A Kosli account (sign up at kosli.com)
A CI/CD pipeline (GitHub Actions, GitLab CI, Azure DevOps, or similar)
Docker or Kubernetes deployment
Command-line access
Step 1: Create Kosli Account
Sign up with your email or GitHub/GitLab account
Create your organization
Note your Organization name (you'll need this later)
Step 2: Generate API Token
Log in to Kosli web app
Navigate to Settings > API Tokens
Click Create New Token
Name it (e.g., "CI/CD Pipeline")
Copy the token - you won't see it again
Security Note: Store this token securely in your CI/CD secrets, never commit it to code.
Step 3: Install Kosli CLI
Local Installation (for testing)
macOS/Linux:
Windows:
Verify Installation:
CI/CD Installation
You don't need to install locally for CI/CDβuse platform-specific actions:
GitHub Actions:
kosli-dev/setup-cli-actionGitLab CI: Install in pipeline using curl
Azure DevOps: Install in pipeline script
Step 4: Configure Environment
Set up your environment variables:
Verify Authentication:
Step 5: Create Your First Flow
A Flow in Kosli represents a software delivery pipeline (e.g., one per application or microservice).
Flow Templates:
artifact: For Docker images, binaries, packagesgeneric: For custom workflows
Step 6: Report Your First Artifact
When you build software (Docker image, binary, etc.), report it to Kosli:
What This Does:
Creates cryptographic fingerprint of the Docker image
Links it to the Git commit
Records build URL for traceability
Stores in Kosli for tracking
Step 7: Report Evidence
Report evidence that required processes occurred:
Test Results
Security Scan
Code Review (Pull Request)
Step 8: Report Deployment
When you deploy to an environment, report it to Kosli:
What This Does:
Records when artifact was deployed
Tracks which environment
Links to all collected evidence
Enables compliance verification
Step 9: Snapshot Environment
Kosli can snapshot your runtime environment to verify what's actually running:
Kubernetes
Docker
What This Does:
Captures what's actually running in the environment
Compares against expected deployments
Detects drift (unexpected changes)
Alerts on discrepancies
Step 10: View in Kosli Web App
Log in to https://app.kosli.com
Navigate to your flow: microservices-api
See your artifact with:
Build information
Test evidence
Security scan results
Deployment history
Compliance status
Complete Example: End-to-End
Here's a complete example in a CI/CD pipeline:
Understanding Kosli Concepts
Flow
A Flow represents your software delivery pipeline. Create one flow per application/microservice.
Example Flows:
payment-api- Payment processing microserviceweb-frontend- Web application frontenddata-pipeline- Data processing pipeline
Artifact
An Artifact is a deployable unit (Docker image, binary, package).
Artifact Types:
docker- Docker imagesfile- Files, binaries, JARsdir- Directories
Evidence
Evidence is proof that required processes occurred (tests, scans, reviews).
Evidence Types:
junit-test- JUnit test resultsgeneric- Custom evidence (scans, approvals, etc.)pull-request- Code review approvals
Environment
An Environment is where artifacts run (production, staging, etc.).
Example Environments:
production- Production Kubernetes clusterstaging- Staging environmentdev- Development environment
Trail
A Trail is the complete history of an artifact from build to production, including all evidence and deployments.
Common Commands Quick Reference
Troubleshooting
Authentication Issues
Problem: Error: authentication failed
Solution:
Artifact Not Found
Problem: Error: artifact not found
Solution:
Ensure you reported the artifact first
Verify artifact name matches exactly
Check flow name is correct
Docker images: ensure tag is included
Fingerprint Mismatch
Problem: Error: fingerprint mismatch
Solution:
Artifact changed after reporting
Ensure you're deploying the exact artifact you reported
Check Docker image wasn't rebuilt with same tag
Next Steps
Now that you understand the basics:
Integrate with CI/CD:
Explore CLI:
Learn Best Practices:
Advanced Features:
Policy as Code
Custom evidence types
Compliance reports
Drift detection
Additional Resources
Last updated