Since last few weekend I am learning Docker. A great initiative from Linux word under IIEC Rise and guidance of Vimal Daga. At the completion of this training I have implemented container technology and created my own monitoring system(Moatis).
Project steps:-
- Pull centos:7 image
- I created a volume for persistent storage
- Launched a container
- Exposed it to public
- Login into newly created centos container
- Deployed Nagios
- Setup monitoring on few hosts
- Tested if each and everything is working fine or not.
Please check below for all the commands which I have executed to complete this project.
Commands I have executed on Container Host -
176 podman container ls
177 podman container ls -a
178 podman image ls
179 podman volume create mymoatis
180 podman volume inspect mymoatis
181 cd /var/lib/containers/storage/mymoatis/_data/
182 ls
183 podman volume rm mymoatis
184 podman volume ls
185 podman volume create moatis_storage
186 podman volume ls
187 podman container run -dit --name my_moatis -v moatis_storage:/var/local/nagios -p 8080:80 docker.io/library/centos
188 podman image ls
189 podman container run -dit --name my_moatis -v moatis_storage:/var/local/nagios -p 8080:80 docker.io/library/centos:7 docker.io/library/centos:7
190 podman container ls
191 podman container ps -a
192 podman container rm 4c238f3ca3bb
193 podman container ps -a
194 podman container run -dit --name my_moatis -v moatis_storage:/var/local/nagios -p 8080:80 docker.io/library/centos:7 docker.io/library/centos:7
195 podman container ps -a
196 podman attach e41614fe7b4d
197 podman container start e41614fe7b4d
198 podman image ls
199 podman container rm 4c238f3ca3bb
200 podman container rm e41614fe7b4d
201 podman container ps -a
202 podman image ls
203 podman container run -dit --name my_moatis -v moatis_storage:/var/local/nagios -p 8080:80 docker.io/library/centos:7
204 podman container ps -a
205 podman attach 262f0db5af65
206 podman container run -dit --privileged=true --name my_moatis1 -v moatis_storage:/var/local/nagios -p 8080:80 localhost/my_moatis1:1
207 podman attach my_moatis1
208 podman container rm 3a95724d16c58a385ff31ca88fccd5b8e58b012e25af2cc0d1a0e0a65131a67b
209 podman container run -dit --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro --name my_moatis1 -v moatis_storage:/var/local/nagios -p 8080:80 localhost/my_moatis1:1
210 podman container rm my_moatis1
211 podman container run -dit --privileged /usr/sbin/init --name my_moatis1 -v moatis_storage:/var/local/nagios -p 8080:80 localhost/my_moatis1:1
212 podman container run -dit --privileged IMAGE /usr/sbin/init --name my_moatis1 -v moatis_storage:/var/local/nagios -p 8080:80 localhost/my_moatis1:1
213 podman container run -dit --privileged=true --name my_moatis1 -v moatis_storage:/var/local/nagios -p 8080:80 localhost/my_moatis1:1 bash
214 ifconfig enp0s3
215 podman container ps -a
216 systemctl status httpd
217 yum install httpd
218 yum install http -y
219 yum repolist
220 dnf install http -y
221 dnf install httpd -y
222 df -hT
223 cat /etc/yum.repos.d/my.repo
224 df -hT
225 yum repolist
226 dnf install httpd -y
227 yum repolist
228 dnf clean all
229 dnf repolist
230 dnf cleanall
231 dnf repolist
232 dnf clean all
233 dnf repolist
234 dnf install httpd -y
235 systemctl status httpd
236 systemctl start httpd
237 systemctl status httpd
238 view /usr/lib/systemd/system/httpd.service
239 podman image ls
240 podman container commit my_moatis1 my_moatis2
241 podman image ls
242 podman container run -dit --privileged=true --name my_moatis2 -v moatis_storage:/var/local/nagios -p 8080:80 localhost/my_moatis2:latest /usr/sbin/init
243 systemctl status httpd
244 systemctl enable httpd
245 systemctl restart httpd
246 systemctl status httpd
247 cd /root/nagios
248 ping 5786a768776f
249 ifconfig
250 ifconfig enp0s3
251 podman container commit my_moatis2
252 podman container commit my_moatis2 nagios_final
253 podman image ls
Commands executed on Moatis container -
[root@5786a768776f objects]# history
1 systemctl
2 systemctl
3 systemctl status httpd
4 systemctl start httpd
5 systemctl enable httpd
6 cd /root/
7 ls
8 cd nagios/
9 ls
10 ls -ld
11 ls -l
12 cd nagios-plugins-2.2.1
13 ./configure --with-nagios-user=nagios --with-nagios-group=nagios
14 make
15 make install
16 /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
17 systemctl enable nagios
18 systemctl enable httpd
19 systemctl start nagios.service
20 ping 192.168.1.8
21 history
22 nagios check
23 vim /usr/local/nagios/etc/objects/localhost.cfg
24 ifconfig
25 vim /usr/local/nagios/etc/objects/localhost.cfg
26 cd /usr/local/nagios/etc/objects/
27 grep -irow localhost .
28 vim vim localhost.cfg
29 ls
30 vim localhost.cfg
31 vim localhost.cfg
32 /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
33 vim /usr/local/nagios/etc/objects/localhost.cfg
34 /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
35 systemctl reload nagios
36 /usr/local/nagios/libexec/check_icmp -H 10.88.0.10
37 systemctl status sshd
38 yum install openssh-server -y
39 systemctl status sshd
40 systemctl start sshd
41 systemctl enable sshd
42 systemctl status sshd
43 /usr/local/nagios/libexec/check_http -H 10.88.0.10
44 /usr/local/nagios/libexec/check_http --help
45 /usr/local/nagios/libexec/check_http -H 10.88.0.10 -p 80
46 /usr/local/nagios/libexec/check_http -H 10.88.0.10 -p 80
47 vim /usr/local/nagios/etc/objects/localhost.cfg
48 ls
49 ls
50 vim windows.cfg
51 ping 192.168.1.2
52 ls
53 vim commands.cfg
54 ping hub.docker.com
55 history
[root@5786a768776f objects]#
thank you very much for useful blog
ReplyDeletedocker training
kubernetes training
permosOrio_piMilwaukee Erin Allen https://marketplace.visualstudio.com/items?itemName=4cialuforto.Adam-And-Eve--The-Game---Chapter-1-gratuita-2022
ReplyDeleteilblinticwcir
carscilian_Topeka Tamara Douglas Express VPN
ReplyDeleteAutodesk Maya
HDD Regenerator
hurlwiresum
ApulcturWos-gu-1992 Tim Beard Free download
ReplyDeleteprogram
quehattiber