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

  1. Sign up with your email or GitHub/GitLab account

  2. Create your organization

  3. Note your Organization name (you'll need this later)

Step 2: Generate API Token

  1. Log in to Kosli web app

  2. Navigate to Settings > API Tokens

  3. Click Create New Token

  4. Name it (e.g., "CI/CD Pipeline")

  5. 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:

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, packages

  • generic: 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

  1. Navigate to your flow: microservices-api

  2. 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 microservice

  • web-frontend - Web application frontend

  • data-pipeline - Data processing pipeline

Artifact

An Artifact is a deployable unit (Docker image, binary, package).

Artifact Types:

  • docker - Docker images

  • file - Files, binaries, JARs

  • dir - Directories

Evidence

Evidence is proof that required processes occurred (tests, scans, reviews).

Evidence Types:

  • junit-test - JUnit test results

  • generic - 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 cluster

  • staging - Staging environment

  • dev - 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:

  1. Learn Best Practices:

  2. Advanced Features:

    • Policy as Code

    • Custom evidence types

    • Compliance reports

    • Drift detection

Additional Resources

Last updated