在ArchLinux下部署OpenStack
准备工作
配置软件源
首先,确定已运行最新的ArchLinux版本
pacman -Syu
添加软件源
位置 | 服务商 | 地址 |
---|---|---|
中国-广州 | 腾讯云 | https://cn-repo.stackarch.org/ |
美国-洛杉矶 | Vultr | https://us-repo.stackarch.org/ |
编辑/etc/pacman.conf
在尾部添加:
[stackarch]
Server = https://cn-repo.stackarch.org/$arch/
获取并信任StackArch打包者的GPG公钥
pacman-key --recv-keys C91EB49978931FA0
pacman-key --lsign-key C91EB49978931FA0
刷新数据库
pacman -Syu
准备网络
请确保有两张可用网卡。一张已配置地址,用于OpenStack管理网络;另一张不配置地址,用于虚拟机网络。
该文章使用以下布局:
网卡 | 地址 |
---|---|
eth1 | 192.168.100.100/24 |
eth2 | - |
部署时间同步服务
在多节点配置中,需要确保多服务器之间的时间一致,避免出现问题
安装chrony
pacman -S chrony
主节点
修改配置文件/etc/chrony.conf
allow 192.168.100.0/24
local stratum 10
启用服务
systemctl enable --now chronyd
其它节点
修改配置文件/etc/chrony.conf
server 192.168.100.100/24
启用服务
systemctl enable --now chronyd
运行环境组件
数据库-MariaDB
安装MariaDB
pacman -S mariadb
初始化数据库
mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
systemctl enable --now mariadb
mysql_secure_installation
消息队列-RabbitMQ
安装RabbitMQ
pacman -S rabbitmq rabbitmqadmin
初始化RabbitMQ (自行替换RabbitMQ密码)
systemctl enable --now rabbitmq
rabbitmqctl add_user openstack <密码>
rabbitmqctl set_permissions openstack ".*" ".*" ".*"
缓存-MemCached
安装MemCached
pacman -S memcached
修改MemCached监听
systemctl edit memcached
在第3行下添加
[Service]
Environment=LISTEN="-l 127.0.0.1,::1,192.168.100.100"
保存并退出,然后启动服务
systemctl enable --now memcached
K/V数据库-Etcd
安装Etcd
pacman -S etcd
修改配置文件/etc/conf.d/etcd
ETCD_NAME="openstack"
ETCD_LISTEN_PEER_URLS="http://192.168.100.100:2380"
ETCD_LISTEN_CLIENT_URLS="http://192.168.100.100:2379"
ETCD_INITIAL_ADVERTISE_PEER_URLS="http://192.168.100.100:2380"
ETCD_INITIAL_CLUSTER="openstack=http://192.168.100.100:2380"
ETCD_INITIAL_CLUSTER_STATE="new"
ETCD_INITIAL_CLUSTER_TOKEN="etcd_cluster"
ETCD_ADVERTISE_CLIENT_URLS="http://192.168.100.100:2379"
启用etcd
systemctl enable --now etcd
OpenStack Identify - Keystone
安装keystone
pacman -S python-openstackclient python-crudini apache mod_wsgi openstack-keystone python-pymemcache python-pymysql
数据库
进入mysql命令行
mysql
创建keystone的数据库和用户 (自行替换keystone的密码)
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES \
ON keystone.* \
TO 'keystone'@'localhost' \
IDENTIFIED BY '<密码>';
GRANT ALL PRIVILEGES \
ON keystone.* \
TO 'keystone'@'%' \
IDENTIFIED BY '<密码>';
配置文件
使用命令修改配置文件 (自行替换为keystone的密码)
cfg=/etc/keystone/keystone.conf
crudini --set $cfg database connection "mysql+pymysql://keystone:<密码>@192.168.100.100/keystone"
crudini --set $cfg token provider fernet
初始化keystone的数据库
sudo -u keystone keystone-manage db_sync
初始化Fernet
keystone-manage fernet_setup \
--keystone-user keystone \
--keystone-group keystone
keystone-manage credential_setup \
--keystone-user keystone \
--keystone-group keystone
初始化身份服务
(自行替换管理员密码)
keystone-manage bootstrap \
--bootstrap-password <密码> \
--bootstrap-admin-url http://192.168.100.100:5000/v3/ \
--bootstrap-internal-url http://192.168.100.100:5000/v3/ \
--bootstrap-public-url http://192.168.100.100:5000/v3/ \
--bootstrap-region-id RegionOne
Apache HTTPD
编辑httpd的配置文件/etc/httpd/conf/httpd.conf
LoadModule wsgi_module modules/mod_wsgi.so
Include conf/extra/wsgi-keystone.conf
启动服务
systemctl enable --now httpd
编写管理员Profile
创建并编辑admin-rc
(自行替换管理员密码)
export OS_USERNAME=admin
export OS_PASSWORD=<密码>
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_AUTH_URL=http://192.168.100.100:5000/v3
export OS_IDENTITY_API_VERSION=3
创建服务项目
source admin-rc
openstack project create \
--domain default \
--description "Service Project" \
service
测试
(自行输入管理员密码)
unset OS_AUTH_URL OS_PASSWORD
openstack \
--os-auth-url http://192.168.100.100:5000/v3 \
--os-project-domain-name Default \
--os-user-domain-name Default \
--os-project-name admin \
--os-username admin \
token issue
OpenStack Image Service - Glance
安装glance
pacman -S python-openstackclient python-crudini openstack-glance
数据库
进入mysql命令行
mysql
创建glance的数据库和用户 (自行替换glance的密码)
CREATE DATABASE glance;
GRANT ALL PRIVILEGES \
ON glance.* \
TO 'glance'@'localhost' \
IDENTIFIED BY '<密码>';
GRANT ALL PRIVILEGES \
ON glance.* \
TO 'glance'@'%' \
IDENTIFIED BY '<密码>';
创建端点、角色
(自行替换glance的密码)
source admin-rc
openstack user create \
--domain default \
--password <密码> \
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://192.168.100.100:9292
openstack endpoint create \
--region RegionOne \
image internal \
http://192.168.100.100:9292
openstack endpoint create \
--region RegionOne \
image admin \
http://192.168.100.100:9292
配置文件
使用命令修改配置文件 (自行替换glance的密码)
cfg=/etc/glance/glance-api.conf
crudini --set $cfg database connection "mysql+pymysql://glance:<密码>@192.168.100.100/glance"
crudini --set $cfg keystone_authtoken www_authenticate_uri "http://192.168.100.100:5000"
crudini --set $cfg keystone_authtoken memcached_servers "192.168.100.100:11211"
crudini --set $cfg keystone_authtoken auth_url "http://192.168.100.100:5000"
crudini --set $cfg keystone_authtoken auth_type password
crudini --set $cfg keystone_authtoken project_domain_name Default
crudini --set $cfg keystone_authtoken user_domain_name Default
crudini --set $cfg keystone_authtoken project_name service
crudini --set $cfg keystone_authtoken username glance
crudini --set $cfg keystone_authtoken password "<密码>"
crudini --set $cfg paste_deploy flavor keystone
crudini --set $cfg glance_store stores file,http
crudini --set $cfg glance_store default_store file
crudini --set $cfg glance_store default_backend file
crudini --set $cfg glance_store filesystem_store_datadir /var/lib/glance/images
初始化glance的数据库
sudo -u glance glance-manage db_sync
启动服务
systemctl enable --now openstack-glance-api.service
测试
下载CirrOS
wget http://download.cirros-cloud.net/0.5.2/cirros-0.5.2-x86_64-disk.img
添加镜像
glance image-create \
--name "cirros" \
--file cirros-0.5.2-x86_64-disk.img \
--disk-format qcow2 \
--container-format bare \
--visibility=public
查看镜像
openstack image list
OpenStack Placement
安装placement
pacman -S python-openstackclient python-crudini apache mod_wsgi openstack-placement python-osc-placement
数据库
进入mysql命令行
mysql
创建placement的数据库和用户 (自行替换placement的密码)
CREATE DATABASE placement;
GRANT ALL PRIVILEGES \
ON placement.* \
TO 'placement'@'localhost' \
IDENTIFIED BY '<密码>';
GRANT ALL PRIVILEGES \
ON placement.* \
TO 'placement'@'%' \
IDENTIFIED BY '<密码>';
创建端点、角色
(自行替换placement的密码)
source admin-rc
openstack user create \
--domain default \
--password <密码> \
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://192.168.100.100:8778
openstack endpoint create \
--region RegionOne \
placement internal \
http://192.168.100.100:8778
openstack endpoint create \
--region RegionOne \
placement admin \
http://192.168.100.100:8778
配置文件
使用命令修改配置文件 (自行替换placement的密码)
cfg=/etc/placement/placement.conf
crudini --set $cfg placement_database connection "mysql+pymysql://placement:<密码>@192.168.100.100/placement"
crudini --set $cfg api auth_strategy keystone
crudini --set $cfg keystone_authtoken auth_url "http://192.168.100.100:5000/v3"
crudini --set $cfg keystone_authtoken memcached_servers "192.168.100.100:11211"
crudini --set $cfg keystone_authtoken auth_type password
crudini --set $cfg keystone_authtoken project_domain_name Default
crudini --set $cfg keystone_authtoken user_domain_name Default
crudini --set $cfg keystone_authtoken project_name service
crudini --set $cfg keystone_authtoken username placement
crudini --set $cfg keystone_authtoken password "<密码>"
初始化placement的数据库
sudo -u placement placement-manage db sync
Apache HTTPD
编辑httpd的配置文件/etc/httpd/conf/httpd.conf
Include conf/extra/wsgi-placement-api.conf
启动服务
systemctl enable httpd
systemctl restart httpd
测试
source admin-rc
placement-status upgrade check
openstack --os-placement-api-version 1.2 resource class list --sort-column name
openstack --os-placement-api-version 1.6 trait list --sort-column name
OpenStack Compute Service - Nova
主节点
安装nova
pacman -S python-openstackclient python-crudini openstack-nova
数据库
进入mysql命令行
mysql
创建nova的数据库和用户 (自行替换nova的密码)
CREATE DATABASE nova;
CREATE DATABASE nova_api;
CREATE DATABASE nova_cell0;
GRANT ALL PRIVILEGES \
ON nova.* \
TO 'nova'@'%' \
IDENTIFIED BY '<密码>';
GRANT ALL PRIVILEGES \
ON nova_api.* \
TO 'nova'@'%' \
IDENTIFIED BY '<密码>';
GRANT ALL PRIVILEGES \
ON nova_cell0.* \
TO 'nova'@'%' \
IDENTIFIED BY '<密码>';
GRANT ALL PRIVILEGES \
ON nova.* \
TO 'nova'@'localhost' \
IDENTIFIED BY '<密码>';
GRANT ALL PRIVILEGES \
ON nova_api.* \
TO 'nova'@'localhost' \
IDENTIFIED BY '<密码>';
GRANT ALL PRIVILEGES \
ON nova_cell0.* \
TO 'nova'@'localhost' \
IDENTIFIED BY '<密码>';
创建端点、角色
(自行替换nova的密码)
source admin-rc
openstack user create \
--domain default \
--password <密码> \
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://192.168.100.100:8774/v2.1
openstack endpoint create \
--region RegionOne \
compute internal \
http://192.168.100.100:8774/v2.1
openstack endpoint create \
--region RegionOne \
compute admin \
http://192.168.100.100:8774/v2.1
配置文件
使用命令修改配置文件 (自行替换nova、placement、rabbitmq的密码)
cfg=/etc/nova/nova.conf
crudini --set $cfg DEFAULT my_ip 192.168.100.100
crudini --set $cfg DEFAULT enabled_apis osapi_compute,metadata
crudini --set $cfg DEFAULT transport_url "rabbit://openstack:<RabbitMQ密码>@192.168.100.100:5672/"
crudini --set $cfg database connection "mysql+pymysql://nova:<Nova密码>@192.168.100.100/nova"
crudini --set $cfg api_database connection "mysql+pymysql://nova:<Nova密码>@192.168.100.100/nova_api"
crudini --set $cfg api auth_strategy keystone
crudini --set $cfg keystone_authtoken www_authenticate_uri "http://192.168.100.100:5000/"
crudini --set $cfg keystone_authtoken auth_url "http://192.168.100.100:5000/"
crudini --set $cfg keystone_authtoken memcached_servers 192.168.100.100:11211
crudini --set $cfg keystone_authtoken auth_type password
crudini --set $cfg keystone_authtoken project_domain_name Default
crudini --set $cfg keystone_authtoken user_domain_name Default
crudini --set $cfg keystone_authtoken project_name service
crudini --set $cfg keystone_authtoken username nova
crudini --set $cfg keystone_authtoken password "<Nova密码>"
crudini --set $cfg vnc enabled true
crudini --set $cfg vnc server_listen "\$my_ip"
crudini --set $cfg vnc server_proxyclient_address "\$my_ip"
crudini --set $cfg glance api_servers "http://192.168.100.100:9292"
crudini --set $cfg oslo_concurrency lock_path /var/lib/nova/tmp
crudini --set $cfg placement region_name RegionOne
crudini --set $cfg placement project_domain_name Default
crudini --set $cfg placement project_name service
crudini --set $cfg placement auth_type password
crudini --set $cfg placement user_domain_name Default
crudini --set $cfg placement auth_url "http://192.168.100.100:5000/v3"
crudini --set $cfg placement username placement
crudini --set $cfg placement password "<Placement密码>"
初始化nova的数据库
sudo -u nova nova-manage api_db sync
sudo -u nova nova-manage cell_v2 map_cell0
sudo -u nova nova-manage cell_v2 create_cell --name=cell1 --verbose
sudo -u nova nova-manage db sync
sudo -u nova nova-manage cell_v2 list_cells
启动服务
systemctl enable --now openstack-nova-api openstack-nova-scheduler openstack-nova-conductor openstack-nova-novncproxy
计算节点
安装nova
pacman -S python-openstackclient python-crudini openstack-nova
配置文件
使用命令修改配置文件 (自行替换nova、placement、rabbitmq的密码)
cfg=/etc/nova/nova.conf
crudini --set $cfg DEFAULT instances_path /var/lib/nova/instances
crudini --set $cfg DEFAULT compute_driver libvirt.LibvirtDriver
crudini --set $cfg DEFAULT my_ip 192.168.100.100
crudini --set $cfg DEFAULT enabled_apis osapi_compute,metadata
crudini --set $cfg DEFAULT transport_url "rabbit://openstack:<RabbitMQ密码>@192.168.100.100:5672/"
crudini --set $cfg api auth_strategy keystone
crudini --set $cfg keystone_authtoken www_authenticate_uri "http://192.168.100.100:5000/"
crudini --set $cfg keystone_authtoken auth_url "http://192.168.100.100:5000/"
crudini --set $cfg keystone_authtoken memcached_servers 192.168.100.100:11211
crudini --set $cfg keystone_authtoken auth_type password
crudini --set $cfg keystone_authtoken project_domain_name Default
crudini --set $cfg keystone_authtoken user_domain_name Default
crudini --set $cfg keystone_authtoken project_name service
crudini --set $cfg keystone_authtoken username nova
crudini --set $cfg keystone_authtoken password "<Nova密码>"
crudini --set $cfg vnc enabled true
crudini --set $cfg vnc server_listen 0.0.0.0
crudini --set $cfg vnc server_proxyclient_address "\$my_ip"
crudini --set $cfg vnc novncproxy_base_url "http://192.168.100.100:6080/vnc_auto.html"
crudini --set $cfg glance api_servers "http://192.168.100.100:9292"
crudini --set $cfg oslo_concurrency lock_path /var/lib/nova/tmp
crudini --set $cfg placement region_name RegionOne
crudini --set $cfg placement project_domain_name Default
crudini --set $cfg placement project_name service
crudini --set $cfg placement auth_type password
crudini --set $cfg placement user_domain_name Default
crudini --set $cfg placement auth_url "http://192.168.100.100:5000/v3"
crudini --set $cfg placement username placement
crudini --set $cfg placement password "<Placement密码>"
crudini --set $cfg libvirt virt_type kvm
启动服务
systemctl enable --now libvirtd openstack-nova-compute
添加计算节点
source admin-rc
openstack compute service list --service nova-compute
sudo -u nova nova-manage cell_v2 discover_hosts --verbose
openstack compute service list
OpenStack Networking Service - neutron
主节点
安装neutron
pacman -S python-openstackclient python-crudini openstack-neutron dnsmasq iptables-nft
数据库
CREATE DATABASE neutron;
GRANT ALL PRIVILEGES \
ON neutron.* \
TO 'neutron'@'localhost' \
IDENTIFIED BY '<密码>';
GRANT ALL PRIVILEGES \
ON neutron.* \
TO 'neutron'@'%' \
IDENTIFIED BY '<密码>';
创建端点、角色
(自行替换neutron的密码)
source admin-rc
openstack user create \
--domain default \
--password <密码> \
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://192.168.100.100:9696
openstack endpoint create \
--region RegionOne \
network internal \
http://192.168.100.100:9696
openstack endpoint create \
--region RegionOne \
network admin \
http://192.168.100.100:9696
配置文件
使用命令修改配置文件 (自行替换nova、neutron、rabbitmq的密码)
cfg=/etc/neutron/neutron.conf
crudini --set $cfg DEFAULT core_plugin ml2
crudini --set $cfg DEFAULT service_plugins ""
crudini --set $cfg DEFAULT auth_strategy keystone
crudini --set $cfg DEFAULT notify_nova_on_port_status_changes true
crudini --set $cfg DEFAULT notify_nova_on_port_data_changes true
crudini --set $cfg DEFAULT transport_url "rabbit://openstack:<RabbitMQ密码>@192.168.100.100"
crudini --set $cfg database connection "mysql+pymysql://neutron:<Neutron密码>@192.168.100.100/neutron"
crudini --set $cfg keystone_authtoken www_authenticate_uri "http://192.168.100.100:5000"
crudini --set $cfg keystone_authtoken auth_url "http://192.168.100.100:5000"
crudini --set $cfg keystone_authtoken memcached_servers 192.168.100.100:11211
crudini --set $cfg keystone_authtoken auth_type password
crudini --set $cfg keystone_authtoken project_domain_name default
crudini --set $cfg keystone_authtoken user_domain_name default
crudini --set $cfg keystone_authtoken project_name service
crudini --set $cfg keystone_authtoken username neutron
crudini --set $cfg keystone_authtoken password "<Neutron密码>"
crudini --set $cfg nova auth_url "http://192.168.100.100:5000"
crudini --set $cfg nova auth_type password
crudini --set $cfg nova project_domain_name default
crudini --set $cfg nova user_domain_name default
crudini --set $cfg nova region_name RegionOne
crudini --set $cfg nova project_name service
crudini --set $cfg nova username nova
crudini --set $cfg nova password "<Nova密码>"
crudini --set $cfg oslo_concurrency lock_path /var/lib/neutron/tmp
使用命令修改配置文件/etc/neutron/plugins/ml2/ml2_conf.ini
cfg=/etc/neutron/plugins/ml2/ml2_conf.ini
crudini --set $cfg ml2 type_drivers flat,vlan
crudini --set $cfg ml2 tenant_network_types ""
crudini --set $cfg ml2 mechanism_drivers linuxbridge
crudini --set $cfg ml2 extension_drivers port_security
crudini --set $cfg ml2_type_flat flat_networks provider
crudini --set $cfg securitygroup enable_ipset true
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
使用命令修改配置文件 /etc/neutron/plugins/ml2/linuxbridge_agent.ini
(自行替换网卡名称)
cfg=/etc/neutron/plugins/ml2/linuxbridge_agent.ini
crudini --set $cfg linux_bridge physical_interface_mappings provider:<网卡名称>
crudini --set $cfg vxlan enable_vxlan false
crudini --set $cfg securitygroup enable_security_group true
crudini --set $cfg securitygroup firewall_driver neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
使用命令修改配置文件 /etc/neutron/dhcp_agent.ini
cfg=/etc/neutron/dhcp_agent.ini
crudini --set $cfg DEFAULT interface_driver linuxbridge
crudini --set $cfg DEFAULT dhcp_driver neutron.agent.linux.dhcp.Dnsmasq
crudini --set $cfg DEFAULT enable_isolated_metadata true
使用命令修改配置文件 /etc/neutron/metadata_agent.ini
(自行替换metadata的密码)
cfg=/etc/neutron/metadata_agent.ini
crudini --set $cfg DEFAULT nova_metadata_host 192.168.100.100
crudini --set $cfg DEFAULT metadata_proxy_shared_secret <密码>
使用命令修改配置文件 /etc/nova/nova.ini
(自行替换neutron、metadata的密码)
cfg=/etc/nova/nova.conf
crudini --set $cfg neutron auth_url "http://192.168.100.100:5000"
crudini --set $cfg neutron auth_type password
crudini --set $cfg neutron project_domain_name default
crudini --set $cfg neutron user_domain_name default
crudini --set $cfg neutron region_name RegionOne
crudini --set $cfg neutron project_name service
crudini --set $cfg neutron username neutron
crudini --set $cfg neutron password "<Neutron密码>"
crudini --set $cfg neutron service_metadata_proxy true
crudini --set $cfg neutron metadata_proxy_shared_secret "<Metadata密码>"
初始化数据库
sudo -u neutron neutron-db-manage \
--config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
upgrade head
启用服务
systemctl restart openstack-nova-api
systemctl enable --now \
openstack-neutron-server \
openstack-neutron-linuxbridge-agent \
openstack-neutron-dhcp-agent \
openstack-neutron-metadata-agent
计算节点
安装neutron
pacman -S python-openstackclient python-crudini openstack-neutron dnsmasq iptables-nft
配置文件
使用命令修改配置文件 (自行替换neutron、rabbitmq的密码)
cfg=/etc/neutron/neutron.conf
crudini --set $cfg DEFAULT auth_strategy keystone
crudini --set $cfg DEFAULT transport_url "rabbit://openstack:<RabbitMQ密码>@192.168.100.100"
crudini --set $cfg keystone_authtoken www_authenticate_uri "http://192.168.100.100:5000"
crudini --set $cfg keystone_authtoken auth_url "http://192.168.100.100:5000"
crudini --set $cfg keystone_authtoken memcached_servers 192.168.100.100:11211
crudini --set $cfg keystone_authtoken auth_type password
crudini --set $cfg keystone_authtoken project_domain_name default
crudini --set $cfg keystone_authtoken user_domain_name default
crudini --set $cfg keystone_authtoken project_name service
crudini --set $cfg keystone_authtoken username neutron
crudini --set $cfg keystone_authtoken password "<Neutron密码>"
crudini --set $cfg oslo_concurrency lock_path /var/lib/neutron/tmp
使用命令修改配置文件 /etc/neutron/plugins/ml2/linuxbridge_agent.ini
(自行替换网卡名称)
cfg=/etc/neutron/plugins/ml2/linuxbridge_agent.ini
crudini --set $cfg linux_bridge physical_interface_mappings provider:<网卡名称>
crudini --set $cfg vxlan enable_vxlan false
crudini --set $cfg securitygroup enable_security_group true
crudini --set $cfg securitygroup firewall_driver neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
使用命令修改配置文件 /etc/nova/nova.ini
(自行替换neutron、metadata的密码)
cfg=/etc/nova/nova.conf
crudini --set $cfg neutron auth_url "http://192.168.100.100:5000"
crudini --set $cfg neutron auth_type password
crudini --set $cfg neutron project_domain_name default
crudini --set $cfg neutron user_domain_name default
crudini --set $cfg neutron region_name RegionOne
crudini --set $cfg neutron project_name service
crudini --set $cfg neutron username neutron
crudini --set $cfg neutron password "<Neutron密码>"
启用服务
systemctl restart openstack-nova-compute openstack-neutron-linuxbridge-agent
systemctl enable openstack-neutron-linuxbridge-agent
验证
openstack network agent list
OpenStack Dashboard - Horizon
安装horizon
pacman -S apache mod_wsgi openstack-horizon
配置文件
使用命令修改配置文件 /etc/openstack-dashboard/local_settings
ALLOWED_HOSTS = ['*', ]
OPENSTACK_HOST = "192.168.100.100"
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '192.168.100.100:11211',
}
}
TIME_ZONE = "Asia/Shanghai"
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
OPENSTACK_API_VERSIONS = {
"identity": 3,
"image": 2,
"volume": 3,
}
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
OPENSTACK_NEUTRON_NETWORK = {
'enable_router': False,
'enable_quotas': False,
'enable_distributed_router': False,
'enable_ha_router': False,
'enable_fip_topology_check': False,
}
使用命令修改配置文件 /etc/httpd/conf/httpd.conf
Include conf/extra/wsgi-horizon.conf
初始化horizon
cd /usr/share/openstack-horizon
./manage.py collectstatic
启动服务
systemctl enable httpd
systemctl restart httpd
3 comments for “在ArchLinux下部署OpenStack”