centos7 kolla-ansible
[root@deploy ~]# history
4 systemctl stop NetworkManager
6 systemctl disable NetworkManager
2 cd /etc/sysconfig/network-scripts/
9 cat ifcfg-eth0
44 cat ifcfg-eth1
50 ping www.hinet.net
58 systemctl restart network
82 vi /etc/hosts
83 hostname
77 ssh-keygen
78 ssh-copy-id
79 ssh-copy-id root@control01
85 ssh-copy-id root@control02
86 ssh-copy-id root@control03
87 ssh-copy-id root@compute01
89 yum -y update
90 curl -sSL https://get.docker.com | sh
91 usermod -aG docker root
93 docker version
99 systemctl start docker
100 systemctl enable docker
102 yum -y install epel-release
103 yum -y install python-pip
104 pip install -U pip
105 yum -y install python-devel libffi-devel gcc git openssl-devel libselinux-python
106 yum -y install ansible
107 pip install -U ansible
108 vi /etc/ansible/ansible.cfg
host_key_checking=False
pipelining=True
forks=300
pipelining=True
forks=300
systemctl stop libvirtd.service systemctl disable libvirtd.service
110 cd /opt ; git clone https://github.com/openstack/kolla-ansible -b stable/train
114 pip install -r kolla-ansible/requirements.txt --ignore-installed
115 cd /opt/kolla-ansible ; python setup.py install
116 cp -r /opt/kolla-ansible/etc/kolla /etc/kolla/
117 cp /opt/kolla-ansible/ansible/inventory/* /etc/kolla/
cp /opt/kolla-ansible/ansible/inventory/* /etc/kolla/
118 kolla-genpwd
119 cat /etc/kolla/passwords.yml
120 vi /etc/kolla/passwords.yml
keystone_admin_password: your password
121 cd /etc/kolla ; cp globals.yml globals.yml.orig
122 vi globals.yml
#docker_registry: 203.69.189.105:5000
docker_registry_insecure: "203.69.189.105:5000
#docker_registry: 203.69.189.105:5000
docker_registry_insecure: "203.69.189.105:5000
kolla_internal_vip_address: "203.69.189.117"
network_interface: "ens192"
neutron_external_interface: "ens160"
enable_ceph: "yes"
enable_ceph_rgw: "yes"
enable_cinder: "yes"
network_interface: "ens192"
neutron_external_interface: "ens160"
enable_ceph: "yes"
enable_ceph_rgw: "yes"
enable_cinder: "yes"
enable_etcd: "yes"
enable_freezer: "yes"
enable_watcher: "yes"
glance_backend_ceph: "yes"
glance_backend_file: "no"
cinder_backend_ceph: "{{ enable_ceph }}"
cinder_backup_driver: "ceph"
nova_backend_ceph: "{{ enable_ceph }}"
enable_freezer: "yes"
enable_watcher: "yes"
glance_backend_ceph: "yes"
glance_backend_file: "no"
cinder_backend_ceph: "{{ enable_ceph }}"
cinder_backup_driver: "ceph"
nova_backend_ceph: "{{ enable_ceph }}"
chcecking
enable_neutron_provider_networks: "no"
kolla_install_type: "source"
kolla_internal_vip_address: "203.69.189.117"
network_interface: "ens192"
neutron_external_interface: "ens224"
enable_ceph: "yes"
enable_ceph_rgw: "yes"
enable_cinder: "yes"
enable_neutron_provider_networks: "yes"
glance_backend_ceph: "yes"
glance_backend_file: "no"
cinder_backend_ceph: "{{ enable_ceph }}"
cinder_backup_driver: "ceph"
nova_backend_ceph: "{{ enable_ceph }}"
nova_compute_virt_type: "qemu"
kolla_internal_vip_address: "203.69.189.117"
network_interface: "ens192"
neutron_external_interface: "ens224"
enable_ceph: "yes"
enable_ceph_rgw: "yes"
enable_cinder: "yes"
enable_neutron_provider_networks: "yes"
glance_backend_ceph: "yes"
glance_backend_file: "no"
cinder_backend_ceph: "{{ enable_ceph }}"
cinder_backup_driver: "ceph"
nova_backend_ceph: "{{ enable_ceph }}"
nova_compute_virt_type: "qemu"
123 egrep "^[^#]" /etc/kolla/globals.yml
127 vi /etc/kolla/multinode
[control]
control01
control02
control03
[network]
control01
control02
control03
[compute]
compute01
[monitoring]
control01
control02
control03
[storage]
control01
control02
control03
[deployment]
localhost ansible_connection=local
egrep "^[^#]" /etc/kolla/multinode
control01
control02
control03
[network]
control01
control02
control03
[compute]
compute01
[monitoring]
control01
control02
control03
[storage]
control01
control02
control03
[deployment]
localhost ansible_connection=local
egrep "^[^#]" /etc/kolla/multinode
129 kolla-ansible -i multinode bootstrap-servers
130 kolla-ansible -i multinode prechecks
131 kolla-ansible -i multinode deploy
create certificat
pip install python-openstackclient
kolla-ansible post-deploy
. /etc/kolla/admin-openrc.sh
openstack nova list
/usr/lib64/python2.7/site-packages/cryptography/__init__.py:39: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
CryptographyDeprecationWarning,
Traceback (most recent call last):
File "/usr/bin/openstack", line 6, in <module>
from openstackclient.shell import main
File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 24, in <module>
from osc_lib import shell
File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 33, in <module>
from osc_lib.cli import client_config as cloud_config
File "/usr/lib/python2.7/site-packages/osc_lib/cli/client_config.py", line 18, in <module>
from openstack.config import exceptions as sdk_exceptions
File "/usr/lib/python2.7/site-packages/openstack/__init__.py", line 16, in <module>
import openstack.config
File "/usr/lib/python2.7/site-packages/openstack/config/__init__.py", line 17, in <module>
from openstack.config.loader import OpenStackConfig # noqa
File "/usr/lib/python2.7/site-packages/openstack/config/loader.py", line 33, in <module>
from openstack.config import cloud_region
File "/usr/lib/python2.7/site-packages/openstack/config/cloud_region.py", line 44, in <module>
from openstack import proxy
File "/usr/lib/python2.7/site-packages/openstack/proxy.py", line 24, in <module>
from openstack import resource
File "/usr/lib/python2.7/site-packages/openstack/resource.py", line 49, in <module>
from openstack import utils
File "/usr/lib/python2.7/site-packages/openstack/utils.py", line 13, in <module>
import queue
ImportError: No module named queue
CryptographyDeprecationWarning,
Traceback (most recent call last):
File "/usr/bin/openstack", line 6, in <module>
from openstackclient.shell import main
File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 24, in <module>
from osc_lib import shell
File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 33, in <module>
from osc_lib.cli import client_config as cloud_config
File "/usr/lib/python2.7/site-packages/osc_lib/cli/client_config.py", line 18, in <module>
from openstack.config import exceptions as sdk_exceptions
File "/usr/lib/python2.7/site-packages/openstack/__init__.py", line 16, in <module>
import openstack.config
File "/usr/lib/python2.7/site-packages/openstack/config/__init__.py", line 17, in <module>
from openstack.config.loader import OpenStackConfig # noqa
File "/usr/lib/python2.7/site-packages/openstack/config/loader.py", line 33, in <module>
from openstack.config import cloud_region
File "/usr/lib/python2.7/site-packages/openstack/config/cloud_region.py", line 44, in <module>
from openstack import proxy
File "/usr/lib/python2.7/site-packages/openstack/proxy.py", line 24, in <module>
from openstack import resource
File "/usr/lib/python2.7/site-packages/openstack/resource.py", line 49, in <module>
from openstack import utils
File "/usr/lib/python2.7/site-packages/openstack/utils.py", line 13, in <module>
import queue
ImportError: No module named queue
vi ./usr/lib/python2.7/site-packages/openstack/utils.py
...
#import queue
import Queue as queue
...
vi ./usr/lib/python2.7/site-packages/openstack/cloud/openstackcloud.py
...
#import queue
import Queue as queue
...
install kolla issue
pip install -r kolla/requirements.txt --ignore-installed
Ignoring GitPython: markers 'python_version >= "3.0"' don't match your environment
ERROR: Could not find a version that satisfies the requirement gitdb>=4.0.1 (from gitdb2>=2.0.0->GitPython<2.1.12,>=1.0.1->-r kolla/requirements.txt (line 7)) (from versions: 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4)
ERROR: No matching distribution found for gitdb>=4.0.1 (from gitdb2>=2.0.0->GitPython<2.1.12,>=1.0.1->-r kolla/requirements.txt (line 7))
ERROR: No matching distribution found for gitdb>=4.0.1 (from gitdb2>=2.0.0->GitPython<2.1.12,>=1.0.1->-r kolla/requirements.txt (line 7))
https://stackoverflow.com/questions/28483253/importerror-no-module-named-git-after-reformatting-laptop
https://gitpython.readthedocs.io/en/stable/intro.html#installing-gitpython
pip install gitpython
pip install gitpython --use-feature=2020-resolver
cd kolla ; python setup.py install
install registry
mkdir -p /var/lib/registry
vi /etc/docker/daemon.json
{
"insecure-registries":["203.69.189.105:5000"]
}
"insecure-registries":["203.69.189.105:5000"]
}
docker run -d -p 5000:5000 --restart=always --name registry -v 'pwd':/var/lib/registry registry
systemctl restart docker
systemctl restart docker
systemctl enable docker
build docker image && pull to registry
https://docs.openstack.org/kolla/train/admin/image-building.html
kolla-build -t source --registry 203.69.189.105:5000 --pushor
kolla-build --registry 203.69.189.105:5000 --push
Ceph (BLUESTORE)
vi /etc/kolla/ceph.conf
[global]
osd pool default size = 3
osd pool default min size = 3
lsblk
parted /dev/sdb -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP_BS 1 -1
Manager UI Information
rabbitmq
http://203.69.189.117:15672/
account and password at controler /etc/kolla/rabbitmq/definitions.json
ceph
(venv) [root@UMCT891 kolla-ansible]# history
5 yum install git python3-pip
6 git clone https://github.com/openstack/kolla-ansible -b stable/train
19 python3 -m venv /path/to/venv
20 source /path/to/venv/bin/activate
21 pip3 install -U pip
22 pip3 install -U ansible
26 cp -r kolla-ansible/etc/kolla/ /etc/kolla
28 yum install epel-release
29 yum install ansible
30 vi /etc/kolla/globals.yml
66 cd ansible/
68 cd inventory/
71 pwd
74 vi multinode
75 cd kolla-ansible/
76 vi /etc/hosts
77 ssh-keygen
78 ssh-copy-id root@control01
98 cd kolla-ansible/tools/
99 ls
100 ./generate_passwords.py
101 pip3 install oslo.utils
102 ./generate_passwords.py
103 cat /etc/kolla/passwords.yml
104 cd ~
105 ansible -i multinode all -m ping
106 ssh-keygen
107 ssh-copy-id root@control01
108 ssh-copy-id root@control02
109 ssh-copy-id root@control03
110 ansible -i multinode all -m ping
111 ls
112 cd kolla-ansible/tools/
115 cd ..
130 pip3 install kolla-ansible==9.0.1 --ignore-installed PyYAML
116 tools/kolla-ansible -i ansible/inventory/multinode bootstrap-servers
146 tools/kolla-ansible -i ansible/inventory/multinode prechecks
147 tools/kolla-ansible -i ansible/inventory/multinode deploy