This script essentially does this :
- Install OpenShift GitOps on the cluster.
- Set up cluster access by calling relevant scripts (scripts that generate credentials for the OpenShift cluster so it can be managed via gitops)
- Install Pipelines Service on the cluster.
Before installing the prerequisites, refer DEPENDENCIES.md to verify the versions of products, operators and tools used in Pipeline Service.
Before you execute the script, you need:
- to have a kubernetes/openshift cluster with at least 6 CPU cores and 16GB RAM.
- to install oc
- to install argocd CLI
- to install yq
- to install podman or docker. If you have both you can control which is used by setting the
CONTAINER_ENGINE
environment variable (e.g.export CONTAINER_ENGINE="podman"
). While we do not recommend it for security reasons, you can prefix the binary withsudo
to force the execution as the root user (e.g.export CONTAINER_ENGINE="sudo podman"
).
You can run the dev_setup.sh
script with or without parameters.
The --use-current-branch
parameter should be used when testing manifests changes.
The test.sh script runs certain examples from tektoncd repo for pipelines and triggers. You can run the below script only after dev_setup.sh
is run and the required resources are up and running.
./test.sh --test pipelines
# Runs a minimal PipelineRun
# Checks that the pipelinerun is successful.
./test.sh --test chains
# Simulates the creation of an image
# Checks that the pipeline and image are signed.
# Checks that the key to decode the signed data is available to all users.
./test.sh --test results
# Checks that logs are uploaded by tekton-results.
This developer environment can be used to develop/test a new component on the Pipeline Service by changing parameters in config.yaml. Considerations for testing a new component:-
- We are deploying various applications using the GitOps approach and hence a user would need to change the values of
git_url
andgit_ref
to reflect their own Git repo. - A user can modify the applications to be deployed on the cluster by modifying apps.
- Onboarding a new component requires creating a new Argo CD application in argo-apps and adding it to kustomization.yaml.
- For testing, users need to modify only the git source path and ref of their Argo CD application to reflect their own Git repo.
One can reset its environement and all the resources deployed by dev scripts :-
developer/openshift/reset.sh --work-dir /path/to/my_dir