+++++++++++++++++++++++安装准备+++++++++++++++++++++++
首先移动存储挂载镜像启动,源修改为http://mirrors.aliyun.com/ubuntu/,
其它一路默认,重启后进入系统,sudo password root 修改root密码,su - root
接着安装python3.6并设置为默认版本:
apt-get install python3.6
sudo apt-get install python3-pip
apt install python
sudo apt-get install python-pip
root@ubuntu:~# cd /
root@ubuntu:/# cd root/
root@ubuntu:~# mkdir .pip
root@ubuntu:~# vi .pip/pip.conf
[global]
index-url = http://pypi.douban.com/simple/
[install]
trusted-host=pypi.douban.com
disable-pip-version-check = true
timeout = 6000
python3 -m pip install --upgrade pip
python -m pip install --upgrade pip
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150
++++++++++++++++++++++正式开始安装+++++++++++++++++++
时间、atp源修改:
1、root@ubuntu:/# timedatectl status
2、root@ubuntu:/# timedatectl set-timezone “Asia/Shanghai”
3、root@ubuntu:/# mv /etc/apt/sources.list /etc/apt/sourses.list.backup
4、root@ubuntu:/# vim /etc/apt/sources.list
5、#阿里云源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
6、root@ubuntu:/# apt update
7、root@ubuntu:/# apt upgrade
8、root@ubuntu:/# reboot
9、root@ubuntu:~# sudo apt-get install git
10、pip -V
11、pip3 -V
12、python -V
13、python3 -V
14、pip list
devstack工具部署:
15、root@ubuntu:~# sudo pip install -U os-testr
16、pip list
17、使用HFS加载devstack-master.zip到局域网
18、root@ubuntu:~# wget http://192.168.31.24/devstack-master.zip
19、root@ubuntu:~# apt install unzip
20、root@ubuntu:~# unzip devstack-master.zip
21、ls
创建devstack专用账户stack:
22、root@ubuntu:~# sudo useradd -s /bin/bash -d /opt/stack -m stack
23、root@ubuntu:~# echo “stack ALL=(ALL) NOPASSWD: ALL” | sudo tee /etc/sudoers.d/stack
24、root@ubuntu:~# mv devstack-master /opt/stack/devstack
25、root@ubuntu:~# chown -R stack:stack /opt/stack/devstack
26、root@ubuntu:~# sudo su - stack
27、stack@ubuntu:~$ cd devstack/
28、使用HFS加载cirros-0.3.5-x86_64-disk.img到局域网
29、stack@ubuntu:~/devstack$ nano local.conf
30、写入:
[[local|localrc]]
Password for KeyStone, Database, RabbitMQ and ServiceADMIN_PASSWORD=StrongAdminSecret
DATABASE_PASSWORD=ADMINPASSWORDRABBITPASSWORD=ADMIN_PASSWORD
RABBIT_PASSWORD=ADMINPASSWORDRABBITPASSWORD=ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
HOST_IP=192.168.31.181
use TryStack git mirrorGIT_BASE=http://git.trystack.cn
NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git
DOWNLOAD_DEFAULT_IMAGES=False
IMAGE_URLS=“http://192.168.31.24/cirros-0.3.5-x86_64-disk.img”
enable_service placement-api
enable_service placement-client
修改stackrc ETCD文件下载路径:
31、stack@ubuntu:~/devstack$ vim stackrc
32、修改为:
ETCD_DOWNLOAD_URL=ETCDDOWNLOADURL:−http://192.168.31.24/ETCDDOWNLOADLOCATION={ETCD_DOWNLOAD_URL:-http://192.168.31.24/}
ETCD_DOWNLOAD_LOCATION=ETCDDOWNLOADURL:−http://192.168.31.24/ETCDDOWNLOADLOCATION=ETCD_DOWNLOAD_URL
修改install_pip.sh文件,注释掉pip升级函数:
33、:wq
34、cd tools
35、stack@ubuntu:~/devstack/tools$ vim install_pip.sh
36、#install_get_pip
开始安装:
37、stack@ubuntu:~/devstack/tools$ cd …
38、stack@ubuntu:~/devstack$ ./stack.sh
安装过程查看进程占用带宽:
39、sudo apt-get install nethogs
nethogs enp0s25
查看进程占用网络带宽
ethstatus -i enp0s25
查看网卡占用带宽
【安装失败后要执行下面两条清理环境,再./stack.sh
stack@ubuntu:~/devstack$ ./unstack.sh
stack@ubuntu:~/devstack$ ./clean.sh
清理指定python版本(可选):
sudo apt-get remove python2.7
sudo apt-get remove --auto-remove python2.7
sudo apt-get purge python2.7 or sudo apt-get purge --auto-remove python2.7
】
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Total runtime 2050
This is your host IP address: 192.168.31.181
This is your host IPv6 address: ::1
Horizon is now available at http://192.168.31.181/dashboard
Keystone is serving at http://192.168.31.181/identity/
The default users are: admin and demo
The password: StrongAdminSecret
WARNING:
Using lib/neutron-legacy is deprecated, and it will be removed in the future
Services are running under systemd unit files.
For more information see:
https://docs.openstack.org/devstack/latest/systemd.html
DevStack Version: ussuri
Change:
OS Version: Ubuntu 18.04 bionic
2020-02-15 20:33:06.565 | stack.sh completed in 2050 seconds.
stack@ubuntu:~/devstack$