11. Packages vs Containers
11
Packages
Operating System
Sources
Process1
Process2
Process3
Containers
Operating System
Operating System
Process1
Operating System
Process2
vs
Packages types processes are running on host, but in the container environment, the
processes are running on container.
12. Packages vs Containers
12
Packages
Operating System
Nova
Sources
nova-sch
eduler
nova-con
ductor
nova-api
Containers
Operating System
Operating System
nova-api
Operating System
nova-sch
eduler
vs
In the packages environment, we can modify service’s configuration. But in the containers
environment, we need to rebuild container images for modifying.
17. OpenStack Container Environment
17
Controller
Docker
Nova
nova_api nova_metadata
nova_conductor nova_placement
nova_sheduler nova_vnc_proxy
...
Red Hat Enterprise Linux 7.6
Neutron
neutron_api neutron_ovs_agent
neutron_l3_agent neutron_dhcp
neutron_metadata_agent
Cinder
cinder_api cinder_schedulr
openstack_cinder_volume_docker0
Glacne
glance_api
Keystone
keystone
Horizon
horizon
Logs
Nova
/var/log/containers/nova
Neutron
/var/log/containers/neutron
Cinder
/var/log/containers/cinder
Glance
/var/log/containers/glance
Horizon
/var/log/containers/horizon
...
Configs
Nova
/var/lib/config-data/puppet
-generated/nova/etc/nova/
Neutron
/var/lib/config-data/puppet
-generated/neutron/etc/neut
ron/
Cinder
/var/lib/config-data/puppet
-generated/cinder/etc/cinde
r/
Glance
/var/lib/config-data/puppet
-generated/glance/etc/glanc
e/
Horizon
/var/lib/config-data/puppet
-generated/horizon/etc/open
stack-dashboard/
...
Mount
Mount
Mount
Mount
Mount
...
Mount
Mount
Mount
Mount
Mount
...
Container
Directory
rhel7.6
rhel7.6
rhel7.6
rhel7.6
rhel7.6
rhel7.6
18. How to configure OpenStack
18
[root@con1 puppet-generated]# cd /var/lib/config-data/puppet-generated/nova
[root@con1 nova]# ll
total 0
drwxr-xr-x. 6 root root 62 Sep 29 01:56 etc
drwxr-xr-x. 4 root root 30 Aug 7 09:34 var
[root@con1 nova]#
[root@con1 nova]# ll etc
total 0
drwxr-xr-x. 5 root root 54 Aug 7 09:34 httpd
drwxr-xr-x. 2 root root 25 Sep 29 01:56 my.cnf.d
drwxr-xr-x. 2 root root 23 Aug 7 08:53 nova
drwxr-xr-x. 3 root root 20 Aug 1 18:17 systemd
[root@con1 nova]# ll etc/nova
total 372
-rw-r-----. 1 root 42436 379872 Sep 29 01:56 nova.conf
[root@con1 nova]#
Containerized OpenStack can configure
through specific directory
(/var/lib/config-data/puppet-generated)
19. How to configure OpenStack
19
[root@con1 nova]# cat etc/nova/nova.conf | grep -v ^# | grep -v ^$
[DEFAULT]
rootwrap_config=/etc/nova/rootwrap.conf
allow_resize_to_same_host=False
vif_plugging_is_fatal=True
vif_plugging_timeout=300
ram_allocation_ratio=1.0
instance_name_template=instance-%08x
my_ip=172.17.1.11
host=con1.example.com
dhcp_domain=
firewall_driver=nova.virt.firewall.NoopFirewallDriver
ssl_only=True
cert=/etc/pki/tls/certs/novnc_proxy.crt
key=/etc/pki/tls/private/novnc_proxy.key
state_path=/var/lib/nova
report_interval=10
...
If modify conf files in shared specific
directory, the container will be run after
loading conf files of specific directory when
container start.
24. Network
24
[root@con1 ~]# docker ps | grep neutron
CONTAINER ID IMAGE COMMAND
CREATED STATUS PORTS NAMES
4871f1b2259c 192.168.100.200:8787/rhosp13/openstack-neutron-dhcp-agent:13.0-77.1554788896 "ip netns
exec qdh..." 46 hours ago Up 46 hours
neutron-haproxy-qdhcp-b8c3caac-ea44-464a-a8ef-f6d698bd53b5
6cc5b74a1c10 192.168.100.200:8787/rhosp13/openstack-neutron-dhcp-agent:13.0-77.1554788896 "ip netns
exec qdh..." 46 hours ago Up 46 hours
neutron-dnsmasq-qdhcp-b8c3caac-ea44-464a-a8ef-f6d698bd53b5
59581f77930b 192.168.100.200:8787/rhosp13/openstack-neutron-dhcp-agent:13.0-77.1554788896 "ip netns
exec qdh..." 46 hours ago Up 46 hours
neutron-dnsmasq-qdhcp-0c78d4af-96cd-4073-9ed6-ce2b7920a91c
e116eab1a16a 192.168.100.200:8787/rhosp13/openstack-neutron-dhcp-agent:13.0-77.1554788896 "ip netns
exec qdh..." 46 hours ago Up 46 hours
neutron-haproxy-qdhcp-87721945-9f7c-46ca-9ae7-1f66ddc21ca4
ee1cea3e077f 192.168.100.200:8787/rhosp13/openstack-neutron-dhcp-agent:13.0-77.1554788896 "ip netns
exec qdh..." 46 hours ago Up 46 hours
neutron-dnsmasq-qdhcp-87721945-9f7c-46ca-9ae7-1f66ddc21ca4
...
74cb96f6c028 192.168.100.200:8787/rhosp13/openstack-neutron-l3-agent:13.0-75.1554788897 "ip netns
exec qro..." 46 hours ago Up 46 hours
neutron-haproxy-qrouter-0ae78562-b7de-484c-92bd-a25a7b8e4c63
Network is also created container.
25. Storage
25
[root@con1 ~]# docker ps | grep cinder-volume
CONTAINER ID IMAGE
COMMAND CREATED STATUS PORTS NAMES
192.168.100.10:8787/rhosp13/openstack-cinder-volume:pcmklatest
"/bin/bash /usr/lo..." 46 hours ago Up 46 hours
openstack-cinder-volume-docker-0
[root@con1 ~]# docker exec -ti openstack-cinder-volume-docker-0 df -h | grep vol
192.168.100.8:/cinder_vol02 13T 204G 13T 2%
/var/lib/cinder/mnt/4081440e749e9be9cab7a6fed1d1feda
192.168.100.8:/cinder_vol01 13T 153G 13T 2%
/var/lib/cinder/mnt/349ddc02366f05b7be11a4afb50828c5
[root@con1 ~]#
In the Cinder backend storage is NFS case, we can see the NFS mount point in the container.
27. Summary
27
OpenStack can use Bare metal, Virtual Machine, Container.
Nowadays, OpenStack environment is transfering from VM to Container.
We can modify OpenStack service configuration through shared specific directory between
container and host(/var/lib/config-data/puppet-generated).
We can see OpenStack service logs through specific directory(/var/log/containers).