THIS IS ONLY A TEST INSTANCE. DON'T DO IMPORTANT WORK HERE!

README.md 2.82 KB
Newer Older
1 2 3 4 5
# Pre-Requisites

OLM packages scripts are using some required dependencies that need to be installed
 - [curl](https://curl.haxx.se/)
 - [https://github.com/kislyuk/yq](https://github.com/kislyuk/yq) and not [http://mikefarah.github.io/yq/](http://mikefarah.github.io/yq/)
6
 - [Operator SDK v0.10.0](https://github.com/operator-framework/operator-sdk/blob/v0.10.0/doc/user/install-operator-sdk.md)
7

8 9
WARNING: Please make sure to use the precise `v0.10.0` version of the `operator-sdk`. If you use a more recent version, you might generate a CRD that is not compatible with Kubernetes 1.11 and Openshift 3.11 (see issue https://github.com/eclipse/che/issues/15396).

10 11 12 13 14 15 16 17 18 19 20 21 22 23
If these dependencies are not installed, `docker-run.sh` can be used as a container bootstrap to run a given script with the appropriate dependencies.

Example : `$ docker-run.sh update-nightly-olm-files.sh`


# Make new changes to OLM artifacts

Every change needs to be done in a new OLM artifact as previous artifacts are frozen.

A script is generating new folders/files that can be edited.

In `olm` folder

- If all dependencies are installed on the system:
24 25

```shell
26 27 28 29
$ update-nightly-olm-files.sh
```

- To use a docker environment
30 31

```shell
32 33 34 35
$ docker-run.sh update-nightly-olm-files.sh
```

Then the changes can be applied in the newly created CSV files.
36 37 38

## Local testing che-operator development version using OLM

39
To test a che-operator with OLM you need to have an application registry. You can register on the quay.io and
40 41
use application registry from this service.
Build your custom che-operator image and push it to the image registry(you also can use quay.io).
42
Change in the `deploy/operator.yaml` operator image from official to development.
43

44
Generate new nightly olm bundle packages:
45 46

```shell
47
$ ./update-nightly-olm-files.sh
48 49
```

50
Olm bundle packages will be generated in the folders `olm/eclipse-che-preview-${platform}`.
51 52 53 54

Push che-operator bundles to your application registry:

```shell
55
$ export QUAY_USERNAME=${username} && \
56 57 58 59 60
export QUAY_PASSWORD=${password} && \
export APPLICATION_REGISTRY=${application_registry_namespace} && \
./push-olm-files-to-quay.sh
```

61 62
Go to the quay.io and use ui(tab Settings) to make your application public.
Start minikube(or CRC) and after that launch test script in the olm folder:
63 64

```shell
65
$ export APPLICATION_REGISTRY=${application_registry_namespace} && ./testCSV.sh ${platform} ${package_version} ${optional-namespace}
66 67
```

68 69 70 71 72 73
Where are:
 - `platform` - 'openshift' or 'kubernetes'
 - `package_version` - your generated che-operator package version(for example: `7.8.0` or `9.9.9-nightly.1562083645`)
 - `optional-namespace` - kubernetes namespace to deploy che-operator. Optional parameter, by default operator will be deployed to the namespace `eclipse-che-preview-test`

This script should install che-operator using OLM and check that the Che server was deployed.