RedHat EX200 Exam - Topic 3 Question 69 Discussion
Part 1 (on Node1 Server)Task 15 [Running Containers]Create a container named logserver with the image rhel8/rsyslog found from the registry registry.domain15.example.com:5000The container should run as the root less user shangrila. use redhat as password [sudo user]Configure the container with systemd services as the shangrila user using the service name, ''container-logserver'' so that it can be persistent across reboot.Use admin as the username and admin123 as the credentials for the image registry.
A) Explanation:
*
[root@workstation ~]# ssh shangrila@node1
[shangrila@node1 ~]$ podman login registry.domain15.example.com:5000
Username: admin
Password:
Login Succeeded!
[shangrila@node1 ~]$ podman pull registry.domain15.example.com:5000/rhel8/rsyslog
[shangrila@node1 ~]$ podman run -d --name logserver registry.domain15.example.com:5000/rhel8/rsyslog
021b26669f39cc42b8e94eab886ba8293d6247bf68e4b0d76db2874aef284d6d
[shangrila@node1 ~]$ mkdir -p ~/.config/systemd/user
[shangrila@node1 ~]$ cd ~/.config/systemd/user
*
[shangrila@node1 user]$ podman generate systemd --name logserver --files --new
/home/shangrila/.config/systemd/user/container-logserver.service
[shangrila@node1 ~]$ systemctl --user daemon-reload
[shangrila@node1 user]$ systemctl --user enable --now container-logserver.service
[shangrila@node1 ~]$ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7d9f7a8a4d63 registry.domain15.example.com:5000/rhel8/rsyslog:latest /bin/rsyslog.sh 2 seconds ago logserver
[shangrila@node1 ~]$ sudo reboot
[shangrila@node1 ~]$ cd .config/systemd/user
[shangrila@node1 user]$ systemctl --user status
Tomas
10 months agoMerlyn
10 months agoKristal
11 months agoWei
11 months agoGarry
11 months agoIn
11 months agoHolley
11 months agoKeneth
11 months agoDallas
11 months agoQuinn
11 months agoReiko
12 months ago