Openstack Kolla pike all-in-one installation

Summarize the recent deployment of openstack kolla, the first ALL-IN-ONE.

I wrote about deploying Openstack control nodes (ocata version) with Docker before, but I haven't had time to try it out since the official kolla came out.

Start:

The installation environment can be a physical machine or a virtual machine (dual network cards, in the case of a virtual machine, one of the network cards is of the host-only type, which is used to manage the address and host Horizon WEB access), the operating system is Ubuntu 16.04, and the local machine is used as a kolla master deployment node, The control node and the computing node are all-in-one, which can be easily extended to multi-node deployment in the future.

 Proceed as follows:

1. Modify the apt source. (optional)

cp /etc/apt/sources.list /etc/apt/sources.list.old
echo ' ' > /etc/apt/sources.list
nano /etc/apt/sources.list
#Paste as follows
# deb cdrom: [Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)] / xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ great multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu great partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

keep
apt update
apt upgrade

2. Install python pip ansible.

apt install python-pip
pip install -U -i https://pypi.tuna.tsinghua.edu.cn/simple pip
apt install python-dev libffi-dev gcc libssl-dev python-selinux
pip install -U -i https://pypi.tuna.tsinghua.edu.cn/simple ansible

 3. Install ubuntu official docker

apt install docker.io

#Modify the docker mount point share, must
mkdir -p /etc/systemd/system/docker.service.d
tee /etc/systemd/system/docker.service.d/kolla.conf << EOF
[Service]
MountFlags=shared
EOF

#Restart system services
systemctl daemon-reload
systemctl restart docker

#Uninstall the system lxd package
apt remove lxd

#install ntp service
apt install ntp

 4. Install kolla-ansible and openstack-client, copy the configuration file

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple kolla-ansible
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple python-openstackclient

#Torture globals.yml passwords.yml arriving / etc
cp -r / usr / local / share / kolla-ansible / etc_examples / kolla / etc / kolla /

