Skip to content

Getting Started with CDviz

Welcome to CDviz! This guide will walk you through setting up a local CDviz environment to collect, store, and visualize your first CDEvents.

If you're new to CDviz, we recommend reading the CDviz Platform Overview to understand its core concepts and components.

1. Local Environment Setup

First, you'll need to get the CDviz demo environment up and running on your local machine.

  1. Clone the CDviz repository:

    bash
    git clone https://github.com/cdviz-dev/cdviz.git
  2. Navigate to the stack-compose directory:

    bash
    cd cdviz/demos/stack-compose
  3. Launch the Docker Compose stack:

    bash
    docker compose up

    This command will start all the necessary components: a web application for sending events, the CDviz Collector, the CDviz Database, and a pre-configured Grafana instance.

  4. Access the demo dashboard in your browser: http://localhost:3000/d/demo_service_deployed/service3a-demo

    You should see a dashboard with some initial sample data.

    Initial Filled Dashboard View

  5. Filter by service my_app (not listed, as it didn't exist yet) to have like the Empty Dashboard

    Initial Empty Dashboard View

2. Sending Your First Events

Now that your local environment is running, let's send manually some events and see them appear on the dashboard.

We send events to simulate your ticket system, CI tools, registries,... reporting's forms.

Service Deployment Events

  1. On the dashboard page, scroll down to the "Services Deployed" form. This form allows you to simulate service deployment events.

  2. Fill out the form with some sample data. For the artifact, you can use the Package URL (PURL) format. For example:

    yaml
    service: my_app
    action: deployed
    artifact: pkg:oci/my-app@sha256:1234567890abcdef?tag=0.1.0
    environment: cluster/dev-01

    Service Deployment Form Example

  3. Click "Submit". You should see the "Deployment Frequency" and "Deployed Services" panels on the dashboard update to reflect the new event.

    Updated Deployment Metrics

Incident Reporting

  1. Scroll down to the "Incidents Reported" form. This form allows you to simulate incident events.

  2. Fill out the form with some sample data.

    yaml
    incident: incident-01
    action: reported
    description: It doesn't work...
    environment: cluster/dev-01
    service: my_app
    artifact: pkg:oci/my-app@sha256:1234567890abcdef?tag=0.1.0
    ticketURI: http://ticket-system.example.com/PRJ-01

    Incident Reporting Form

  3. Click "Submit". You should see the "Incidents Reported" panel update to reflect the new incident.

    Incident Metrics View

3. Exploring Further

Congratulations! You've successfully sent your first CDEvents and visualized them in Grafana. Here are a few things you can do to continue exploring CDviz:

  • Experiment with different events: Try sending different types of events with different data to see how they are reflected in the dashboards.
  • Explore the CDEvents Activity dashboard: This dashboard provides a more detailed view of all the CDEvents that have been collected. You can access it at http://localhost:3000/d/cdevents-activity/cdevents-activity.
  • Submit raw JSON events: For more advanced use cases, you can use the "Raw JSON" form to submit CDEvents in their raw JSON format.
  • Explore other dashboards: and look at cdviz/demos/uses_cases to see how data was injected (csv -> cdviz-collector (transformers) -> database)