-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path00-exam_sample.txt
94 lines (70 loc) · 2.39 KB
/
00-exam_sample.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
01)
subscription-manager register
subscription-manager attach
yum module install container-tools
podman run -d bitnami/nginx
02)
podman login registry.access.redhat.com
podman login registry.redhat.io
skopeo inspect docker://registry.access.redhat.com/rhscl/mariadb-102-rhel7
podman pull registry.access.redhat.com/rhscl/mariadb-102-rhel7
podman image ls
podman run -d registry.access.redhat.com/rhscl/mariadb-102-rhel7
podman run -d -e MYSQL_ROOT_PASSWORD=password registry.access.redhat.com/rhscl/mariadb-102-rhel7
podman exec -it a1cc0a04e28f bash
03)
podman run -d --name=mynginx bitnami/nginx
podman exec -it mynginx bash
echo hello > /tmp/hello
podman commit mynginx mynewnginx
podman save mynewnginx > mynewnginx.tar
podman rmi localhost/mynewnginx
podman load -i mynewnginx.tar
podman run -d --name mynewnginx localhost/mynewnginx
podman exec -it mynewnginx cat /tmp/hello
04)
mkdir /srv/mysql
podman inspect registry.access.redhat.com/rhscl/mariadb-102-rhel7
* check user that starts the container
chown -R 27:27 /srv/mysql/
semanage fcontext -a -t container_file_t "/srv/mysql(/.*)?"
restorecon -Rv /srv/mysql/
podman run -d -p 30306:3306 -v /srv/mysql/:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password registry.access.redhat.com/rhscl/mariadb-102-rhel7
05)
yum provides */ping
yum provides */ip
yum provides */ps
podman search ubi | less
podman build -t lab115 .
podman run localhost/lab115
06)
eval $(crc oc-env)
oc complention -h
source <(oc completion bash)
oc new-project lab116
oc new-app bitnami/nginx
oc status
oc get all
oc describe pod <POD>
07)
oc new-project lab117
oc create deployment newnginx --image=bitnami/nginx --dry-run=client -o yaml > newnginx.yaml
oc create -f newnginx.yaml
oc expose deploy newnginx --dry-run=client --port=8080 -o yaml >> newnginx.yaml
oc expose deploy newnginx --port=8080
oc expose svc newnginx --dry-run=client -o yaml >> newnginx.yaml
* edit yaml and add ... and --- before each resource
oc delete -f newnginx.yaml
08)
oc new-project 118
oc new-app --template=mariadb-persistent -p MYSQL_USER=bob -p MYSQL_PASSWORD=secret -p MYSQL_DATABASE=books
09)
oc new-app php:7.3~https://github.com/murilloo/redhat-ex180-exam-preparation --context-dir=simpleapp --name simpleapp
oc get all
oc get builds
10)
oc create deployment my-dep --image=busybox
oc describe pod my-dep
oc delete deployment my-dep
oc create deployment my-dep --image=busybox -- sleep 3600
oc get all