]> apps.delaporte.us Git - dotfiles.git/blob - doc/openshift-cli.md
Init.lua with LazyVim
[dotfiles.git] / doc / openshift-cli.md
1 ## Setup
2
3 1. Install
4
5 `choco install openshift-cli`
6
7 2. Authenticate
8
9 1. Select `Developer` view.
10 2. Click your own name.
11 3. Select `Copy Login Command`
12 4. Follow prompts and then copy and paste the provided `oc` command.
13
14 3. Confirm you're connected
15
16 `oc projects`
17
18 4. Install `kompose` to support `docker-compose` to `openshift`
19
20 https://kompose.io/installation/
21
22 `go install github.com/kubernetes/kompose@latest`
23
24 ## Convert from Docker to K8S
25
26 1. Create a Docker compose file
27
28 Example: `files/openshift/calibre-web/compose.yml`
29
30 2. Create a route file
31
32 Example: `files/openshift/calibre-web/route.yml`
33
34 3. Update `compose.yml` with path to book files
35
36 4. Use Create K8S files, from `compose.yml`
37
38 ```powershell
39 cd files/openshift/calibre-web/
40 `kompose convert`
41 ```
42
43 ## Deploy
44
45 1. Create an switch to a project
46
47 ```powershell
48 oc new-project bookshelf
49 ```
50
51 2. Deploy resources
52
53 ```powershell
54 oc apply -f calibre-web-service.yaml
55 oc apply -f calibre-web-deployment.yaml
56 oc apply -f calibre-web-claim0-persistentvolumeclaim.yaml
57 oc apply -f calibre-web-claim1-persistentvolumeclaim.yaml
58 oc apply -f route.yaml
59 ```