redhat-appstudio / rhtap-installer

4 stars 26 forks source link

rhtap-installer-configure job fails #179

Closed soumyadeep-paul-ibm closed 4 weeks ago

soumyadeep-paul-ibm commented 5 months ago

Hi Team,

I was trying to install RHTAP 1.0.0 using the helm chart. However, rhtap-installer-configure job fails as the configure-developer-hub container fails with the following error

 oc logs rhtap-installer-configure-nt98x -c configure-developer-hub
Installing utils: .OK
* Generating 'app-config.extra.yaml': ./bin/bash: line 27: GITHUB__APP__CLIENT_ID: unbound variable

I do notice that in our private.env file, we have a variable GITHUB__APP__CLIENT__ID instead of GITHUB__APP__CLIENT_ID But adding another variable with this name didn't help.

The job pod description of the problematic section

 oc describe job rhtap-installer-configure | more
Name:             rhtap-installer-configure
Namespace:        rhtap
Selector:         batch.kubernetes.io/controller-uid=ff18be0c-f8c2-41ad-973b-b28fca7a0e4b
Labels:           app.kubernetes.io/instance=installer
                  app.kubernetes.io/managed-by=Helm
                  app.kubernetes.io/version=1.1.x
                  helm.sh/chart=redhat-trusted-application-pipeline-1.0.0
Annotations:      batch.kubernetes.io/job-tracking: 
                  helm.sh/hook: post-install, post-upgrade
                  helm.sh/hook-delete-policy: before-hook-creation
Parallelism:      1
Completions:      1
Completion Mode:  NonIndexed
Start Time:       Tue, 21 May 2024 09:34:05 -0400
Pods Statuses:    1 Active (0 Ready) / 0 Succeeded / 5 Failed
Pod Template:
  Labels:           app.kubernetes.io/instance=installer
                    app.kubernetes.io/managed-by=Helm
                    batch.kubernetes.io/controller-uid=ff18be0c-f8c2-41ad-973b-b28fca7a0e4b
                    batch.kubernetes.io/job-name=rhtap-installer-configure
                    controller-uid=ff18be0c-f8c2-41ad-973b-b28fca7a0e4b
                    helm.sh/chart=redhat-trusted-application-pipeline-1.0.0
                    job-name=rhtap-installer-configure
  Service Account:  helm-manager
  Containers:
   configure-developer-hub:
    Image:      registry.redhat.io/openshift4/ose-tools-rhel8:latest
    Port:       <none>
    Host Port:  <none>
    Command:
      /bin/bash
      -c
      set -o errexit
      set -o nounset
      set -o pipefail

      echo -n "Installing utils: "
      dnf install -y diffutils > /dev/null 2>/dev/null
      echo -n "."

      # Installing Helm...
      curl --fail --silent --show-error --location \
        https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 \
          | bash >/dev/null
      echo "OK"

      YQ_VERSION="v4.40.5"
      curl --fail --location --output "/usr/bin/yq" --silent --show-error "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64"
      chmod +x "/usr/bin/yq"

      CHART="rhtap"
      NAMESPACE="rhtap"

      echo -n "* Generating 'app-config.extra.yaml': "
      APPCONFIGEXTRA="app-config.extra.yaml"
      touch "$APPCONFIGEXTRA"
      echo -n "."

      cat << _EOF_ >> "$APPCONFIGEXTRA"
      auth:
        environment: production
        providers:
          github:
            production:
              clientId: ${GITHUB__APP__CLIENT_ID}
              clientSecret: ${GITHUB__APP__CLIENT_SECRET}
          gitlab:
            production:
              clientId: ${GITLAB__OAUTH__CLIENT_ID}
              clientSecret: ${GITLAB__OAUTH__CLIENT_SECRET}
      catalog:
        locations:
        - target: ${DEVELOPER_HUB__CATALOG__URL}
          type: url
        rules:
        - allow:
          - Component
          - System
          - Group
          - Resource
          - Location
          - Template
          - API
      integrations:
        github:
        - apps:
          - appId: ${GITHUB__APP__APP_ID}
            clientId: ${GITHUB__APP__CLIENT_ID}
            clientSecret: ${GITHUB__APP__CLIENT_SECRET}
            privateKey: |
              ${GITHUB__APP__PRIVATE_KEY}
            webhookSecret: ${GITHUB__APP__WEBHOOK_SECRET}
            webhookUrl: GITHUB__APP__WEBHOOK_URL
          host: github.com
        gitlab:
        - host: gitlab.com
          token: ${GITLAB_TOKEN}
      techdocs:
        builder: local
        generator:
          runIn: local
        publisher:
          type: local
      _EOF_
      echo -n "."

      # ArgoCD integration

Please advise.

Roming22 commented 4 weeks ago

Repo is deprecated. Please use https://github.com/redhat-appstudio/rhtap-cli