Skip to content

Commit d35ef3c

Browse files
committed
shift-week: add topolvm upstream manifests
Signed-off-by: Evgeny Slutsky <[email protected]>
1 parent b716736 commit d35ef3c

File tree

6 files changed

+14588
-1
lines changed

6 files changed

+14588
-1
lines changed

okd/storage/README.md

+37-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,39 @@
11
## examples for using with storage
2+
3+
### run Microshift with upsteam topolvm storage
4+
5+
1. prepare the LVM backend on the host (example only)
6+
```bash
7+
truncate --size=20G /tmp/lvmdisk
8+
losetup -f /tmp/lvmdisk
9+
device_name=$(losetup -j /tmp/lvmdisk | cut -d: -f1)
10+
vgcreate -f -y myvg1 /dev/${device_name}
11+
lvcreate -T myvg1/thinpool -L 6G
12+
```
13+
14+
15+
1. run microshift in OKD and wait for it to be ready
16+
```bash
17+
export kustomize_dir=/usr/lib/microshift/manifests.d/001-topolvm
18+
sudo podman run --privileged --rm --name microshift-okd \
19+
-v $(pwd)/okd/storage/topolvm:${kustomize_dir}:z \
20+
--hostname 127.0.0.1.nip.io \
21+
-p 5432:5432 -p 6443:6443 \
22+
-d localhost/microshift-okd-4.19
23+
```
24+
25+
1. wait for all the components to come up
26+
```bash
27+
> sudo podman exec microshift-okd bash -c "microshift healthcheck --namespace topolvm-system --deployments topolvm-controller "
28+
??? I0331 14:38:46.838208 5894 service.go:29] microshift.service is enabled
29+
??? I0331 14:38:46.838235 5894 service.go:31] Waiting 5m0s for microshift.service to be ready
30+
??? I0331 14:38:46.839291 5894 service.go:38] microshift.service is ready
31+
??? I0331 14:38:46.840014 5894 workloads.go:94] Waiting 5m0s for deployment/topolvm-controller in topolvm-system
32+
??? I0331 14:38:46.844984 5894 workloads.go:132] Deployment/topolvm-controller in topolvm-system is ready
33+
??? I0331 14:38:46.845003 5894 healthcheck.go:75] Workloads are ready
34+
```
35+
36+
237
### run Microshift with hostpath volume
338
A hostPath volume mounts a file or directory from the host node’s file system into your pod.
439
Most pods do not need a hostPath volume, but it does offer a quick option for testing should an application require it (some requires persistent storage - DBs).
@@ -12,7 +47,7 @@ Most pods do not need a hostPath volume, but it does offer a quick option for te
1247
1348
sudo podman run --privileged --rm --name microshift-okd \
1449
-v ${data_dir}:/var/lib/pvdata:z \
15-
-v $(pwd)/okd/examples/hostpath:${kustomize_dir}:z \
50+
-v $(pwd)/okd/storage/hostpath:${kustomize_dir}:z \
1651
--hostname 127.0.0.1.nip.io \
1752
-p 5432:5432 -p 6443:6443 \
1853
-d localhost/microshift-okd
@@ -46,3 +81,4 @@ Most pods do not need a hostPath volume, but it does offer a quick option for te
4681
4782
1. stop the container `sudo podman stop microshift-okd`
4883
1. start a new container instance and verify data is still exists.
84+

0 commit comments

Comments
 (0)