--- /dev/null
+## Setup
+
+1. Install
+
+ `choco install openshift-cli`
+
+2. Authenticate
+
+ 1. Select `Developer` view.
+ 2. Click your own name.
+ 3. Select `Copy Login Command`
+ 4. Follow prompts and then copy and paste the provided `oc` command.
+
+3. Confirm you're connected
+
+ `oc projects`
+
+4. Install `kompose` to support `docker-compose` to `openshift`
+
+ https://kompose.io/installation/
+
+ `go install github.com/kubernetes/kompose@latest`
+
+## Deployment
+
+1. Create a Docker compose file
+
+ Example: `files/openshift/calibre-web/compose.yml`
+
+2. Create a route file
+
+ Example: `files/openshift/calibre-web/route.yml`
+
+4. Use Create K8S files, from `compose.yml`
+
+ ```powershell
+ cd files/openshift/calibre-web/
+ `kompose convert`
+ ```
+
+3. Deploy
+
+ ```powershell
+ oc apply -f *.yml
+ ```
+
--- /dev/null
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ creationTimestamp: null
+ labels:
+ io.kompose.service: calibre-web-claim0
+ name: calibre-web-claim0
+spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 100Mi
+status: {}
--- /dev/null
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ creationTimestamp: null
+ labels:
+ io.kompose.service: calibre-web-claim1
+ name: calibre-web-claim1
+spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 100Mi
+status: {}
--- /dev/null
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ annotations:
+ kompose.cmd: C:\Users\delaport\go\bin\kompose.exe convert
+ kompose.version: 1.31.2 (HEAD)
+ creationTimestamp: null
+ labels:
+ io.kompose.service: calibre-web
+ name: calibre-web
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ io.kompose.service: calibre-web
+ strategy:
+ type: Recreate
+ template:
+ metadata:
+ annotations:
+ kompose.cmd: C:\Users\delaport\go\bin\kompose.exe convert
+ kompose.version: 1.31.2 (HEAD)
+ creationTimestamp: null
+ labels:
+ io.kompose.network/calibre-web-default: "true"
+ io.kompose.service: calibre-web
+ spec:
+ containers:
+ - env:
+ - name: DOCKER_MODS
+ value: linuxserver/mods:universal-calibre
+ - name: OAUTHLIB_RELAX_TOKEN_SCOPE
+ value: "1"
+ - name: PGID
+ value: "1000"
+ - name: PUID
+ value: "1000"
+ - name: TZ
+ value: Etc/UTC
+ image: lscr.io/linuxserver/calibre-web:latest
+ name: calibre-web
+ ports:
+ - containerPort: 8083
+ hostPort: 8083
+ protocol: TCP
+ resources: {}
+ volumeMounts:
+ - mountPath: /config
+ name: calibre-web-claim0
+ - mountPath: /books
+ name: calibre-web-claim1
+ restartPolicy: Always
+ volumes:
+ - name: calibre-web-claim0
+ persistentVolumeClaim:
+ claimName: calibre-web-claim0
+ - name: calibre-web-claim1
+ persistentVolumeClaim:
+ claimName: calibre-web-claim1
+status: {}
--- /dev/null
+apiVersion: v1
+kind: Service
+metadata:
+ annotations:
+ kompose.cmd: C:\Users\delaport\go\bin\kompose.exe convert
+ kompose.version: 1.31.2 (HEAD)
+ creationTimestamp: null
+ labels:
+ io.kompose.service: calibre-web
+ name: calibre-web
+spec:
+ ports:
+ - name: "8083"
+ port: 8083
+ targetPort: 8083
+ selector:
+ io.kompose.service: calibre-web
+status:
+ loadBalancer: {}
--- /dev/null
+---
+version: "2.1"
+services:
+ calibre-web:
+ image: lscr.io/linuxserver/calibre-web:latest
+ container_name: calibre-web
+ environment:
+ - PUID=1000
+ - PGID=1000
+ - TZ=Etc/UTC
+ - DOCKER_MODS=linuxserver/mods:universal-calibre #optional
+ - OAUTHLIB_RELAX_TOKEN_SCOPE=1 #optional
+ volumes:
+ - /path/to/data:/config
+ - /path/to/calibre/library:/books
+ ports:
+ - 8083:8083
+ restart: unless-stopped
\ No newline at end of file
--- /dev/null
+apiVersion: route.openshift.io/v1
+kind: Route
+metadata:
+ name: calibre-web-route
+spec:
+ host: books.apps.homelab1.lab.delaporte.us
+ to:
+ kind: Service
+ name: calibre-web
+ port:
+ targetPort: 8080
\ No newline at end of file