본문 바로가기

OS

Ubuntu 22.04 Openstack 설치 w.Openstack docs - neutron(linux-bridge)

반응형

db 접속하여 neutron database 생성

GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' \

 IDENTIFIED BY 'NEUTRON_DBPASS';

GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' \

 IDENTIFIED BY 'NEUTRON_DBPASS';

 

계정 생성 및 권한부여

 

openstack user create --domain default --password-prompt neutron

openstack neutron 계정 생성 비밀번호 : neutron

 

openstack role add --project service --user neutron admin

admin 권한부여

openstack service create --name neutron \
 --description "OpenStack Networking" network

service 생성

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

 

api endpoint 생성

apt install neutron-server neutron-plugin-ml2 \
 neutron-linuxbridge-agent neutron-l3-agent neutron-dhcp-agent \
 neutron-metadata-agent

패키지 설치

 

connection = mysql+pymysql://neutron:NEUTRON_DBPASS@controller/neutron

 

core_plugin = ml2
service_plugins = router
allow_overlapping_ips = true
transport_url = rabbit://openstack:Pentalink12@controller
auth_strategy = keystone
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true

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

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

lock_path = /var/lib/neutron/tmp

 

/etc/neutron/neutron.conf 파일 수정

 

type_drivers = flat,vlan,vxlan
tenant_network_types = vxlan
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security

 

flat_networks = provider

 

vni_ranges = 1:1000

enable_ipset = true

 

/etc/neutron/plugins/ml2/ml2_conf.ini 파일 수정

 

physical_interface_mappings = provider:eth0

 

enable_vxlan = true
local_ip = 192.168.200.42
l2_population = true

enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

 

/etc/neutron/plugins/ml2/linuxbridge_agent.ini 파일 수정

 

net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1

/etc/sysctl.conf 파일 수정

 

sysctl -p 

커널파라미터 변경값 반영

 

interface_driver = linuxbridge

/etc/neutron/l3_agent.ini 파일 수정


interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true

/etc/neutron/dhcp_agent.ini 파일 수정

 

nova_metadata_host = controller
metadata_proxy_shared_secret = METADATA_SECRET

/etc/neutron/metadata_agent.ini 파일 수정

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

/etc/nova/nova.conf 파일 수정

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

neutron 데이터베이스 채우기

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

재시작

반응형