Code Monkey home page Code Monkey logo

pelorus-demos's Introduction

Pelorus demos

Collection of applications to test Pelorus with.

basic-python

Contains a very simple Python HTTP server that just serves the response.txt file.

The file can easily be appended to, in order to demonstrate pipelines deploying changes.

Requirements

  • An OpenShift cluster with Pelorus installed
  • A fork of this repository with access to commit and add webhooks
  • A GitHub Personal Access Token (PAT) with access to read the forked repository issues

Set up

Create a Pelorus instance with the following content, changing <your_github_pat> to your GitHub PAT and <your_fork> to your organization/user of the forked repository.

apiVersion: charts.pelorus.dora-metrics.io/v1alpha1
kind: Pelorus
metadata:
  name: pelorus-basic-python-demo
spec:
  exporters:
    instances:
    - app_name: deploytime-exporter
      exporter_type: deploytime
      extraEnv:
      - name: NAMESPACES
        value: basic-python
    - app_name: committime-exporter
      exporter_type: committime
      extraEnv:
      - name: NAMESPACES
        value: basic-python
    - app_name: failure-exporter
      exporter_type: failure
      extraEnv:
      - name: PROVIDER
        value: github
      - name: TOKEN
        value: <your_github_pat>
      - name: PROJECTS
        value: <your_fork>/pelorus-demos

To create and start application, run

oc process -f basic-python.yaml -p=FORK_ORG=<your_fork> | oc apply -f -

changing <your_fork> to your organization/user of the forked repository.

Add webhook in the repository using this URL

oc describe bc/basic-python-app -n basic-python | \
grep 'webhooks/<secret>/github' | \
sed "s/<secret>/$(oc get bc/basic-python-app -o=jsonpath='{.spec.triggers..github.secret}' -n basic-python)/g"

More details on configuring webhook.

After finishing testing, to stop and delete application, run

oc process -f basic-python.yaml -p=FORK_ORG=<your_fork> | oc delete -f -

Test

To see Pelorus dashboards in action

  • Create commits changing the response.txt file (because of the configured webhook, every commit will result in a deploy)
  • Create and resolve issues with the bug and app.kubernetes.io/name=basic-python-app labels

pelorus-demos's People

Contributors

mateusoliveira43 avatar

Watchers

 avatar  avatar

pelorus-demos's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.