Deploying the Multicloud GitOps pattern
Prerequisite
- An OpenShift cluster
- To create an OpenShift cluster, go to the Red Hat Hybrid Cloud console.
- Select OpenShift -> Clusters -> Create cluster.
- The cluster must have a dynamic
StorageClass
to provisionPersistentVolumes
. See sizing your cluster.
- Optional: A second OpenShift cluster for multicloud demonstration.
- A GitHub account and, optionally, a token for it with repositories permissions, to read from and write to your forks.
- The Helm binary. For details, see Installing Helm.
The use of this pattern depends on having at least one running Red Hat OpenShift cluster. It is desirable to have a cluster for deploying the GitOps management hub assets and a separate cluster(s) for the managed cluster(s).
If you do not have a running Red Hat OpenShift cluster, you can start one on a public or private cloud by using Red Hat’s cloud service.
Procedure
Install the installation tooling dependencies. You will need:
{% include prerequisite-tools.md %}
Fork the multicloud-gitops repository on GitHub. It is necessary to fork because your fork will be updated as part of the GitOps and DevOps processes.
Clone the forked copy of this repository.
git clone git@github.com:your-username/multicloud-gitops.git
Create a local copy of the Helm values file that can safely include credentials.
Warning: Do not commit this file. You do not want to push personal credentials to GitHub.
cp values-secret.yaml.template ~/values-secret.yaml vi ~/values-secret.yaml
Customize the deployment for your cluster.
git checkout -b my-branch vi values-global.yaml git add values-global.yaml git commit values-global.yaml git push origin my-branch
You can deploy the pattern using the validated pattern operator. If you do use the Operator, then skip Verification.
Verification
Preview the changes.
make show
Login to your cluster using oc login or exporting the
KUBECONFIG
.oc login
or set
KUBECONFIG
to the path to yourkubeconfig
file. For example:export KUBECONFIG=~/my-ocp-env/hub/auth/kubconfig
Apply the changes to your cluster.
make install
Verify that the Operators have been installed.
- To verify, in the *OpenShift Container Platform web console, navigate to Operators → Installed Operators page.
2.Check that the Operator is installed in the
openshift-operators
namespace and its status isSucceeded
.
- To verify, in the *OpenShift Container Platform web console, navigate to Operators → Installed Operators page.
2.Check that the Operator is installed in the
- Verify that all applications are synchronized. Under the project
multicloud-gitops-hub
click the URL for thehub
gitopsserver
. The Vault application is not synched.
Multicloud GitOps application demos
As part of this pattern, HashiCorp Vault has been installed. Refer to the section on Vault.
Next steps
Deploying the managed cluster applications
After the management hub is set up and works correctly, attach one or more managed clusters to the architecture (see diagrams below).
For instructions on deploying the edge, refer to Managed Cluster Sites.
Contribute to this pattern: Help & Feedback{: .btn .fs-5 .mb-4 .mb-md-0 .mr-2 } Report Bugs{: .btn .btn-red .fs-5 .mb-4 .mb-md-0 .mr-2 }