Skip to content

Latest commit

 

History

History
123 lines (81 loc) · 3.16 KB

File metadata and controls

123 lines (81 loc) · 3.16 KB

Development Setup

This guide describes how to build and deploy ClusterIQ in a development environment. The setup uses container compose files and is intended for development purposes only.

ClusterIQ consists of two repositories:

Each repository requires separate configuration and management.

Prerequisites

Before you begin:

  • Ensure you have the necessary cloud account credentials.
  • Ensure you have access to registry.redhat.io to download the required container images.
  • If you experience file mounting issues with local files (such as init.psql or credentials), verify your SELinux settings. SELinux in enforcing mode can prevent container runtime from binding files to containers.

To temporarily disable SELinux:

sudo setenforce 0

[!NOTE] Use this command with caution and only in development environments.

Build dependencies

Build

Follow these steps to build the ClusterIQ components:

  1. Create and navigate to a common folder for both repos:

    WORKDIR=$(pwd)/cluster-iq-repos
    mkdir -p $WORKDIR && cd $WORKDIR
  2. Clone the repositories:

    git clone git@github.com:RHEcosystemAppEng/cluster-iq.git
    git clone git@github.com:RHEcosystemAppEng/cluster-iq-console.git
  3. Validate required dependencies:

    If you encounter an error, please ensure that you have installed all the necessary dependencies before proceeding.

    cd ${WORKDIR}/cluster-iq
    make check-dependencies
  4. Build the container images:

    git checkout main
    make build
    cd ${WORKDIR}/cluster-iq-console
    git checkout main
    make build
  5. Verify the container images:

    You should see the following images cluster-iq-api, cluster-iq-scanner, cluster-iq-console

    CONTAINER_ENGINE=$(which podman >/dev/null 2>&1 && echo podman || echo docker)
    $CONTAINER_ENGINE images | grep cluster-iq

Deployment

To manage your development environment:

  1. Change the working directory to cluster-iq repo

    cd ${WORKDIR}/cluster-iq
  2. Configure your cloud account credentials.

  3. Start the environment:

    make start-dev
  4. Stop the environment:

    make stop-dev

API Documentation

Generating Swagger Documentation

To generate the API documentation from the source code:

make swagger-doc

Running Swagger Editor

To view and edit the OpenAPI specification in a browser-based editor:

make swagger-editor