Installing devstack via proxy
Read a great original article by a frontline developer every day
Getting involved in the OpenStack open source community inevitably requires installing devstack. The most secure way is to install it in the Xing Cloud environment, which eliminates the hassle of configuring the network. However, sometimes the appropriate conditions are not available and you need to use a proxy to install it.
There are several difficulties with installing devstack via the http proxy. This article does some summarizing. It can help the reader to install a good devstack environment via proxy without any problems.
Let's start by stating the prerequisites. Since devstack will use a number of mirror sources, such as yum, apt and pipy, a server that provides a network proxy will need to be able to connect to these mirror sources. In addition, the proxy must also be able to access the github or openstack git site without any problems.
According to the official devstack steps (please read through them first, don't rush to do them).
1. Create stack user
$ sudo useradd-s/bin/bash-d/opt/stack-m stack
2. Increase the permission of stack user
$ echo"stack ALL=(ALL) NOPASSWD: ALL"sudo tee/etc/sudoers.d/stack
$ sudo su-stack
$ git clone https://git.openstack.org/openstack-dev/devstack
$ cd devstack
4. Create a configuration file
5. Install devstack
If proxy does not apply, you can install it as described above. If you need to use a proxy, add the configuration of the proxy server before step 5:.
1. For the root user, modify /root/.bashrc by appending the following to the end of the file.
2, using ubuntu 16.04 system, so you need to modify the configuration of apt to use a proxy server. Modify /etc/apt/apt.conf to add.
Acquire::http::Proxy"【Proxy server configuration】";
Acquire::httpsy::Proxy"【Proxy server configuration】";
Explanation on the configuration of GIT_BASE and no_proxy. Since the git protocol can only be proxied by the socks5 protocol, the use of the GIT_BASE environment variable, which tells devstack to access from an http address, circumvents the git protocol problem. The no_proxy is put off in the second half of the devstack installation (i.e. the configuration section) and access to local addresses is also forwarded from the proxy server.
The installation can be completed in 30 minutes with a relatively good network.