-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#119] doc: add details on the OpenShift setup
Add details on the documentation about setting up an OpenShift cluster and how to deploy the operator on it. These two steps being requirements for running the plugin successfully.
- Loading branch information
Showing
1 changed file
with
80 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,20 +4,91 @@ This project is a ActiveMQ Artemis Self Provisioning Plugin to the Administrator | |
|
||
## Local development | ||
|
||
To be able to run the local development environment you need to: | ||
* have access to an OpenShift cluster | ||
* have the operator installed on the cluster | ||
* have the plugin running | ||
* have the console running | ||
|
||
### Setting up an OpenShift cluster | ||
|
||
In order to run the project you need to have access to an OpenShift cluster. | ||
You can either request one to the `Cluster bot` on slack, or install one on your | ||
local development environment. | ||
|
||
#### Remote cluster | ||
|
||
Find the `Cluster bot` app on slack and send it a message to start a cluster | ||
`launch 4.12` | ||
|
||
Starting the cluster can take between 15 and 45 minutes. Once it is up it'll | ||
stay up for about 190 minutes. | ||
|
||
> [!IMPORTANT] | ||
> for connecting to the cluster you will need to have access to the `oc` | ||
> command. One way to get it is to follow the local cluster setup as it will pull | ||
> the binary for you. As far as the author knows the `oc` binary can't be | ||
> installed with traditional packages. | ||
#### Local cluster | ||
|
||
Follow the documentation: | ||
https://access.redhat.com/documentation/en-us/red_hat_openshift_local/2.34/html-single/getting_started_guide/index#introducing | ||
|
||
> [!WARNING] | ||
> If you're running the cluster on Fedora CSB, note that [you might | ||
> need](https://github.com/crc-org/crc/issues/4110) to | ||
> configure the network as local: `crc config set network-mode user` | ||
Once your environment is set up you simply need to `crc start` your cluster. | ||
|
||
#### Connecting to the cluster | ||
|
||
Depending on the remote or local env: | ||
|
||
* `oc login -u kubeadmin | ||
https://api.ci-ln-x671mxk-76ef8.origin-ci-int-aws.dev.rhcloud.com:6443` (to | ||
adapt depending on your cluster address) | ||
* `oc login -u kubeadmin https://api.crc.testing:6443` | ||
|
||
### Installing the operator | ||
|
||
The plugin requires having access to the operator to function. Clone the | ||
operator repository then run `./deploy/install_opr.sh` to install the operator | ||
onto your cluster. | ||
|
||
``` | ||
git clone [email protected]:artemiscloud/activemq-artemis-operator.git | ||
cd activemq-artemis-operator | ||
./deploy/install_opr.sh | ||
``` | ||
|
||
> [!TIP] | ||
> If you need to redeploy the operator, first call `./deploy/undeploy_all.sh` | ||
> [!IMPORTANT] | ||
> The script `install_opr.sh` will try to deploy on OpenShift with the `oc` | ||
> command. If it's not available it will fallback to `kubectl`. Make sure your | ||
> OpenShift cluster is up and running and that `oc` is connected to it before | ||
> running the install. | ||
### Running the plugin | ||
|
||
In one terminal window, run: | ||
|
||
1. `yarn install` | ||
2. `yarn run start` | ||
|
||
Note: `yarn run start` starts the plugin in http mode. | ||
if you want the plugin to run in https mode, run | ||
> [!NOTE] | ||
> `yarn run start` starts the plugin in http mode. | ||
> if you want the plugin to run in https mode, run | ||
> `yarn run start-tls` | ||
`yarn run start-tls` | ||
### Running the console | ||
|
||
In another terminal window, run: | ||
|
||
1. `oc login` | ||
2. `yarn run start-console` (requires [Docker](https://www.docker.com) or [podman](https://podman.io)) | ||
`yarn run start-console` (requires [Docker](https://www.docker.com) or [podman](https://podman.io)) | ||
|
||
This will run the OpenShift console in a container connected to the cluster | ||
you've logged into. The plugin HTTP server runs on port 9001 with CORS enabled. | ||
|
@@ -30,7 +101,10 @@ If you want the console to run in `https` mode, run: | |
This command will run the console in `https` mode on port 9442. | ||
The console url is <https://localhost:9442> | ||
|
||
Note: Running console in `https` mode requires the plugin running in `https` mode too. | ||
> [!IMPORTANT] | ||
> Running console in `https` mode requires the plugin running in `https` mode too. | ||
#### HTTPS | ||
|
||
The console in https mode requires a private key and a server certificate that are generated | ||
with openssl command. They are located under `console-cert` directory. The domain.key is the | ||
|