Skip to content

Commit

Permalink
docs: explain how to build and run samples independently (#283)
Browse files Browse the repository at this point in the history
Closes: #268
  • Loading branch information
scrocquesel authored Mar 21, 2022
1 parent b32b0f5 commit d66f1c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion samples/joke/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ cluster. You can just follow the steps below to get started quickly:

- Connect to your cluster of choice using `kubectl/oc`, select the appropriate namespace/project.
The operator will automatically connect to that cluster/namespace combination when started.
- Run `mvn install` on the parent directory to build the project locally. This will automatically generate several resources for
- Run `mvn -Dquickly` on the root directory to build the project locally and move to this sample directory.
- Run `mvn package` to build the operator. This will automatically generate several resources for
you, in particular the CRDs associated with the custom resources we will be dealing with. These
CRDs are generated in `target/manifests/` and come in `v1` version which correspond to the versions of the CRD spec. Note that older clusters might need the version `v1beta1` which is no longer generated by default. To generate it, you need to use the property `quarkus.operator-sdk.crd.versions=v1beta1,v1`, so both versions `v1` and `v1beta1` are generated.
- Deploy the CRDs to your cluster (requires cluster admin privileges, while this shouldn't be an
Expand Down
6 changes: 3 additions & 3 deletions samples/mysql-schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ cluster. You can just follow the steps below to get started quickly:

- Connect to your cluster of choice using `kubectl/oc`, select the appropriate namespace/project.
The operator will automatically connect to that cluster/namespace combination when started.
- Run `mvn install` on the parent directory to build the project locally.
- Run `mvn -Dquickly` on the root directory to build the project locally and move to this sample directory.
- Run `mvn package` to build the operator. This will automatically generate several resources for
you, in particular the CRDs associated with the custom resources we will be dealing with. These
CRDs are generated in `target/kubernetes`.
CRDs are generated in `target/manifests`.
- Deploy the CRDs to your cluster (requires cluster admin privileges, while this shouldn't be an
issue for most "testing" clusters such as `minikube` or `kind`, you might need to log in to your
OpenShift clusters with an admin account):
```sh
kubectl apply -f target/kubernetes/mysqlschemas.mysql.sample.javaoperatorsdk-v1.yml
kubectl apply -f target/manifests/mysqlschemas.mysql.sample.javaoperatorsdk-v1.yml
```
- If you look at the application.properties, you will notice this is where the access to the MySQL server is configured.
In dev mode, such a server is provided by [Quarkus DevService](https://quarkus.io/guides/dev-services).
Expand Down

0 comments on commit d66f1c1

Please sign in to comment.