Because of the need to use Javaee+maven to build openstack4j development environment and test, so it is easy to build a OpenStack, see the online there is a relatively simple way to install OpenStack with Devstack, Consider that the computer configuration is still supported (my virtual machine is a 60G hard disk +4g memory, the following configuration has not been tried).
1. Ubuntu Link Address
# #http://101.110.118.70/old-releases.ubuntu.com/releases/14.04.1/ubuntu-14.04.1-server-amd64.iso
Https://www.ubuntu.com/download/server/thank-you?country=CN&version=16.04.3&architecture=amd64
2, the configuration of the virtual machine I am not tired of the statement, previously wrote the corresponding, interested can find.
My configuration is 60G hard disk +4g memory, Nat Bridge, in order to save trouble, actually did not go to the network configuration inside write things.
(ifconfig-a view/etc/network/interfaces modification)
$ sudo vim/etc/network/interfaces
The original content only has the following two lines:
Auto Lo
Iface Lo inet Loopback
3, replace apt source for Ali
Vim/etc/apt/sources.list
Deb Http://mirrors.aliyun.com/ubuntu/xenial main restricted universe multiverse
Deb Http://mirrors.aliyun.com/ubuntu/xenial-security main restricted universe multiverse
Deb Http://mirrors.aliyun.com/ubuntu/xenial-updates main restricted universe multiverse
Deb Http://mirrors.aliyun.com/ubuntu/xenial-backports main restricted universe multiverse
Deb http://mirrors.aliyun.com/ubuntu/xenial-proposed main restricted universe multiverse
DEB-SRC http://mirrors.aliyun.com/ubuntu/xenial main restricted universe multiverse
DEB-SRC http://mirrors.aliyun.com/ubuntu/xenial-security main restricted universe multiverse
DEB-SRC http://mirrors.aliyun.com/ubuntu/xenial-updates main restricted universe multiverse
DEB-SRC http://mirrors.aliyun.com/ubuntu/xenial-backports main restricted universe multiverse
DEB-SRC http://mirrors.aliyun.com/ubuntu/xenial-proposed main restricted universe multiverse
Save Exit execution
#apt-get Update
#apt-get Upgrade
4. Set time synchronization
Set time zone: Dpkg-reconfigure tzdata
Select Asia--Select Shanghai-OK
Synchronization Time Command:
1. sudo apt-get install ntpdate//Installation time Sync Tool
2, sudo ntpdate cn.pool.ntp.org//synchronization with the network server time
3, date//check time is synchronized
5, the first problem encountered here, Xshell not even, the reason is not ssh-server,unbuntu by default only installed Ssh-client.
Dpkg-l | grep ssh, first look at the next
Apt-get Install SSH
6, problem two, vi seems to be not very good, install vim (and git installation, I will not write)
sudo apt-get remove Vim-common
sudo apt-get install vim
7. Clone Devstack
Since it is done again, optimize the next steps:
(1) First clone:git clone Http://git.trystack.cn/openstack-dev/devstack.git-b stable/pike
(2) Create User: devstack/tools/create-stack-user.sh
Create a user named stack, modify the password yourself, the user directory in/opt/stack
(3) Move clone's Devstack directory to/opt/stack
Cp-r/home/devstack/opt/stack/
8, note that the above Devstack directory is the root user and user group, now need to create users, and Chown.
The stack user and stack user group are created by default
Remember to set the password and Chown-r stack:stack/opt/stack/devstack
Authorize the stack user under the root user. Edit/etc/sudoers,
Locate the line root all= (All:all) all, and add a row of stack all= (All:all) all below.
root@us14:~# vi/etc/sudoers
# User privilege Specification
root all= (all:all) all
stack all= (all:all) all< c3/>root@us14:~# chown–r stack:stack/home/devstack
root@us14:~# chown–r stack:stack/opt/stack
9, down again devstack directory, create local.conf file (I currently only build a node, later have the opportunity to multi-node)
From samples inside the CP local.conf, and then make changes
10, in order to speed up the download speed, in the Conf file to add the domestic mirror (http://git.trystack.cn/cgit)
# Use trystack git mirror
git_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
10. Some experience from other great gods copy (https://www.cnblogs.com/Allvirus/p/7783962.html)
Time-out is normal, just a few more times.
#cd files/
#wget-C https://github.com/coreos/etcd/releases/download/v3.1.10/etcd-v3.1.10-linux-amd64.tar.gz
#wget-C https://github.com/coreos/etcd/releases/download/v3.1.7/etcd-v3.1.7-linux-amd64.tar.gz
* * One download unsuccessful please execute the above command several times until Finish11,./devstack/stack.sh
Success
=========================
Devstack Component Timing
=========================
Total Runtime 1506
Run_process 30
Test_with_retry 3
Apt-get-update 7
Pip_install 89
OSC 146
Wait_for_service 33
DBSync 21
Apt-get 36
=========================
This is your host IP address:192.168.154.128
This is your host IPV6 address::: 1
Horizon is now available at Http://192.168.154.128/dashboard
Keystone is serving at http://192.168.154.128/identity/
The default users Are:admin and demo
The Password:admin
WARNING:
Using lib/neutron-legacy is deprecated, and it'll be removed in the future
Services is running under SYSTEMD unit files.
For more information see:
Https://docs.openstack.org/devstack/latest/systemd.html
Devstack Version:pike
Change:8565ea8578c828f55cba14394b2baaca631c5ab0 backport changes of Zuul jobs and definitions to Pike 2018-02-19 16:39:30 +0100
OS Version:ubuntu 16.04 xenial
FAQ:
A
Version not supported. Well, it's not spicy, okay?
B
/home/devstack/tools/install_pip.sh:89 Download of get-pip.py failed
Suod Apt-get Install Python-pip
Then in the Devstack/tools directory, find install_pip.py, comment out Install_get_pip this function call, and then execute./stack.sh