我使用 conjure-up 在 Ubuntu 16.04 LTS 服务器上执行了单节点安装(https://www.ubuntu.com/download/cloud/try-openstack)。安装成功完成。完成端口转发后,我就可以访问 Horizon 仪表板了。
安装的openstack版本是2.3.1-Mitaka
我使用 lxd 容器在 (lxd-init) 上部署了 openstack。网桥名称为 lxdbr0。
lxdbr0 Link encap:Ethernet HWaddr fe:29:3f:95:33:74
inet addr:10.150.23.1 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5979473 errors:0 dropped:0 overruns:0 frame:0
TX packets:7665921 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1902164036 (1.9 GB) TX bytes:87174216616 (87.1 GB)
安装完成的服务器上的主要物理接口是 eno1
eno1 Link encap:Ethernet HWaddr bc:30:5b:ee:57:bc
inet addr:10.x.x.39 Bcast:10.221.31.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:71774809 errors:0 dropped:0 overruns:0 frame:0
TX packets:27467361 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:82425733947 (82.4 GB) TX bytes:13855543051 (13.8 GB)
Memory:dcb00000-dcbfffff
我按照此视频中的说明配置了网络 https://www.youtube.com/watch?v=yqFpyubsYfE和这里
https://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance-provider.html
https://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance-selfservice.html
我使用仪表板启动了一个示例实例,但无法从服务器(外部世界) ping/ssh 到它,反之亦然。
该实例已分配私有 IP 和浮动 IP。外部网络是一个 FLAT 网络,其物理网络名称与 ml2 conf ini 文件中定义的相同。中子 API/0节点。
我是 Openstack 和网络方面的新手,所以我们主要缺少一些步骤来建立虚拟机实例与外界的连接。
如果有人能帮我解决这个问题,我将不胜感激,我一直被这个问题困扰,这让人很沮丧。我只想能够从外部访问这个实例。
不同的 OpenStack 单元/服务(如 Neutron、nova、Glance 等)的 IP 分配如下10.150.23.x并且都很活跃。
lg@si-rd10-39:~$ sudo juju status
Model Controller Cloud/Region Version
conjure-openstack-novalx-937 conjure-up-localhost-88c localhost/localhost 2.2.6
App Version Status Scale Charm Store Rev OS Notes
ceph-mon 12.2.0 active 3 ceph-mon jujucharms 13 ubuntu
ceph-osd 12.2.0 active 3 ceph-osd jujucharms 249 ubuntu
ceph-radosgw 12.2.0 active 1 ceph-radosgw jujucharms 252 ubuntu
glance 15.0.0 active 1 glance jujucharms 259 ubuntu
keystone 12.0.0 active 1 keystone jujucharms 271 ubuntu
lxd 2.0.10 active 1 lxd jujucharms 13 ubuntu
mysql 5.6.34-26.19 active 1 percona-cluster jujucharms 255 ubuntu
neutron-api 11.0.1 active 1 neutron-api jujucharms 253 ubuntu
neutron-gateway 11.0.1 active 1 neutron-gateway jujucharms 241 ubuntu
neutron-openvswitch 11.0.1 active 1 neutron-openvswitch jujucharms 244 ubuntu
nova-cloud-controller 16.0.1 active 1 nova-cloud-controller jujucharms 301 ubuntu
nova-compute 16.0.1 active 1 nova-compute jujucharms 274 ubuntu
ntp waiting 0 ntp jujucharms 18 ubuntu
openstack-dashboard 12.0.0 active 1 openstack-dashboard jujucharms 251 ubuntu exposed
rabbitmq-server 3.5.7 active 1 rabbitmq-server jujucharms 68 ubuntu
Unit Workload Agent Machine Public address Ports Message
ceph-mon/0* active idle 1 10.150.23.194 Unit is ready and clustered
ceph-mon/1 active idle 10 10.150.23.173 Unit is ready and clustered
ceph-mon/2 active idle 11 10.150.23.108 Unit is ready and clustered
ceph-osd/0 active idle 14 10.150.23.7 Unit is ready (1 OSD)
ceph-osd/1 active idle 15 10.150.23.70 Unit is ready (1 OSD)
ceph-osd/2* active idle 2 10.150.23.213 Unit is ready (1 OSD)
ceph-radosgw/0* active idle 13 10.150.23.34 80/tcp Unit is ready
glance/0* active idle 3 10.150.23.63 9292/tcp Unit is ready
keystone/0* active idle 7 10.150.23.209 5000/tcp Unit is ready
mysql/0* active idle 0 10.150.23.32 3306/tcp Unit is ready
neutron-api/0* active idle 8 10.150.23.25 9696/tcp Unit is ready
neutron-gateway/0* active idle 4 10.150.23.155 Unit is ready
nova-cloud-controller/0* active idle 9 10.150.23.221 8774/tcp,8778/tcp Unit is ready
nova-compute/0* active idle 6 10.150.23.5 Unit is ready
lxd/0* active idle 10.150.23.5 Unit is ready
neutron-openvswitch/0* active idle 10.150.23.5 Unit is ready
openstack-dashboard/0* active idle 5 10.150.23.144 80/tcp,443/tcp Unit is ready
rabbitmq-server/0* active idle 12 10.150.23.186 5672/tcp Unit is ready
Machine State DNS Inst id Series AZ
0 started 10.150.23.32 juju-76629f-0 xenial
1 started 10.150.23.194 juju-76629f-1 xenial
2 started 10.150.23.213 juju-76629f-2 xenial
3 started 10.150.23.63 juju-76629f-3 xenial
4 started 10.150.23.155 juju-76629f-4 xenial
5 started 10.150.23.144 juju-76629f-5 xenial
6 started 10.150.23.5 juju-76629f-6 xenial
7 started 10.150.23.209 juju-76629f-7 xenial
8 started 10.150.23.25 juju-76629f-8 xenial
9 started 10.150.23.221 juju-76629f-9 xenial
10 started 10.150.23.173 juju-76629f-10 xenial
11 started 10.150.23.108 juju-76629f-11 xenial
12 started 10.150.23.186 juju-76629f-12 xenial
13 started 10.150.23.34 juju-76629f-13 xenial
14 started 10.150.23.7 juju-76629f-14 xenial
15 started 10.150.23.70 juju-76629f-15 xenial
实例私有IP为192.168.100.10
外部/浮动 IP 是 10.xx71
外部网关 IP 为 10.xx1
路由器 IP 是 10.xx73
该实例还设置了以下安全组规则
ALLOW IPv4 icmp from 0.0.0.0/0
ALLOW IPv4 icmp to 0.0.0.0/0
ALLOW IPv4 1-65535/tcp to 0.0.0.0/0
ALLOW IPv4 1-65535/tcp from 0.0.0.0/0
在 neutron-gateway/0 节点中
六、/etc/neutron/plugins/ml2/openvswitch_agent.ini
# mitaka
###############################################################################
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
###############################################################################
[ovs]
enable_tunneling = True
local_ip = 10.150.23.155
bridge_mappings = physnet1:br-ex
[agent]
tunnel_types = gre,vxlan
l2_population = True
enable_distributed_routing = False
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
在 neutron-api/0 节点中
修改 /etc/neutron/plugins/ml2/ml2_conf.ini
# mitaka
###############################################################################
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
###############################################################################
[ml2]
type_drivers = gre,vxlan,vlan,flat,local
tenant_network_types = gre,vxlan,vlan,flat,local
mechanism_drivers = openvswitch,hyperv,l2population
path_mtu = 1500
[ml2_type_gre]
tunnel_id_ranges = 1:1000
[ml2_type_vxlan]
vni_ranges = 1001:2000
[ml2_type_vlan]
network_vlan_ranges = physnet1:1000:2000
[ml2_type_flat]
flat_networks = physnet1
[ovs]
enable_tunneling = True
local_ip = 10.150.23.25
[agent]
tunnel_types = gre,vxlan
[securitygroup]
enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
如果您希望我运行任何命令,请指明在哪个节点上运行,例如 neutron-api/0 或 neutron-gateway/0、nova-compute/0 等...
此外,我发现当我尝试修改某些文件(例如 ml2 conf 文件)时,会出现一个警告
# mitaka
###############################################################################
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
###############################################################################
那么,有没有办法让这些文件的更改持久存在呢?
在此先感谢您的时间 !