#Copy inventory files to the current directory:
cp /usr/local/share/kolla-ansible/ansible/inventory/* .

 5. Deploy the local docker warehouse and download the kolla image source. (Optional, depending on the specific network speed. Easy to deploy)

#Local warehouse service port 4000
docker run -d -v /opt/registry:/var/lib/registry -p 4000:5000 \
--restart=always --name registry registry.docker-cn.com/library/registry:2

 

wget http://tarballs.openstack.org/kolla/images/ubuntu-source-registry-pike.tar.gz
tar zxvf ubuntu-source-registry-pike.tar.gz -C /opt/registry/
#Need to note down the downloaded kolla version:
#View http://<IP>:4000/v2/_catalog provides categories
#View the tag version number of the mirror http://10.64.8.178:4000/v2/lokolla/ubuntu-source-aodh-api/tags/list
5.0.1

    The kolla mirror source of the Pike version has a size of 3.2G, which can be downloaded according to the specific network speed.

 6. Modify the /etc/kolla/globals.yml configuration file

nano  /etc/kolla/globals.yml

    Remove the comments that need to modify the keywords:

kolla_base_distro: "ubuntu"
kolla_install_type: "source"
openstack_release: "5.0.1"
docker_registry: "localhost:4000"

#Specify the network card of the service
network_interface: "enp9s0"  

#Specify the virtual address of the external api service of the control node, and this virtual address will be used for api access between all nodes in the future
kolla_internal_vip_address: "192.168.121.254"

#My configuration instance does not configure neutron_external_interface to bind to the external network port, because the installation of kolla will interrupt the access to the external network port, making the external network inaccessible.

########################
# Nova - Compute Options
########################

# Valid options are [ qemu, kvm, vmware ]
#nova virtual machine defaults to kvm, if kolla is deployed on the virtual machine, change it to qemu
nova_compute_virt_type: "qemu"

#By default, other openstack components need to be enabled. Generally, it is not necessary to install them for trial use.

 7. Generate openstack password

kolla-genpwd
nano /etc/kolla/passwords.yml
#View the generated password, you can modify keystone_admin_password
keystone_admin_password: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 8. Configuration file check

#Before you need to check whether each interface address has a corresponding DNS host name in the /etc/hosts file
kolla-ansible prechecks -i `pwd`/all-in-one
#If the prechecks pass, go to the next step.

 9. The environment is ready before kolla services are started

kolla-ansible -i `pwd`/all-in-one bootstrap-servers

 10. Deploy kolla, openstack component containers

kolla-ansible deploy -i `pwd`/all-in-one
#If the deployment fails, run kolla-ansible -i `pwd`/all-in-one destroy --yes-i-really-really-mean-it to clear the installed component container

 11. Initialization that needs to be run after deployment:

kolla-ansible   -i `pwd`/all-in-one post-deploy

#demo virtual machine and demo network creation, optional.
nano/usr/local/share/kolla-ansible/init-runonce
. /etc/kolla/admin-openrc.sh
/usr/local/share/kolla-ansible/init-runonce

#View openstack services, such as:
openstack endpoint list
(openstack) endpoint list
+----------------------------------+-----------+--------------+----------------+---------+-----------+------------------------------------------------+
| ID                               | Region    | Service Name | Service Type   | Enabled | Interface | URL                                            |
+----------------------------------+-----------+--------------+----------------+---------+-----------+------------------------------------------------+
| 0bb942b54a274da081a4577bc2d079e2 | RegionOne | nova_legacy  | compute_legacy | True    | admin     | http://192.168.121.254:8774/v2/%(tenant_id)s   |
| 1b8a5f39b37a4ee3aae224567cfd212d | RegionOne | keystone     | identity       | True    | admin     | http://192.168.121.254:35357                   |
| 232807771ea04d7f8eb4a2b0ebf2d9bc | RegionOne | nova         | compute        | True    | public    | http://222.46.121.14:8774/v2.1/%(tenant_id)s   |
| 30aefc5824ba4736863d3951d9325261 | RegionOne | nova         | compute        | True    | internal  | http://192.168.121.254:8774/v2.1/%(tenant_id)s |
| 36ffc0cf11a64259972ae6a069c1daa1 | RegionOne | heat         | orchestration  | True    | public    | http://222.46.121.14:8004/v1/%(tenant_id)s     |
| 3cb1c3206a154a939f57619e0b6f7d3e | RegionOne | heat-cfn     | cloudformation | True    | public    | http://222.46.121.14:8000/v1                   |
| 4632f66b06454205a28190aa62d327f4 | RegionOne | glance       | image          | True    | public    | http://222.46.121.14:9292                      |
| 577a3edad4be4a299dff84254468dea1 | RegionOne | heat         | orchestration  | True    | admin     | http://192.168.121.254:8004/v1/%(tenant_id)s   |
| 62bc5f3fecbd4de89c4a44dbc850b4c4 | RegionOne | heat         | orchestration  | True    | internal  | http://192.168.121.254:8004/v1/%(tenant_id)s   |
| 62e13981ed85491babe04917e5dd6ad7 | RegionOne | keystone     | identity       | True    | public    | http://222.46.121.14:5000                      |
| 67ec47151cba410e862ed9c1edfee484 | RegionOne | placement    | placement      | True    | internal  | http://192.168.121.254:8780                    |
| 75eb8164962946e18ac2a89a83a14db4 | RegionOne | nova_legacy  | compute_legacy | True    | public    | http://222.46.121.14:8774/v2/%(tenant_id)s     |
| 7d1fa978e58d435f8801979e6e96a782 | RegionOne | nova         | compute        | True    | admin     | http://192.168.121.254:8774/v2.1/%(tenant_id)s |
| 7d6f0de151a640df8cdebdaf99dd03e0 | RegionOne | glance       | image          | True    | admin     | http://192.168.121.254:9292                    |
| 99609050d7a24205b7e078597533f92b | RegionOne | glance       | image          | True    | internal  | http://192.168.121.254:9292                    |
| 9e632250fd7e4c44b9cde68240182749 | RegionOne | keystone     | identity       | True    | internal  | http://192.168.121.254:5000                    |
| a075fb01c1df450b99f1f33ed886e187 | RegionOne | neutron      | network        | True    | public    | http://222.46.121.14:9696                      |
| aeca6632068c4e679e1508280af39aa0 | RegionOne | heat-cfn     | cloudformation | True    | admin     | http://192.168.121.254:8000/v1                 |
| b19ce717feb041f5b96c4c9f5ff327f6 | RegionOne | placement    | placement      | True    | admin     | http://192.168.121.254:8780                    |
| daccead80771453681cf84dca3722675 | RegionOne | neutron      | network        | True    | internal  | http://192.168.121.254:9696                    |
| e54ff14adfa1421a8959cbbeed88dfff | RegionOne | nova_legacy  | compute_legacy | True    | internal  | http://192.168.121.254:8774/v2/%(tenant_id)s   |
| ec1f6301ea4e4191b35a0480fd68c527 | RegionOne | heat-cfn     | cloudformation | True    | internal  | http://192.168.121.254:8000/v1                 |
| efe0b2f7115241d8a4e1c79a2ae65e6d | RegionOne | neutron      | network        | True    | admin     | http://192.168.121.254:9696                    |
| f20de569bd854987bca1940e660895bd | RegionOne | placement    | placement      | True    | public    | http://222.46.121.14:8780                      |
+----------------------------------+-----------+--------------+----------------+---------+-----------+------------------------------------------------+

 12. At this point, the simple openstack stand-alone service is ready. You can access horizon through a browser for web management. The access address is the VIP address (port 80, username admin, password is keystone_admin_password in /etc/kolla/passwords.yml).

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326174141&siteId=291194637