차. neutron 설치 및 설정
컨트롤러 노드에서 진행
1) 데이터베이스 설정
mysql
CREATE DATABASE neutron;
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'NEUTRON_DBPASS';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'NEUTRON_DBPASS';
exit
2) neutron user 생성
openstack user create --domain default --password-prompt neutron
* 비밀번호: NEUTRON_PASS
openstack role add --project service --user neutron admin
* admin 권한 부여
3) neutron 서비스 엔트리 생성
openstack service create --name neutron --description "OpenStack Networking" network
4) neutron 서비스 엔드포인트 생성
openstack endpoint create --region RegionOne \ network public http://controller:9696
openstack endpoint create --region RegionOne \ network internal http://controller:9696
openstack endpoint create --region RegionOne \ network admin http://controller:9696
5) neutron 설치
apt install neutron-server
apt install neutron-plugin-ml2
apt install neutron-linuxbridge-agent
apt install neutron-l3-agent
apt install neutron-dhcp-agent
apt install neutron-metadata-agent
5) neutron 설정
vi /etc/neutron/neutron.conf
[database]
connection = mysql+pymysql://neutron:NEUTRON_DBPASS@controller/neutron
[DEFAULT]
# ...
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = true
transport_url = rabbit://openstack:RABBIT_PASS@controller
auth_strategy = keystone
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true
[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
[nova]
# ...
auth_url = http://controller:5000
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = NOVA_PASS
[oslo_concurrency]
# ...
lock_path = /var/lib/neutron/tmp
[experimental]
linuxbridge = true
* 파일 저장 후 나가기
vi /etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
...
type_drivers = flat,vlan,vxlan
tenant_network_types = vxlan
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security
[ml2_type_flat]
...
flat_networks = provider
[ml2_type_vxlan]
vni_ranges = 1:1000
[securitygroup]
enable_ipset = true
* 저장 후 나가기
vi /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:프로바이더 네트워크로 쓰일 인터페이스(ex: 22대역대 ens192
[vxlan] enable_vxlan = true local_ip =컨트롤러 노드의 IP l2_population = true
[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
* 저장 후 나가기
vi /etc/neutron/l3_agent.ini
[DEFAULT]
interface_driver = linuxbridge
* 저장 후 나가기
vi /etc/neutron/dhcp_agent.ini
[DEFAULT]
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
* 저장 후 나가기
vi /etc/neutron/metadata_agent.ini
[DEFAULT]
...
nova_metadata_host = controller
metadata_proxy_shared_secret = METADATA_SECRET
* 저장 후 나가기
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
service_metadata_proxy = true
metadata_proxy_shared_secret = METADATA_SECRET
[experimental]
linuxbridge = true
* [experimental] 추가
* 저장 후 나가기
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \\ --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
* DB 연동
systemctl restart nova-api
systemctl restart neutron-server
systemctl restart neutron-linuxbridge-agent
systemctl restart neutron-dhcp-agent
systemctl restart neutron-metadata-agent
systemctl restart neutron-l3-agent
* 재시작
service nova-api status
service neutron-server status
service neutron-linuxbridge-agent status
service neutron-dhcp-agent status
service neutron-metadata-agent status
service neutron-l3-agent status
* 검증
6) 컴퓨트 노드 neutron 설정
apt install neutron-linuxbridge-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
* 저장 후 나가기
vi /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:프로바이더 네트워크로 쓰일 인터페이스(ex: 22대역대 ens192
[vxlan]
enable_vxlan = true
local_ip =컴퓨트 노드의 IP
l2_population = true
[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
* 저장 후 나가기
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
* 저장 후 나가기
service nova-compute restart
service neutron-linuxbridge-agent restart
'인턴' 카테고리의 다른 글
오픈스택 Network 생성(CLI) (0) | 2024.07.02 |
---|---|
오픈스택 멀티 노드 설치 - Horizon(dashboard) (0) | 2024.07.02 |
오픈스택 멀티노드 설치 - Nova (Compute) (0) | 2024.07.02 |
오픈스택 멀티 노드 설치 - Nova (Controller) (0) | 2024.07.02 |
오픈스택 멀티 노드 설치-Placement (0) | 2024.07.02 |