Skip to content

Deploying in ephemeral environment

Suraj Patil edited this page Dec 5, 2023 · 9 revisions

Before deploying ros-ocp-backend to ephemeral environment make sure you check Getting Started with Ephemeral Environments (EE) document to get access to the ephemeral openshift cluster and also go through Installing and using bonfire document.

Once you have installed bonfire cli tool and fetched the openshift login token using Installing and using bonfire document you can follow along with this document.

Usage

Use the below bonfire command to deploy ros-ocp-backend in EE.

# bonfire deploy ros -C kruize -C ros-ocp-backend
  • -C flag is for specific component(s) that should processed.

Running the above command will a reserve namespace for you in the EE cluster and will deploy the ros-ocp-backend and its dependent service(ingress, kafka, kruize, etc) in the reserved namespace.

At the end of above command execution it will print the name of reserved namespace, this namespace is by default reserved for an hour but reservation can be extend using below command.

# bonfire namespace extend -d 2h <NAMESPACE>
  • -d flag is for the duration.

View all the deployed services

# oc get pods -n <NAMESPACE>

To upload CSV metrics file to the deployed instance use below command.

# make archive-to-minio env=<env_name>

This will upload the sample file from this repo to the minio storage and will also push the message on hccm.ros.events kafka topic. If you want to upload the custom CSV file use file argument to pass the location of the custom file.

# make archive-to-minio env=<env_name> CSVfile=</location/of/csvfile>

To get the recommendation for the upload archive and to check the output of recommendation API use below command.

# make get-recommendations env=<env_name>

Custom bonfire config

If you want to use the custom images or custom parameters or want to use the locally create/modified clowdapp.yaml file while deploying ros-ocp-backend then you need to modify ~/.config/bonfire/config.yaml file as below

# Bonfire deployment configuration
apps:
- name: ros-ocp-backend
  components:
    - name: ros-ocp-backend-test
      host: local
      repo: ~/redhat-projects/ros-ocp-backend
      path: /clowdapp.yaml
      parameters:
        RBAC_ENABLE: 'False'
        IMAGE_TAG: 5458e0b
        IMAGE: quay.io/cloudservices/ros-ocp-backend
    - name: kruize-test
      host: local
      repo: ~/redhat-projects/ros-ocp-backend
      path: /kruize-clowdapp.yaml
      parameters:
        KRUIZE_IMAGE: quay.io/cloudservices/autotune
        KRUIZE_IMAGE_TAG: 6c23945
        KRUIZE_LOGGING_LEVEL: debug

And use the below bonfire command to deploy the app in the EE which would be using the .config file for its configuration.

# bonfire deploy ros-ocp-backend