Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Kubernetes working version #7

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions enexa-module-dir-claim-persistentvolume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: enexa-module-dir-claim
name: enexa-module-dir-claim
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 500Mi
9 changes: 9 additions & 0 deletions enexa-role.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: default
name: pod-creator
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["create", "get", "update", "delete"]
19 changes: 9 additions & 10 deletions enexa-service-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ spec:
containers:
- name: enexa-service
imagePullPolicy: IfNotPresent
image: enexa-service:0.0.1
image: hub.cs.upb.de/enexa/images/enexa-service-dev:0.0.11
env:
- name: ENEXA_MODULE_DIRECTORY
value: /modules
value: enexa-module-dir-claim
- name: ENEXA_SERVICE_URL
value: http://enexa-service:8080
- name: ENEXA_SHARED_DIRECTORY
value: /enexa
- name: ENEXA_SHARED_VOLUME
value: enexa-shared-dir-claim
- name: ENEXA_META_DATA_ENDPOINT
value: http://localhost:3030/enexa/
value: http://fuseki-devwd-service:3030/mydataset/
- name: ENEXA_META_DATA_GRAPH
value: http://example.org/meta-data
- name: ENEXA_RESOURCE_NAMESPACE
Expand All @@ -50,16 +50,15 @@ spec:
- mountPath: /enexa
name: enexa-shared-dir-claim
- mountPath: /modules
name: enexa-module-dir
name: enexa-module-dir-claim
restartPolicy: Always
volumes:
- name: enexa-shared-dir-claim
persistentVolumeClaim:
claimName: enexa-shared-dir-claim
- name: enexa-module-dir
hostPath:
# directory location on host
path: /home/micha/data/enexa/modules
# this field is optional
type: DirectoryOrCreate
- name: enexa-module-dir-claim
persistentVolumeClaim:
claimName: enexa-module-dir-claim
nodeSelector:
kubernetes.io/hostname: minikube
status: {}
13 changes: 13 additions & 0 deletions enexa-service-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: pod-creator-binding
namespace: default
subjects:
- kind: ServiceAccount
name: default # Specify the service account name here
namespace: default
roleRef:
kind: Role
name: pod-creator
apiGroup: rbac.authorization.k8s.io
49 changes: 35 additions & 14 deletions enexa-service-service.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
#apiVersion: v1
#kind: Service
#metadata:
# annotations:
# kompose.cmd: kompose convert
# kompose.version: 1.26.0 (40646f47)
# creationTimestamp: null
# labels:
# io.kompose.service: enexa-service
# name: enexa-service
#spec:
# ports:
# - name: "8081"
# port: 8081
# targetPort: 8081
# selector:
# io.kompose.service: enexa-service
#status:
# loadBalancer: {}

apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: enexa-service
name: enexa-service
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: enexa-service
name: enexa-service
spec:
ports:
- name: "8080"
port: 8080
targetPort: 8080
selector:
io.kompose.service: enexa-service
ports:
- name: "8081" # Exposed port (can be any open port)
port: 8081 # Target port (port the pod listens on)
targetPort: 8081
selector:
io.kompose.service: enexa-service
type: NodePort # Exposes the pod on a NodePort
status:
loadBalancer: {}
loadBalancer: {}
4 changes: 2 additions & 2 deletions enexa-shared-dir-claim-persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ metadata:
name: enexa-shared-dir-claim
spec:
accessModes:
- ReadWriteOnce
- ReadWriteMany
resources:
requests:
storage: 100Mi
storage: 25000Mi
status: {}
6 changes: 3 additions & 3 deletions enexa-shared-local-volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ metadata:
name: enexa-shared-pv
spec:
capacity:
storage: 10Gi
storage: 25000Mi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
- ReadWriteMany
persistentVolumeReclaimPolicy: Delete
storageClassName: local-storage
local:
path: /home/mroeder/data/enexa/shared
path: /home/farshad/test/enexa/shared
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
22 changes: 22 additions & 0 deletions exena-module-local-volume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: enexa-module-pv
spec:
capacity:
storage: 500Mi
volumeMode: Filesystem
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Delete
storageClassName: local-storage
local:
path: /home/farshad/test/enexa/shared
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- minikube
11 changes: 11 additions & 0 deletions fuseki-service-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: fuseki-devwd-service
spec:
selector:
app: fuseki-devwd # Match pods in the Deployment
ports:
- protocol: TCP
port: 3030 # Match container port
targetPort: 3030 # Target the container port
46 changes: 29 additions & 17 deletions fuseki-service.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
apiVersion: v1
kind: Service
apiVersion: apps/v1
kind: Deployment #TODO should it be service !
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: fuseki
name: fuseki
name: fuseki-devwd # Match your container name
spec:
ports:
- name: "3030"
port: 3030
targetPort: 3030
selector:
io.kompose.service: fuseki
status:
loadBalancer: {}
replicas: 1 # Number of pods to run
selector:
matchLabels:
app: fuseki-devwd # Label for pods
template:
metadata:
labels:
app: fuseki-devwd
spec:
containers:
- name: fuseki-devwd
image: stain/jena-fuseki # Your container image
ports:
- containerPort: 3030
name: http # Optional name for the port
env:
- name: ADMIN_PASSWORD
value: "pw123" # Environment variable
volumeMounts:
- name: fuseki-data # Volume name
mountPath: /fuseki # Path to mount volume in container
volumes:
- name: fuseki-data # Persistent volume claim (PVC) needed later
emptyDir: {} # EmptyDir volume for data (consider Persistent Volume for persistence)


2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
<dependency>
<groupId>org.dice-research</groupId>
<artifactId>enexa.java-utils</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.0.2-SNAPSHOT</version>
</dependency>
<!-- Spring Jena -->
<dependency>
Expand Down
Loading