-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/4292-ollama-based-recommender
* main: #4328 - HTML files are not rendered if they use the HTML namespace #4326 - Upgrade dependencies #4324 - Allow configuring UID GID etc in Kubernetes
- Loading branch information
Showing
13 changed files
with
276 additions
and
28 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
4 changes: 0 additions & 4 deletions
4
...n-doc/src/main/resources/META-INF/asciidoc/admin-guide/installation_docker.adoc
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
54 changes: 54 additions & 0 deletions
54
...c/src/main/resources/META-INF/asciidoc/admin-guide/installation_kubernetes.adoc
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Licensed to the Technische Universität Darmstadt under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The Technische Universität Darmstadt | ||
// licenses this file to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
[[sect_kubernetes]] | ||
= Running via Kubernetes | ||
|
||
NOTE: This is a **very rough** guide on how {application-name} could be deployed using | ||
Kubernetes. If you are familiar with Kubernetes and cloud deployment, you will | ||
probably find a lot here that can be improved. Great! Best help us improving this | ||
guide by sending us your improvement suggestions through | ||
link:https://github.com/inception-project/inception[GitHub]. | ||
|
||
The following Kubernetes file sets up {application-name} along with a few volumes. | ||
It does currently **NOT** set up a database container but instead uses the built-in | ||
database **which is not recommended for production environments**. Also, it uses | ||
folders on the host system for volumes. It is only meant as an illustration. | ||
**Be sure to adjust this to your environment and to use a proper database!** | ||
|
||
[source,text,subs="+attributes"] | ||
.Kubernetes deployment descriptor | ||
---- | ||
include::scripts/kubernetes.yml[] | ||
---- | ||
|
||
To deploy an {application-name} service copy this to a file called `inception.yml` and then run it using | ||
|
||
[source,text] | ||
.Create Kubernetes environment | ||
---- | ||
$ kubectl create -f inception.yml | ||
---- | ||
|
||
To delete the service again, use | ||
|
||
[source,text] | ||
.Delete Kubernetes environment | ||
---- | ||
$ kubectl delete -f inception.yml | ||
---- | ||
|
||
This can be tested e.g. using the Kubernetes support built into recent Docker Desktop. If you experience problems, make sure you run the latest version of Docker Desktop. |
142 changes: 142 additions & 0 deletions
142
...ion/inception-doc/src/main/resources/META-INF/asciidoc/admin-guide/scripts/kubernetes.yml
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 |
---|---|---|
@@ -0,0 +1,142 @@ | ||
kind: PersistentVolume | ||
apiVersion: v1 | ||
metadata: | ||
name: inception-data-pv | ||
labels: | ||
type: local | ||
spec: | ||
storageClassName: standard | ||
capacity: | ||
storage: 5Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
hostPath: | ||
path: "/srv/inception-kubernetes/data" | ||
--- | ||
kind: PersistentVolume | ||
apiVersion: v1 | ||
metadata: | ||
name: inception-log-pv | ||
labels: | ||
type: local | ||
spec: | ||
storageClassName: standard | ||
capacity: | ||
storage: 5Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
hostPath: | ||
path: "/srv/inception-kubernetes/data" | ||
--- | ||
kind: PersistentVolume | ||
apiVersion: v1 | ||
metadata: | ||
name: inception-tmp-pv | ||
labels: | ||
type: local | ||
spec: | ||
storageClassName: standard | ||
capacity: | ||
storage: 5Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
hostPath: | ||
path: "/srv/inception-kubernetes/data" | ||
--- | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: inception-data-pvc | ||
spec: | ||
storageClassName: standard | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 5Gi | ||
--- | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: inception-tmp-pvc | ||
spec: | ||
storageClassName: standard | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 5Gi | ||
--- | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: inception-log-pvc | ||
spec: | ||
storageClassName: standard | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 5Gi | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: inception-svc | ||
labels: | ||
app: inception | ||
spec: | ||
type: NodePort | ||
ports: | ||
- protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 | ||
nodePort: 32000 | ||
selector: | ||
app: inception | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: inception | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: inception | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: inception | ||
spec: | ||
securityContext: | ||
runAsUser: 2000 | ||
runAsGroup: 2000 | ||
fsGroup: 2000 | ||
runAsNonRoot: true | ||
containers: | ||
- name: inception | ||
image: "ghcr.io/inception-project/inception-snapshots:{revnumber}" | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 8080 | ||
securityContext: | ||
readOnlyRootFilesystem: true | ||
privileged: false | ||
volumeMounts: | ||
- mountPath: /export | ||
name: inception-data-pv | ||
- mountPath: /tmp | ||
name: inception-tmp-pv | ||
- mountPath: /var/log | ||
name: inception-log-pv | ||
volumes: | ||
- name: inception-data-pv | ||
persistentVolumeClaim: | ||
claimName: inception-data-pvc | ||
- name: inception-tmp-pv | ||
persistentVolumeClaim: | ||
claimName: inception-tmp-pvc | ||
- name: inception-log-pv | ||
persistentVolumeClaim: | ||
claimName: inception-log-pvc |
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
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
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
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
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
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
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
Oops, something went wrong.