Skip to content

Latest commit

 

History

History
151 lines (142 loc) · 5.55 KB

konflux-rhel9.md

File metadata and controls

151 lines (142 loc) · 5.55 KB

RHEL-9

VM created using the RHOS UI with:

Next, ssh to the VM and

# https://access.redhat.com/solutions/253273
sudo subscription-manager register --username <username> --password <password> --auto-attach
sudo subscription-manager refresh
sudo subscription-manager attach --auto
sudo subscription-manager list

Provision the VM and start podman

sudo yum install git curl wget jq podman
systemctl --user start podman.socket
ls $XDG_RUNTIME_DIR/podman/podman.sock

Log on to the registries:

podman login -u [email protected] -p xxxxxx docker.io

Install or curl the installation bash script

curl -sL -H 'Cache-Control: no-cache, no-store' \
  https://raw.githubusercontent.com/ch007m/pipeline-dsl-builder/main/scripts/install_buildpack_testing_environment.sh \
  | bash

HowTo use konflux CI

cat <<EOF | kubectl apply -f -
---
apiVersion: v1
kind: Namespace
metadata:
  name: smee-client
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: gosmee-client
  namespace: smee-client
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: gosmee-client
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: gosmee-client
    spec:
      containers:
      - args:
        - client
        - https://smee.io/Wdavq8x0Oc9Jnl9M
        - http://pipelines-as-code-controller.pipelines-as-code:8080
        image: ghcr.io/chmouel/gosmee:v0.21.0
        imagePullPolicy: Always
        name: gosmee
        resources:
          limits:
            cpu: 100m
            memory: 32Mi
          requests:
            cpu: 10m
            memory: 32Mi
        securityContext:
          readOnlyRootFilesystem: true
          runAsNonRoot: false
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
  • Create the secrets fof the different services as documented here:
cat <<EOF > githubapp-konfluxci.private-key.pem
-----BEGIN RSA PRIVATE KEY-----
MIIE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CWAY1GPbbtezP6P
6fElnbw5pnkibNtpeaznQFBYurjmtHHEFfO2SMEz7egVrClio4gYdXNQPsPYP1nV
xtyxzwn1+UL6SGenfmvGoqbQ0Aps0MRy9NzWZ9iSvlWMzR+Bf3vzs8Tf5S370Zp7
auDj6v/hJU5MF7jfpXkwT6GJAoGADODx9KLHHTpJhw2L8o2kL3yE5yTKvQDeoVQz
mMsOuxmKJCME90EDm4riSXJrWeulS4aNwPLTnELJ0r1x8Sm73WOzBK9H8MXDxmjA
GbViFNJgu26Iylc8aLrWuUAXEJyaLyCuksjVgDCj/B6nPRiLlds+VA4FKKkBjIzu
NIaFAZkCgYEAgT5iJ1H1bdrpIWrlZxMOeB/N7g/vgHjszeYJXdfGnPLIy+/NIbXU
N19HGJfF5zhra5NkRJtgqf8NFhBvYQ4DnM8vu/hRSbTJEkLG4vDQzDyxmU6sEoow
lfmt/yn/tXHrBihYCrUI/D4JB5R2VVXo2feegyOenpwiUHQNgfFEk8c=
-----END RSA PRIVATE KEY-----

EOF

APP_ID=947228
WEBHOOK_SECRET=konfluxci
PATH_PRIVATE_KEY="githubapp-konfluxci.private-key.pem"
kubectl -n pipelines-as-code delete secret pipelines-as-code-secret
kubectl -n pipelines-as-code create secret generic pipelines-as-code-secret \
--from-literal github-private-key="$(cat $PATH_PRIVATE_KEY)" \
--from-literal github-application-id="$APP_ID" \
--from-literal webhook.secret="$WEBHOOK_SECRET"

kubectl -n build-service delete secret pipelines-as-code-secret
kubectl -n build-service create secret generic pipelines-as-code-secret \
--from-literal github-private-key="$(cat $PATH_PRIVATE_KEY)" \
--from-literal github-application-id="$APP_ID" \
--from-literal webhook.secret="$WEBHOOK_SECRET"

kubectl -n integration-service delete secret pipelines-as-code-secret
kubectl -n integration-service create secret generic pipelines-as-code-secret \
--from-literal github-private-key="$(cat $PATH_PRIVATE_KEY)" \
--from-literal github-application-id="$APP_ID" \
--from-literal webhook.secret="$WEBHOOK_SECRET"