---
# System prepended metadata

title: Pelorus Prow CI
tags: [pelorus]

---

# Pelorus Prow CI
###### tags: `pelorus`

# Documentation:
## Secret config
        echo "secret config: https://vault.ci.openshift.org/ui/vault/secrets/kv/show/selfservice/konveyor/pelorus/pelorus-github"
        echo "secretsync/target-name: pelorus-github-secret"
        echo "secretsync/target-namespace: test-credentials"
        ls /var/run/konveyor/pelorus/pelorus-github

## Initial Pull request
https://github.com/openshift/release/pull/26846

## Background links
* Recommendation from Nikolaos Moraitis is to use steps as documented
    * https://docs.ci.openshift.org/docs/architecture/step-registry/
* https://docs.ci.openshift.org/docs/how-tos/contributing-openshift-release/
* https://docs.ci.openshift.org/docs/how-tos/onboarding-a-new-component/


## Reference
* https://steps.ci.openshift.org/ci-operator-reference

## Perhaps some similar prow jobs w/ helm
* https://github.com/openshift/release/blob/master/ci-operator/config/backube/volsync/backube-volsync-main.yaml
* not much else out there.
* Getting the running make dev-tools should do all, just pass KUBECONFIG and run installation:
```
# We are in the pelorus-source-code
make dev-env
source .venv/bin/activate
export KUBECONFIG="${SHARED_DIR}/kubeconfig"
oc create namespace pelorus
helm install operators charts/operators --namespace pelorus
helm install pelorus charts/pelorus --namespace pelorus
```

* We could have praw specific charts/pelorus/praw-values.yaml

* Other tests are via Makefile, so:
```
# We are in the pelorus-source-code, e.g. simple one
make format
```

* Praw also controls the github branch protection rules, for pelorus some from the github actions will need to be added.


There are some tekton pipelines, but that's something for later.

## local actions to create and test

* kick off job config
```
make new-repo 

```

* linting job config

```
make jobs
make prow-config
make ci-operator-config
make ci-operator-checkconfig 



```

## Logging into sub-cluster where pelorus is installed

Prow job console:
* --> line 5
* open the cluster.. project w/ 4.8 e2e or 4.9 e2e etc
* --> pods
* e2e-openshift-ipi-install-install
    * look at the logs here for the sub cluster information



### Ugly notes
1. Covering exporter tests:
   - Ensure they do compile
   - Run unit tests
     https://github.com/konveyor/pelorus/tree/master/exporters/tests
   
   - Should we add some more of integration tests?
     https://github.com/konveyor/pelorus/blob/master/exporters/tests/integration/test_committime.py

     https://github.com/konveyor/pelorus/tree/master/mocks

2. Prometheus and Grafana tests
   - Check if they install correctly in OCP cluster
     Helm testss ?
     https://github.com/konveyor/pelorus/pull/227/files     
     
3. Current "testing" with bats and conftest
https://github.com/konveyor/pelorus/blob/master/.github/workflows/conftest.yaml
   - https://github.com/konveyor/pelorus/blob/master/_test/TESTING.md


https://github.com/konveyor/pelorus/blob/master/.github/workflows/integration-tests.yml
https://github.com/konveyor/pelorus/blob/master/.github/workflows/unittests.yml
https://github.com/konveyor/pelorus/blob/master/.github/workflows/prometheus-rules.yml
   
Idea?
 OCP Validations ?
 Tekton runs a.k.a. demo?
 https://opentelemetry.io/ ? with prometheus
 
 Pull request for the tekton demo:
 https://github.com/konveyor/pelorus/pull/354
 
 
promtool validation for the prometheus
https://github.com/konveyor/pelorus/blob/master/_test/prometheus/test.yaml

https://github.com/konveyor/pelorus/blob/master/_test/test_prometheusrules

## Pieces to Design

1. Using tekton demo as ci tooling
    2. https://github.com/konveyor/pelorus/pull/354
3. Use the test_prometheus existing tooling to poplulate
    4. _test/test_prometheusrules
5. Think and design assertations and validations


Migi to focus on the tekton demo, Wes to focus on validating data from grafana


## NEXT PHASE

At this time n + n-1
4.10, 4.9

- [ ] wes PR #1
    - [ ] add vault secret to test job https://github.com/openshift/release/pull/29326
    - [ ] update ci_values.yaml to include github && vault secret https://github.com/konveyor/mig-demo-apps/pull/81
- [x] migi Periodic #1
    - [x] https://github.com/openshift/release/pull/29423
    - [x] https://github.com/konveyor/pelorus/pull/504
    - [x] https://github.com/konveyor/mig-demo-apps/pull/84
- [x] migi Periodic #2
    - [x] https://github.com/konveyor/mig-demo-apps/pull/85
    - [x] https://github.com/openshift/release/pull/29423

### Periodic Pelorus  
* job #1 - latest stable (@mpryc)
    * use quay images
    * use CURRENT documented Pelorus install
    * consider Post MERGE at another time.

* job #2 - latest tag (@mpryc)
    * use mix of quay images and build from s2i
        * https://hackmd.io/KtOn6l6lQ1W8xmcrVpb4Aw
        * Quay with latest tag
        * Different refspec (master) from GIT

### Pull Request

* job #1 ( protect current install workflow )
    * walk the default install
        * default deployment exporter
        * helm upgrade w/ committime and deploytime
            * this incremetaly have github failure exporter

* job #2 ( protect the proposed MVR )
    * configmaps
    * NOT QUAY IMAGES
    * Exporters:
        * committime
            * github commit
            * gitlab commit ( or other )
        * deploytime
            * current todolist-mongo manifest
            * binary build
        * failure
            * jira
            * github
### Secrets
secrets
jira https://vault.ci.openshift.org/ui/vault/secrets/kv/show/selfservice/konveyor/pelorus/jira

github
https://vault.ci.openshift.org/ui/vault/secrets/kv/show/selfservice/konveyor/pelorus/github
vault.ci.openshift.org — notifications, repo
Expires on Wed, Nov 30 2022.
##### Doc
https://docs.ci.openshift.org/docs/how-tos/adding-a-new-secret-to-ci/#add-a-new-secret



### Thanos
 - [ ] add thanos install to CI ( when related PR's are done )
     - [ ] Related PR's
         - [ ] https://github.com/konveyor/pelorus/issues/477
         - [ ] 