You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -51,40 +73,97 @@ You can then execute your binary: `./target/open-management-portal-git-api-1.0.0
51
73
52
74
If you want to learn more about building native executables, please consult https://quarkus.io/guides/building-native-image-guide .
53
75
54
-
## Add basic JDG to OCP
76
+
## Add Infinispan to OCP via the Infinispan Operator
77
+
78
+
* Cluster admin probably needed for CRD
79
+
80
+
### Create secret
81
+
82
+
Create a secret file named `omp-cache-secret.yaml`. This secret will create an `identities.yaml` file on the cache. Take note of the name that must match the app secret By default the user / pass will be omp / omp as defined in `src/main/resources/application.properties` and the secret below.
83
+
84
+
```
85
+
apiVersion: v1
86
+
stringData:
87
+
identities.yaml: |+
88
+
credentials:
89
+
- username: omp
90
+
password: omp
91
+
- username: operator
92
+
password: operator1
93
+
kind: Secret
94
+
metadata:
95
+
labels:
96
+
app: infinispan-secret-identities
97
+
clusterName: omp-cache
98
+
infinispan_cr: omp-cache
99
+
name: omp-cache-secret
100
+
type: Opaque
101
+
```
102
+
103
+
### Create the Infinispan cluster file
104
+
105
+
Create a file named infinispan-cluster.yaml
106
+
107
+
```
108
+
apiVersion: infinispan.org/v1
109
+
kind: Infinispan
110
+
metadata:
111
+
name: omp-cache
112
+
spec:
113
+
replicas: 1
114
+
image: infinispan/server:10.1
115
+
logging:
116
+
categories:
117
+
org.infinispan: info
118
+
org.jgroups: info
119
+
security:
120
+
endpointSecretName: omp-cache-secret
121
+
```
122
+
123
+
### Create the Infinispan Operator
124
+
125
+
Login to OpenShift with the `oc` client and run the following commands
126
+
55
127
```
56
-
oc new-app cache-service \
57
-
-p APPLICATION_USER=omp \
58
-
-p APPLICATION_PASSWORD=<PASSWORD> \
59
-
-p TOTAL_CONTAINER_MEM=4096 \
60
-
-p EVICTION_POLICY=reject \
61
-
-n <PROJECT_NAME>
128
+
# Install Infinispan Operator running these commands
The preferred place to store non-sensitive data is in the application.properties.
66
140
67
-
Sensitive fields like git repo location, repository id for residencies, repository id for the config and the GitLab API token are stored in the secrets.
141
+
Sensitive fields like the gitlab token and cluster credentials should be stored in a OpenShift secret at a minimum. Other environment specific information should be stored in environmental variables such as repository id for residencies and repository id for the config.
68
142
This info is stored in `ocp-s11/labs-test/omp-gitlab-configuration`.
69
143
70
144
Deployment template will read from the above secret and inject following env variables. These are controlled from application.properties, so if a different env name is needed, change in the application properties file and the deployment template.
71
145
72
146
*`TEMPLATE_REPOSITORY_ID`
73
147
*`RESIDENCIES_PARENT_REPOSITORIES_ID`
74
148
*`GITLAB_API_URL`
75
-
*`GITLAB_PERSONAL_ACCESS_TOKEN`
149
+
*`GITLAB_PERSONAL_ACCESS_TOKEN` (should be secret and a service account)
150
+
*`CACHE_SERVICE`
151
+
*`CACHE_USER`
152
+
*`CACHE_PASS` (should be secret and match the Infinispan operator secret)
153
+
*`CACHE_USE_AUTH` set to true
154
+
**
76
155
77
156
### OpenShift Applier
78
157
79
-
This project includes an `openshift-applier` inventory. To use it, make sure that you are logged in to the cluster and that you customize the variables in `.applier/inventory/group_vars/all.yml` - namely make sure that `deploy_vars` uses the correct endpoints. Once these are configured, you can deploy the project with:
158
+
This section is not guaranteed to be up to date. This project includes an `openshift-applier` inventory. To use it, make sure that you are logged in to the cluster and that you customize the variables in `.applier/inventory/group_vars/all.yml` - namely make sure that `deploy_vars` uses the correct endpoints. Once these are configured, you can deploy the project with:
0 commit comments