Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

OpenStack practice (1): build p-version OpenStack by DevStack under Ubuntu16.04

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

There are many ways to deploy OpenStack, the common personal deployment methods are DevStack, Rdo, all-in-one, multi-node, multi-HA-node, etc.; enterprise deployment methods include Ansible, SaltStack, Puppet, TripleO, Kolla, Fuel and so on. Among them, DevStack is the preferred installation method or tool for many developers, which mainly installs an OpenStack development environment by configuring parameters and executing shell scripts.

The OpenStack open source community holds design summits (Design Summit) twice a year to release two official versions. Since the first version in 2010, a total of 18 versions have been published, each with a separate name, chosen from the city where the design summit is located, starting with A, and then B, C. no, no, no. The latest version is Rocky, and the letter R is exactly 18th in order. The version deployed in this article is Pike.

The control node and computing node of the OpenStack in this article are virtual machines newly built on Esxi. The specific configurations are as follows:

Control node configuration:

Compute node configuration:

For details of ubuntu installation, please see the full record of Ubuntu16.04.5 installation in lvm mode.

The installation steps of the control node and the computing node are the same, but the configuration in step 6 is different. In the actual installation process, the control node should be installed first and then the computing node. This paper takes the installation of the computing node as an example to record the construction process.

1.pip installation

Root@openstack-computer:~# pipThe program 'pip' is currently not installed. You can install it by typing:apt install python-piproot@openstack-computer:~# apt install-y python-pip

two。 Code download

Root@openstack-computer:~# git clone https://git.openstack.org/openstack-dev/devstack-b stable/pike

The installed version of this article is pike

3. Create user stack

Root@openstack-computer:~# lltotal 36drwx-4 root root 4096 Nov 29 17:02. / drwxr-xr-x 23 root root 4096 Nov 29 16:32.. /-rw- 1 root root 49 Nov 29 16:47. Bash _ history-rw-r--r-- 1 root root 3106 Oct 23 2015 .bashrcdrwx-2 root root 4096 Nov 29 16:47 .cache / drwxr-xr-x 17 root root 4096 Nov 29 17: 02 devstack/-rw-r--r-- 1 root root 148Aug 17 2015. Profile-rw- 1 root root 3413 Nov 29 16:51. Viminfo-rw- 1 root root 128Nov 29 16:47. Xauthorityroot @ openstack-computer:~# devstack/tools/create-stack-user.shCreating a group called stackCreating a user called stackGiving stack user passwordless sudo privileges

4. Modify pip source

Root user modifies pip source

Root@openstack-computer:~# mkdir ~ / .piproot@openstack-computer:~# view ~ / .pip/ pip.conf.global] trusted-host=mirrors.aliyun.comindex-url= https://mirrors.aliyun.com/pypi/simple/

Stack user modifies pip source

Root@openstack-computer:~# su-stackstack@openstack-computer:~$ mkdir ~ / .pipstack@openstack-computer:~$ view ~ / .pip/ pip.confusglobal] trusted-host=mirrors.aliyun.comindex-url= https://mirrors.aliyun.com/pypi/simple/

5. Move the devstack directory

Move the devstack directory from root's home directory to / opt/stack

Root@openstack-computer:~# mv devstack / opt/stackroot@openstack-computer:~# chown-R stack:stack / opt/stack/devstack

6. New profile

Control node:

[[local | localrc]] MULTI_HOST=true# management & api networkHOST_IP=172.27.34.37LOGFILE=/opt/stack/logs/stack.sh.log# CredentialsADMIN_PASSWORD=adminMYSQL_PASSWORD=loong576RABBIT_PASSWORD=loong576SERVICE_PASSWORD=loong576SERVICE_TOKEN=loong576# enable neutron-ml2-vlandisable_service n-net# Enable LBaaS v2enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas stable/pikeenable_plugin octavia https://git.openstack.org/openstack/octavia stable/pikeenable_plugin neutron-lbaas-dashboard https://git.openstack.org/ Openstack/neutron-lbaas-dashboard stable/pike# enable FWaaS v2enable_plugin neutron-fwaas https://git.openstack.org/openstack/neutron-fwaas stable/pikeenable_plugin neutron-fwaas-dashboard https://git.openstack.org/openstack/neutron-fwaas-dashboard stable/pikeenable_service q-lbaasv2 Octavia,o-cw,o-hk,o-hm,o-api,q-***,q-fwaas-v2,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutronQ_AGENT=linuxbridgeENABLE_TENANT_VLANS=TrueTENANT_VLAN_RANGE=3001:4000PHYSICAL_NETWORK=default# loggingLOG_COLOR=TrueLOGDIR=$DEST/logsSCREEN_LOGDIR=$LOGDIR/screen# use TryStack git mirrorGIT_BASE= http://git.trystack.cnNOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.gitSPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git

The ip of the control node is 172.27.34.37 and the password of admin is admin, which will be used for web login. The asterisk is v and p and n.

Compute nodes:

Stack@openstack-computer:~$ more / opt/stack/devstack/local.conf [[local | localrc]] MULTI_HOST=true# management & api networkHOST_IP=172.27.34.38# CredentialsADMIN_PASSWORD=adminMYSQL_PASSWORD=loong576RABBIT_PASSWORD=loong576SERVICE_PASSWORD=loong576SERVICE_TOKEN=loong576# Service informationSERVICE_HOST=172.27.34.37MYSQL_HOST=$SERVICE_HOSTRABBIT_HOST=$SERVICE_HOSTGLANCE_HOSTPORT=$SERVICE_HOST:9292Q_HOST=$SERVICE_HOSTKEYSTONE_AUTH_HOST=$SERVICE_HOSTKEYSTONE_SERVICE_HOST=$SERVICE_HOSTENABLED_SERVICES=n-cpu,q-agt NeutronQ_AGENT=linuxbridgeENABLE_TENANT_VLANS=TrueTENANT_VLAN_RANGE=3001:4000PHYSICAL_NETWORK=default# vnc configNOVA_VNC_ENABLED=TrueNOVNCPROXY_URL= "http://$SERVICE_HOST:6080/vnc_auto.html"VNCSERVER_LISTEN=$HOST_IPVNCSERVER_PROXYCLIENT_ADDRESS=$VNCSERVER_LISTEN# LoggingLOG_COLOR=TrueLOGDIR=$DEST/logsSCREEN_LOGDIR=$LOGDIR/screen# use TryStack git mirrorGIT_BASE= http://git.trystack.cnNOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.gitSPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.gitenable_service placement-api

HOST_IP=172.27.34.38 is the compute node ip

In this article, the parameter Q_AGENT is configured as linuxbridge, which means that the network chooses Linux Bridge mode. If Open vSwitch is selected, then Q_AGENT=openvswitch.

7. Deploy openstack

Stack@openstack-computer:~/devstack$. / stack.sh

The control node installation is complete:

The compute node installation is complete:

8. Log in to web

The address is: http://172.27.34.37, and the user name and password is admin/admin in the configuration file.

At this point, the OpenStack installation is complete.

9. Unloading

If you modify local.conf, you need to uninstall and then reinstall it.

Uninstall command

Stack@openstack-controller:~/devstack$. / unstack.shstack@openstack-controller:~/devstack$. / clean.sh

Build script has been uploaded to github: https://github.com/loong576/openstack-devstack.git

This article refers to:

Http://cloudman.cc/

Https://docs.openstack.org/devstack/latest/guides/devstack-with-lbaas-v2.html

Https://docs.openstack.org/neutron-fwaas-dashboard/latest/contributor/devstack-plugin.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report