redhat-trusted-application-pipeline

by joaquinito2051

Helm chartv1.0.2App 1.1.x

A Helm chart for deploying Red Hat Trusted Application Pipeline

About this chart

Red Hat Trusted Application Pipeline

This helm chart installs and configures the following projects/products :

ProductInstallationConfiguration
Developer HubRolled out via Helm ChartControlled by the values YAML file.
OpenShift GitOpsOperator SubscriptionControlled by the values YAML file. If a subscription already exists, the installation will not modify it. A new instance ArgoCD will be created.
OpenShift PipelinesOperator SubscriptionControlled by the values YAML file. If a subscription already exists, the installation will not modify it. In all cases, the TektonConfig will be modified to enable Tekton Chains and the signing secret will be setup.
Trusted Artifact SignerOperator SubscriptionDefault operator install & SecureSign instance
Trusted Profile AnalyzerRolled out via Helm Charts tpa-infrastructure and tpaControlled by the values YAML file
Quay(TODO)
Advanced Cluster Security(TODO)

Note: If a subscription for an operator already exists, the installation will not tamper with it. Please make sure you're using a supported version of that product. See Compatibility matrix for 1.0.

Try it

Requirements

  • Helm CLI.
  • An ACS endpoint and the associated API token.
  • A GitHub App and its associated information (c.f. Create a Pipelines-as-Code GitHub App).
    • General
      • Use placeholder values for Homepage URL, Callback URL and Webhook URL.
      • Generate a Webhook secret.
    • Permissions & events
      • Follow the instructions from the Pipelines-as-Code documentation.
      • Repository permissions
        • Administration: Read and write
  • The GitHub App must be installed at the organization/user level.

CLI

Install

  1. Login to an OpenShift 4.14 cluster.

  2. Add the helm repository to your local system:

    helm repo add openshift-helm-charts https://charts.openshift.io/

    If you've already added this, run a helm repo update to pull the latest packages.

  3. Copy values.yaml to private-values.yaml, and set your configuration parameters. You have the option to use bin/make.sh values to generate the configuration YAML.

  4. Install/upgrade RHTAP

    helm upgrade installer openshift-helm-charts/redhat-trusted-application-pipeline --install --create-namespace --namespace rhtap --timeout 20m --values private-values.yaml

    Sample output:

    NAME: installer
    LAST DEPLOYED: Fri Jan 12 12:21:01 2024
    NAMESPACE: rhtap
    STATUS: deployed
    REVISION: 1
    NOTES:
    Thank you for installing redhat-trusted-application-pipeline.
    [...]
    

    Run the pipeline to get the configuration information as per the NOTES section of the helm output. Use the logs information to finish the setup of the GitHub App:

    • Homepage URL: .pipelines.pipelines-as-code.homepage-url
    • Callback URL: .pipelines.pipelines-as-code.callback-url
    • Webhook URL: .pipelines.pipelines-as-code.webhook-url

Uninstall

Note: Uninstalling RHTAP will not unsinstall any operators that were deployed during the installation.

  1. Uninstall RHTAP:

    ./bin/make.sh uninstall --namespace rhtap --app-name installer

If you do not want to use make.sh, perform the following actions:

  1. Delete all applications CRs from the rhtap namespace.
  2. Uninstall the helm chart: helm uninstall --namespace rhtap installer.
  3. Delete the rhtap namespace.
  4. Delete all the deployment namespaces (e.g. rhtap-app-development, rhtap-app-production, rhtap-app-stage).

UI ( a.k.a OpenShift Console - UNSUPPORTED)

Currently unsupported as the user does not have the option to modify the default values.

Development

"Inner loop"

  1. Download/Clone this Git Repository: git clone https://github.com/redhat-appstudio/rhtap-installer.
  2. Install/upgrade the chart on your cluster: ./bin/make.sh apply -- --values private-values.yaml
  3. Run tests: ./test/e2e.sh -- --values private-values.yaml

Continuous integration

The CI is controlled by the following repositories:

  • https://github.com/openshift/release
  • https://github.com/redhat-appstudio/rhtap-e2e

Release a new CI version of RHTAP

$ git clone https://github.com/redhat-appstudio/rhtap-installer
$ cd rhtap-installer/bin
$ ./make.sh release

Deploy redhat-trusted-application-pipeline with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has redhat-trusted-application-pipeline on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartredhat-trusted-application-pipeline is pinned at v1.0.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply