1. [Cloud] Openstack - Caracal 구축 개요
2. [Cloud] Openstack - 1-1. Controller Node (Preprocess, Environment, Keystone, Glance)
3. [Cloud] Openstack - 1-2. Controller Node (Placement, Nova, Neutron)
4. [Cloud] Openstack - 1-3. Controller Node (Cinder, Swift)
5. [Cloud] Openstack - 1-4. Controller Node (Horizon)
6. [Cloud] Openstack - 2. Compute Node ←
7. [Cloud] Openstack - 3. Block Node
8. [Cloud] Openstack - 4. Horizon Dashboard Console 개선
Preprocess
vi /etc/hosts
127.0.0.1 localhost
#127.0.1.1 compute-virtual-machine
192.168.2.10 controller
192.168.2.20 compute1
192.168.2.10 compute2
192.168.2.30 compute3
192.168.2.30 block
192.168.2.30 swift
Network Setting
- NetworkManager 내리기
sudo /etc/init.d/network-manager stop
sudo update-rc.d -f NetworkManager remove
- netplan 설정
vi /etc/netplan/01-network-manager-all.yaml
# Let NetworkManager manage all devices on this system
network:
ethernets:
ens33:
addresses:
- 192.168.2.20/24
nameservers:
addresses: [8.8.8.8,8.8.4.4]
routes:
- to: default
via: 192.168.2.1
ens34:
dhcp4: false
version: 2
netplan apply
Environment
Environment — Installation Guide documentation
Environment This section explains how to configure the controller node and one compute node using the example architecture. Although most environments include Identity, Image service, Compute, at least one networking service, and the Dashboard, the Object
docs.openstack.org
NTP Server
- install chrony
apt install chrony -y
- vi /etc/chrony/chrony.conf
server controller iburst
- Restart the NTP service
service chrony restart
Openstack packages for Ubuntu
- Openstack 2024.1 Caracal for Ubuntu 22.04 LTS
add-apt-repository cloud-archive:caracal
- Client Installation
apt install python3-openstackclient
Nova(Compute)
Install and configure a compute node for Ubuntu — nova 27.5.2.dev1 documentation
Install and configure a compute node for Ubuntu This section describes how to install and configure the Compute service on a compute node. The service supports several hypervisors to deploy instances or virtual machines (VMs). For simplicity, this configur
docs.openstack.org
- 하드웨어 가속 확인
egrep -c '(vmx|svm)' /proc/cpuinfo
0
# vmware machine settings에서 Processors의 Virtualize Inter VT-x/EPT or AMD-V/RVI 설정
egrep -c '(vmx|svm)' /proc/cpuinfo
8
이 명령어가 하나 이상의 값을 반환하면 Compute 노드가 하드웨어 가속을 지원하므로 일반적으로 추가 구성이 필요하지 않다. 다만 이 명령어가 0의 값을 반환하면 Compute 노드가 하드웨어 가속을 지원하지 않으므로 KVM 대신 QEMU를 사용하도록 libvirt를 구성해야 한다. <공식 문서 Official>
*사실상 대부분의 현대 컴퓨터는 하드웨어 가속을 지원하므로 당연히 0 이상의 값이 반환될거고, 그냥 넘어가도 좋다.
- Install the packages
apt install nova-compute
- vi /etc/nova/nova.conf
[DEFAULT]
#...
transport_url = rabbit://openstack:RABBIT_PASS@controller
my_ip = 192.168.2.20
[api]
#...
auth_strategy = keystone
[keystone_authtoken]
#...
www_authenticate_uri = http://controller:5000/
auth_url = http://controller:5000/
memcached_servers = controller:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = nova
password = NOVA_PASS
[service_user]
send_service_user_token = true
auth_url = http://controller:5000
auth_strategy = keystone
auth_type = password
project_domain_name = Default
project_name = service
user_domain_name = Default
username = nova
password = NOVA_PASS
[vnc]
# ...
enabled = true
server_listen = 0.0.0.0
server_proxyclient_address = $my_ip
novncproxy_base_url = http://controller:6080/vnc_auto.html
[glance]
# ...
api_servers = http://controller:9292
[oslo_concurrency]
# ...
lock_path = /var/lib/nova/tmp
[placement]
# ...
region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:5000/v3
username = placement
password = PLACEMENT_PASS
- Restart the Compute service
service nova-compute restart
Neutron (Network)
Install and configure compute node — Neutron 23.3.1.dev15 documentation
Install and configure compute node The compute node handles connectivity and security groups for instances. Install the components # apt install neutron-openvswitch-agent Configure the common component The Networking common component configuration includes
docs.openstack.org
- Install the components
apt install neutron-openvswitch-agent
- vi /etc/neutron/neutron.conf
[DEFAULT]
# ...
transport_url = rabbit://openstack:RABBIT_PASS@controller
auth_strategy = keystone
[keystone_authtoken]
# ...
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = neutron
password = NEUTRON_PASS
[oslo_concurrency]
# ...
lock_path = /var/lib/neutron/tmp
Networking Option 2: Self-service networks
Networking Option 2: Self-service networks — Neutron 23.3.1.dev15 documentation
Networking Option 2: Self-service networks Configure the Networking components on a compute node. Configure the Open vSwitch agent The Open vSwitch agent builds layer-2 (bridging and switching) virtual networking infrastructure for instances and handles se
docs.openstack.org
- ovs-vsctl
ovs-vsctl del-br br-int
ovs-vsctl show
ovs-vsctl del-br br-ens34
ovs-vsctl add-br br-ens34
ovs-vsctl add-port br-ens34 ens34
service openvswitch-switch restart
- vi /etc/neutron/plugins/ml2/openvswitch_agent.ini
[agent]
tunnel_types = vxlan
l2_population = true
[ovs]
bridge_mappings = provider:br-ens34
local_ip = 192.168.2.20
[vxlan]
# 안쓸거
#local_ip = OVERLAY_INTERFACE_IP_ADDRESS
#l2_population = true
[securitygroup]
# ...
enable_security_group = true
firewall_driver = openvswitch
#firewall_driver = iptables_hybrid
- vi /etc/nova/nova.conf
[neutron]
# ...
auth_url = http://controller:5000
auth_type = password
project_domain_name = Default
user_domain_name = Default
region_name = RegionOne
project_name = service
username = neutron
password = NEUTRON_PASS
- Restart the Compute service & Linux bridge agent
service nova-compute restart
service neutron-openvswitch-agent restart