Skip to content

Commit 8ebe5c4

Browse files
authored
Merge pull request #48 from dwasinge/remove-cache
Remove Infinispan From Git API
2 parents cc12098 + 2d69c9d commit 8ebe5c4

File tree

16 files changed

+1
-543
lines changed

16 files changed

+1
-543
lines changed

README.md

Lines changed: 1 addition & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,6 @@ If you want to learn more about Quarkus, please visit its website: https://quark
99

1010
Prior to running the app, you need to create a **Personal Access Token** linked to your GitLab account.
1111

12-
### Local Infinispan (if necessary)
13-
14-
Fire 🔥 up a docker instance of Infinispan to work with the app
15-
16-
```
17-
docker run -it -p 11222:11222 -e USER="omp" -e PASS="omp" infinispan/server:10.1
18-
```
19-
20-
### Running in dev mode
21-
22-
You can run your application in dev mode that enables **live coding** using:
23-
```
24-
export CACHE_CLIENT_INTELLIGENCE=<For mac dev set to BASIC>
25-
export CACHE_USE_AUTH=true
26-
export CONFIG_REPOSITORY_ID =<Git Repo id where the config files are>
27-
export GITLAB_API_URL=<The base url of your git api. ie https://gitlab.com>
28-
export GITLAB_PERSONAL_ACCESS_TOKEN=<GitLab Personal Access Token>
29-
export OMP_LOGGING=DEBUG
30-
export RESIDENCIES_PARENT_REPOSITORIES_ID=<Parent project id where repos will be saved>
31-
export TEMPLATE_REPOSITORY_ID=<Repo where template live>
32-
./mvnw quarkus:dev
33-
```
34-
3512
You could edit your bash profile and make your Quarkus quacky by adding this neat emoji alias, then all you need to fire up your app is run 🦆
3613
```
3714
echo "alias 🦆='./mvnw quarkus:dev -Dquarkus.http.port=8080'" >> ~/.zshrc
@@ -44,8 +21,6 @@ source ~/.zshrc
4421

4522
You can run your application using Quarkus profiles using:
4623
```
47-
export CACHE_CLIENT_INTELLIGENCE=<For mac dev set to BASIC>
48-
export CACHE_USE_AUTH=true
4924
export CONFIG_REPOSITORY_ID =<Git Repo id where the config files are>
5025
export GITLAB_API_URL=<The base url of your git api. ie https://gitlab.com>
5126
export GITLAB_PERSONAL_ACCESS_TOKEN=<GitLab Personal Access Token>
@@ -75,67 +50,6 @@ You can then execute your binary: `./target/open-management-portal-git-api-1.0.0
7550

7651
If you want to learn more about building native executables, please consult https://quarkus.io/guides/building-native-image-guide .
7752

78-
## Add Infinispan to OCP via the Infinispan Operator
79-
80-
* Cluster admin probably needed for CRD
81-
82-
### Create secret
83-
84-
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.
85-
86-
```
87-
apiVersion: v1
88-
stringData:
89-
identities.yaml: |+
90-
credentials:
91-
- username: omp
92-
password: omp
93-
- username: operator
94-
password: operator1
95-
kind: Secret
96-
metadata:
97-
labels:
98-
app: infinispan-secret-identities
99-
clusterName: omp-cache
100-
infinispan_cr: omp-cache
101-
name: omp-cache-secret
102-
type: Opaque
103-
```
104-
105-
### Create the Infinispan cluster file
106-
107-
Create a file named infinispan-cluster.yaml
108-
109-
```
110-
apiVersion: infinispan.org/v1
111-
kind: Infinispan
112-
metadata:
113-
name: omp-cache
114-
spec:
115-
replicas: 1
116-
image: infinispan/server:10.1
117-
logging:
118-
categories:
119-
org.infinispan: info
120-
org.jgroups: info
121-
security:
122-
endpointSecretName: omp-cache-secret
123-
```
124-
125-
### Create the Infinispan Operator
126-
127-
Login to OpenShift with the `oc` client and run the following commands
128-
129-
```
130-
# Install Infinispan Operator running these commands
131-
oc apply -f omp-cache-secret.yaml
132-
oc apply -f https://raw.githubusercontent.com/infinispan/infinispan-operator/master/deploy/rbac.yaml
133-
oc apply -f https://raw.githubusercontent.com/infinispan/infinispan-operator/master/deploy/operator.yaml
134-
oc apply -f https://raw.githubusercontent.com/infinispan/infinispan-operator/master/deploy/crd.yaml
135-
136-
# Create an Infinispan Cluster
137-
oc apply -f infinispan-cluster.yaml
138-
```
13953

14054
## Configuration
14155

@@ -149,7 +63,4 @@ Deployment template will read from the above secret and inject following env var
14963
* `RESIDENCIES_PARENT_REPOSITORIES_ID`
15064
* `GITLAB_API_URL`
15165
* `GITLAB_PERSONAL_ACCESS_TOKEN` (should be secret and a service account)
152-
* `CACHE_SERVICE`
153-
* `CACHE_USER`
154-
* `CACHE_PASS` (should be secret and match the Infinispan operator secret)
155-
* `CACHE_USE_AUTH` set to true
66+

deployment/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ helm template . \
3131
--values values-dev.yaml \
3232
--set git.uri=https://github.com/rht-labs/open-management-portal-git-api.git \
3333
--set git.ref=master \
34-
--set cacheService=<your-infinispan-service-name> \
35-
--set cacheUseAuth=<use-infinispan-auth> \
3634
--set configRepositoryId=<your-config-repository-id> \
3735
--set deployKey=<your-gitlab-deploy-key-id> \
3836
--set gitLabApiUrl=<your-gitlab-base-url> \
@@ -50,8 +48,6 @@ It accepts the following variables
5048
|---|---|
5149
| `git.uri` | The HTTPS reference to the repo (your fork!) to build |
5250
| `git.ref` | The branch name to build |
53-
| `cacheService` | The service name of the Infinispan deployment |
54-
| `cacheUseAuth` | Enable authentication against the cache |
5551
| `configRepositoryId` | The GitLab ID of the config repository |
5652
| `deployKey` | The ID of the GitLab deploy key to enable on newly-created repositories |
5753
| `gitLabApiUrl` | The base URL of the GitLab instance to use |

deployment/templates/cache-secret.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

deployment/templates/infinispan-cr.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

deployment/values-dev.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ git:
1313
uri: https://github.com/rht-labs/open-management-portal-git-api.git
1414
ref: master
1515

16-
cacheService: false
17-
cacheUseAuth: false
1816
configRepositoryId: false
1917
deployKey: false
2018
gitLabApiUrl: false

pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@
6161
<groupId>io.quarkus</groupId>
6262
<artifactId>quarkus-vertx</artifactId>
6363
</dependency>
64-
<!-- Cache -->
65-
<dependency>
66-
<groupId>io.quarkus</groupId>
67-
<artifactId>quarkus-infinispan-client</artifactId>
68-
</dependency>
6964
<!-- Health Checks -->
7065
<dependency>
7166
<groupId>io.quarkus</groupId>

src/main/java/com/redhat/labs/cache/EngagementDataStore.java

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/main/java/com/redhat/labs/cache/EngagementInformation.java

Lines changed: 0 additions & 58 deletions
This file was deleted.

src/main/java/com/redhat/labs/cache/GitSyncService.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/main/java/com/redhat/labs/cache/cacheStore/EngagementDataCache.java

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)