一、OpenStack官方配置文档:
https://docs.openstack.org/neutron/latest/admin/vpnaas-scenario.html
https://docs.openstack.org/neutron-vpnaas-dashboard/latest/install/index.html
二、新路历程:
安装VPNAAS的时候遇到了很多问题,现有的很少的安装配置文档都是基于老版本的,现在整理一个Q版本的VPNAAS环境部署方便大家配置自己的安装环境
少走我的弯路。
三、配置VPNAAS
OpenStack版本: Q
开发环境: Ubuntu16.04
安装步骤:
1.apt-get安装 neutron-vpnaas
apt-get -y install neutron-vpnaas
2.pip安装 neutron-vpnaas-dashboard
如果没有安装pip需要先安装 apt-get -y install python-pip
然后 pip install neutron-vpnaas-dashboard
3.到 openstak 的 dashboard 安装路径下新建文件_7100_project_vpn_panel.py
当然你也可以选择下载 neutron-vpnaas-dashboard源码,找到这个文件放到对应目录下即可。
下载方式:
以下为手动编写这个文件:
cd /usr/share/openstack-dashboard/openstack_dashboard/enabled/
touch _7100_project_vpn_panel.py
文件内容如下:
[root@localhost enabled]# vim _7100_project_vpn_panel.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# The slug of the panel to be added to HORIZON_CONFIG. Required.
PANEL = 'vpn'
# The slug of the dashboard the PANEL associated with. Required.
PANEL_DASHBOARD = 'project'
# The slug of the panel group the PANEL is associated with.
PANEL_GROUP = 'network'
# Python panel class of the PANEL to be added.
ADD_PANEL = 'neutron_vpnaas_dashboard.dashboards.project.vpn.panel.VPN'
ADD_INSTALLED_APPS = ["neutron_vpnaas_dashboard"]
4.配置vpnaas
直接参考官方配置文档:
4.1 vim /etc/neutron/neutron.conf
[DEFAULT]service_plugins = router,vpnaas
4.2 vim /etc/neutron/neutron_vpnaas.conf
[service_providers]service_provider = VPN:strongswan:neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default
4.3 vim /etc/neutron/l3_agent.ini
[AGENT]extensions = vpnaas[vpnagent]vpn_device_driver = neutron_vpnaas.services.vpn.device_drivers.strongswan_ipsec.StrongSwanDriver
4.4 执行 neutron-db-manage --subproject neutron-vpnaas upgrade head
5. 重启服务
systemctrl restart neutron-server
systemctrl restart neutron-l3-agent
systemctrl restart apache2
最后界面会多出一栏VPN

转载请标明出处:OpenStack(Q版)-VPNAAS环境部署
文章来源: OpenStack(Q版)-VPNAAS环境部署