🔍 '' 검색 결과
👤 기본 접속 정보
서버 IP : 192.168.0.17
사용자 : 박종완
📋 설치 순서
1. Keystone → 2. Glance → 3. Placement → 4. Nova → 5. Neutron
💡 모든 작업은 Controller에서 실행 (Compute는 별도)
#설치순서 #Controller
🔑 1. Keystone (인증 서비스)
DB 데이터베이스 생성
sudo mysql; CREATE DATABASE keystone; GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY '123456'; GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY '123456'; EXIT;
설치 Keystone 설치
sudo apt -y install keystone
설정 /etc/keystone/keystone.conf
cp /etc/keystone/keystone.conf /etc/keystone/keystone.conf.org sed -i '/^#/d; /^$/d' /etc/keystone/keystone.conf [DEFAULT] log_dir = /var/log/keystone [database] connection = mysql+pymysql://keystone:123456@controller/keystone [token] provider = fernet
동기화 DB 동기화 및 토큰 생성
su -s /bin/sh -c "keystone-manage db_sync" keystone keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone keystone-manage credential_setup --keystone-user keystone --keystone-group keystone
Bootstrap 초기 설정
keystone-manage bootstrap \ --bootstrap-password 123456 \ --bootstrap-admin-url http://controller:5000/v3/ \ --bootstrap-internal-url http://controller:5000/v3/ \ --bootstrap-public-url http://controller:5000/v3/ \ --bootstrap-region-id RegionOne
Apache /etc/apache2/apache2.conf
ServerName controller sudo systemctl restart apache2
환경 admin-openrc / demo-openrc
# ~/admin-openrc export OS_PROJECT_DOMAIN_NAME=Default export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_NAME=admin export OS_USERNAME=admin export OS_PASSWORD=123456 export OS_AUTH_URL=http://controller:5000/v3 export OS_IDENTITY_API_VERSION=3 export OS_IMAGE_API_VERSION=2 # ~/demo-openrc export OS_PROJECT_DOMAIN_NAME=Default export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_NAME=demo export OS_USERNAME=demo export OS_PASSWORD=123456 export OS_AUTH_URL=http://controller:5000/v3 export OS_IDENTITY_API_VERSION=3 export OS_IMAGE_API_VERSION=2
확인 토큰 발급 확인
. admin-openrc openstack token issue
#Keystone #인증 #Fernet
🖼️ 2. Glance (이미지 서비스)
DB 데이터베이스 생성
sudo mysql; CREATE DATABASE glance; GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY '123456'; GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY '123456'; EXIT;
사용자 Glance 사용자 및 엔드포인트 생성
. admin-openrc openstack user create --domain default --password-prompt glance openstack role add --project service --user glance admin openstack service create --name glance --description "OpenStack Image" image openstack endpoint create --region RegionOne image public http://controller:9292 openstack endpoint create --region RegionOne image internal http://controller:9292 openstack endpoint create --region RegionOne image admin http://controller:9292
설치 Glance 설치
sudo apt install glance -y
설정 /etc/glance/glance-api.conf
[database] connection = mysql+pymysql://glance:123456@controller/glance [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 = glance password = 123456 [paste_deploy] flavor = keystone [DEFAULT] enabled_backends=fs:file [glance_store] default_backend = fs [fs] filesystem_store_datadir = /var/lib/glance/images/
동기화 DB 동기화 및 재시작
su -s /bin/sh -c "glance-manage db_sync" glance service glance-api restart
이미지 Cirros 이미지 업로드
wget http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img glance image-create --name "cirros" \ --file cirros-0.4.0-x86_64-disk.img \ --disk-format qcow2 --container-format bare \ --visibility=public glance image-list
#Glance #이미지 #Cirros
📊 3. Placement (리소스 배치)
DB 데이터베이스 생성
sudo mysql; CREATE DATABASE placement; GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' IDENTIFIED BY '123456'; GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' IDENTIFIED BY '123456'; EXIT;
사용자 Placement 사용자 및 엔드포인트 생성
. admin-openrc openstack user create --domain default --password-prompt placement openstack role add --project service --user placement admin openstack service create --name placement --description "Placement API" placement openstack endpoint create --region RegionOne placement public http://controller:8778 openstack endpoint create --region RegionOne placement internal http://controller:8778 openstack endpoint create --region RegionOne placement admin http://controller:8778
설치 Placement 설치
sudo apt install placement-api -y
설정 /etc/placement/placement.conf
[placement_database] connection = mysql+pymysql://placement:123456@controller/placement [api] auth_strategy = keystone [keystone_authtoken] auth_url = http://controller:5000/v3 memcached_servers = controller:11211 auth_type = password project_domain_name = Default user_domain_name = Default project_name = service username = placement password = 123456
동기화 DB 동기화 및 확인
su -s /bin/sh -c "placement-manage db sync" placement service apache2 restart placement-status upgrade check
#Placement #리소스
🖥️ 4. Nova (컴퓨트 서비스)
DB 데이터베이스 생성
sudo mysql; CREATE DATABASE nova_api; CREATE DATABASE nova; CREATE DATABASE nova_cell0; GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY '123456'; GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY '123456'; GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY '123456'; GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY '123456'; GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' IDENTIFIED BY '123456'; GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' IDENTIFIED BY '123456'; EXIT;
사용자 Nova 사용자 및 엔드포인트 생성
. admin-openrc openstack user create --domain default --password-prompt nova openstack role add --project service --user nova admin openstack service create --name nova --description "OpenStack Compute" compute openstack endpoint create --region RegionOne compute public http://controller:8774/v2.1 openstack endpoint create --region RegionOne compute internal http://controller:8774/v2.1 openstack endpoint create --region RegionOne compute admin http://controller:8774/v2.1
설치 Nova 설치
sudo apt install nova-api nova-conductor nova-novncproxy nova-scheduler -y
설정 /etc/nova/nova.conf
[DEFAULT] state_path = /var/lib/nova transport_url = rabbit://openstack:123456@controller:5672/ my_ip = 10.0.0.11 [api] auth_strategy = keystone [api_database] connection = mysql+pymysql://nova:123456@controller/nova_api [database] connection = mysql+pymysql://nova:123456@controller/nova [glance] api_servers = http://controller:9292 [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 = 123456 [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 = 123456 [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 = 123456 [vnc] enabled = true server_listen = $my_ip server_proxyclient_address = $my_ip
동기화 DB 동기화 및 Cell 설정
su -s /bin/sh -c "nova-manage api_db sync" nova su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova su -s /bin/sh -c "nova-manage db sync" nova su -s /bin/sh -c "nova-manage cell_v2 list_cells" nova
확인 Nova 서비스 확인
openstack compute service list --service nova-compute su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova openstack compute service list openstack catalog list nova-status upgrade check
#Nova #컴퓨트 #VM
🌐 5. Neutron (네트워크 서비스)
DB 데이터베이스 생성
sudo mysql; CREATE DATABASE neutron; GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY '123456'; GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY '123456'; EXIT;
사용자 Neutron 사용자 및 엔드포인트 생성
. admin-openrc openstack user create --domain default --password-prompt neutron openstack role add --project service --user neutron admin openstack service create --name neutron --description "OpenStack Networking" network 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
설치 Neutron 설치
sudo apt install neutron-server neutron-plugin-ml2 neutron-openvswitch-agent neutron-l3-agent neutron-dhcp-agent neutron-metadata-agent -y
설정 /etc/neutron/neutron.conf
[DEFAULT] core_plugin = ml2 service_plugins = router transport_url = rabbit://openstack:123456@controller auth_strategy = keystone notify_nova_on_port_status_changes = true notify_nova_on_port_data_changes = true [database] connection = mysql+pymysql://neutron:123456@controller/neutron [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 = 123456 [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 = 123456 [oslo_concurrency] lock_path = /var/lib/neutron/tmp
ML2 /etc/neutron/plugins/ml2/ml2_conf.ini
[ml2] type_drivers = flat,vlan,vxlan tenant_network_types = vxlan mechanism_drivers = openvswitch,l2population extension_drivers = port_security [ml2_type_flat] flat_networks = provider [ml2_type_vxlan] vni_ranges = 1:1000
OVS /etc/neutron/plugins/ml2/openvswitch_agent.ini
[ovs] bridge_mappings = provider:br-provider local_ip = 10.0.0.11 [agent] tunnel_types = vxlan l2_population = true [securitygroup] enable_security_group = true firewall_driver = openvswitch
브릿지 OVS 브릿지 생성
ovs-vsctl add-br br-provider ovs-vsctl add-port br-provider enp0s8 ovs-vsctl show
L3/DHCP L3 Agent / DHCP Agent 설정
# /etc/neutron/l3_agent.ini [DEFAULT] interface_driver = openvswitch external_network_bridge = agent_mode = legacy # /etc/neutron/dhcp_agent.ini [DEFAULT] interface_driver = openvswitch dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq enable_isolated_metadata = true # /etc/neutron/metadata_agent.ini [DEFAULT] nova_metadata_host = controller metadata_proxy_shared_secret = 123456
Nova /etc/nova/nova.conf (Neutron 추가)
[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 = 123456 service_metadata_proxy = true metadata_proxy_shared_secret = 123456
동기화 DB 동기화 및 서비스 재시작
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 service nova-api restart service neutron-server restart service neutron-openvswitch-agent restart service neutron-dhcp-agent restart service neutron-metadata-agent restart service neutron-l3-agent restart
⚠️ 주의! Neutron 설치 후 네트워크가 끊길 수 있음
Horizon을 먼저 설치하고 Neutron은 마지막에 설치하세요!
#Neutron #네트워크 #OVS #ML2
🖥️ Compute 노드 설정
설치 Neutron OVS Agent 설치
sudo apt install neutron-openvswitch-agent -y
설정 /etc/neutron/neutron.conf
[DEFAULT] core_plugin = ml2 transport_url = rabbit://openstack:123456@controller [oslo_concurrency] lock_path = /var/lib/neutron/tmp
OVS /etc/neutron/plugins/ml2/openvswitch_agent.ini
[ovs] bridge_mappings = provider:br-provider local_ip = 10.0.0.31 [agent] tunnel_types = vxlan l2_population = true [securitygroup] enable_security_group = true firewall_driver = openvswitch
브릿지 OVS 브릿지 생성
ovs-vsctl add-br br-provider ovs-vsctl add-port br-provider enp0s8
Nova /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 = 123456
재시작 서비스 재시작
service nova-compute restart service neutron-openvswitch-agent restart
#Compute #Nova #Neutron
✅ 확인 명령어
# 서비스 목록 확인 openstack compute service list openstack network agent list openstack catalog list # 노드 확인 nova-status upgrade check # 이미지 확인 glance image-list # 토큰 확인 openstack token issue
✅ 설치 완료! 이제 Horizon 대시보드에서 VM을 생성할 수 있습니다!
#확인 #테스트
📌 Day 43 요약 / 결론

📌 Keystone : 인증 서비스 (DB 생성, Fernet 토큰, Bootstrap)

📌 Glance : 이미지 서비스 (Cirros, Ubuntu 이미지 업로드)

📌 Placement : 리소스 배치 API

📌 Nova : 컴퓨트 서비스 (nova_api, nova, nova_cell0 DB)

📌 Neutron : 네트워크 서비스 (ML2, OVS, L3/DHCP Agent)

📌 Compute : nova-compute + neutron-openvswitch-agent

📌 설치 순서 : Keystone → Glance → Placement → Nova → Neutron

🎯 결론 : OpenStack Controller 설치 완료! 이제 VM 생성 가능
#OpenStack #Controller #Keystone #Nova #Neutron
43/44