mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
Install script for operators on Kubernetes + Activate tests with operators on Kubernetes cluster (#5861)
This commit is contained in:
@@ -107,12 +107,10 @@ ansible-playbook destroy.yml -e name_prefix=...
|
||||
|
||||
This ansible playbook deploys operators on a Kubernetes cluster. The cluster should be running the Operator Lifecycle Manager ([OLM](https://olm.operatorframework.io/)), either natively for an OpenShift cluster, or by installing it on a Kubernetes cluster.
|
||||
|
||||
To install OLM on a Kubernetes cluster go to the ([OLM releases page](https://github.com/operator-framework/operator-lifecycle-manager/releases/)), the latest version is displayed at the top, execute the commands as described under the "Scripted" section. At the time this document was written the latest version was v0.19.1:
|
||||
To install OLM on a Kubernetes cluster go to the ([OLM releases page](https://github.com/operator-framework/operator-lifecycle-manager/releases/)), the latest version is displayed at the top, execute the commands as described under the "Scripted" section. At the time this document was written the latest version was v0.21.2:
|
||||
|
||||
```
|
||||
curl -L https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.19.1/install.sh -o install.sh
|
||||
chmod +x install.sh
|
||||
./install.sh v0.19.1
|
||||
curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.21.2/install.sh | bash -s v0.21.2
|
||||
```
|
||||
|
||||
|
||||
@@ -133,9 +131,13 @@ ansible-galaxy collection install -r requirements.yml
|
||||
|
||||
3. Connect to the cluster and make sure your `kubeconfig` points to the cluster.
|
||||
|
||||
4. Install the operators:
|
||||
4. Install the operators for OpenShift / Kubernetes:
|
||||
```
|
||||
ansible-playbook operators.yml
|
||||
ansible-playbook operators-openshift.yml
|
||||
```
|
||||
or
|
||||
```
|
||||
ansible-playbook operators-kubernetes.yml
|
||||
```
|
||||
|
||||
## NFS provisioner
|
||||
|
||||
35
scripts/ansible/kubernetes-cluster/operators-kubernetes.yml
Normal file
35
scripts/ansible/kubernetes-cluster/operators-kubernetes.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
- name: Install Operators on Kubernetes Cluster
|
||||
hosts: localhost
|
||||
collections:
|
||||
- community.kubernetes
|
||||
tasks:
|
||||
|
||||
- name: Create a Subscription for Service Binding Operator
|
||||
k8s:
|
||||
state: present
|
||||
definition:
|
||||
apiVersion: operators.coreos.com/v1alpha1
|
||||
kind: Subscription
|
||||
metadata:
|
||||
name: my-service-binding-operator
|
||||
namespace: operators
|
||||
spec:
|
||||
channel: stable
|
||||
name: service-binding-operator
|
||||
source: operatorhubio-catalog
|
||||
sourceNamespace: olm
|
||||
- name: Create a Subscription for EDB Postgresql Operator
|
||||
k8s:
|
||||
state: present
|
||||
definition:
|
||||
apiVersion: operators.coreos.com/v1alpha1
|
||||
kind: Subscription
|
||||
metadata:
|
||||
name: my-cloud-native-postgresql
|
||||
namespace: operators
|
||||
spec:
|
||||
channel: stable
|
||||
name: cloud-native-postgresql
|
||||
source: operatorhubio-catalog
|
||||
sourceNamespace: olm
|
||||
Reference in New Issue
Block a user