Created
February 8, 2020 18:03
-
-
Save a1git/788efba8948d5695e19b39c51442e7e2 to your computer and use it in GitHub Desktop.
kolla aio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sd@aio1:~$ cat /etc/lsb-release | |
DISTRIB_ID=Ubuntu | |
DISTRIB_RELEASE=18.04 | |
DISTRIB_CODENAME=bionic | |
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS" | |
A. Install dependencies | |
A.1 | |
sd@aio1:~$ sudo apt-get update | |
[sudo] password for sd: | |
Hit:1 http://nl.archive.ubuntu.com/ubuntu bionic InRelease | |
Hit:2 http://nl.archive.ubuntu.com/ubuntu bionic-updates InRelease | |
Hit:3 http://nl.archive.ubuntu.com/ubuntu bionic-backports InRelease | |
Hit:4 http://nl.archive.ubuntu.com/ubuntu bionic-security InRelease | |
Reading package lists... Done | |
A.2 | |
sd@aio1:~$ sudo apt-get install python-dev libffi-dev gcc libssl-dev python-selinux python-setuptools | |
B.Install dependencies using a virtual environment | |
B.1 | |
sd@aio1:~$ sudo apt-get install python-virtualenv | |
sd@aio1:~$ python --version | |
Python 2.7.17 | |
B.2 | |
sd@aio1:~$ virtualenv kolla-base | |
Running virtualenv with interpreter /usr/bin/python2 | |
New python executable in /home/sd/kolla-base/bin/python2 | |
Also creating executable in /home/sd/kolla-base/bin/python | |
Installing setuptools, pkg_resources, pip, wheel...done. | |
sd@aio1:~$ source kolla-base/bin/activate | |
(kolla-base) sd@aio1:~$ | |
B.3 | |
(kolla-base) sd@aio1:~$ pip install -U pip | |
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support | |
Requirement already up-to-date: pip in ./kolla-base/lib/python2.7/site-packages (20.0.2) | |
B.4 | |
(kolla-base) sd@aio1:~$ pip install ansible | |
.. Successfully installed ansible-2.9.4 | |
C. Install Kolla-ansible | |
C.1 | |
(kolla-base) sd@aio1:~$ pip install kolla-ansible | |
C.2 | |
(kolla-base) sd@aio1:~$ sudo mkdir -p /etc/kolla | |
(kolla-base) sd@aio1:~$ sudo chown $USER:$USER /etc/kolla | |
C.3 | |
(kolla-base) sd@aio1:~$ cp -r kolla-base/share/kolla-ansible/etc_examples/kolla/* /etc/kolla/ | |
(kolla-base) sd@aio1:~$ ls -al /etc/kolla/ | |
total 44 | |
drwxr-xr-x 2 sd sd 4096 Feb 8 17:28 . | |
drwxr-xr-x 94 root root 4096 Feb 8 16:49 .. | |
-rw-rw-r-- 1 sd sd 24639 Feb 8 17:28 globals.yml | |
-rw-rw-r-- 1 sd sd 5217 Feb 8 17:28 passwords.yml | |
C.4 | |
(kolla-base) sd@aio1:~$ cp kolla-base/share/kolla-ansible/ansible/inventory/* . | |
(kolla-base) sd@aio1:~$ ls -al | |
total 68 | |
drwxr-xr-x 6 sd sd 4096 Feb 8 17:35 . | |
drwxr-xr-x 3 root root 4096 Jan 29 14:38 .. | |
-rw-rw-r-- 1 sd sd 9245 Feb 8 17:35 all-in-one | |
drwxrwxr-x 6 sd sd 4096 Feb 8 16:47 kolla-base | |
-rw-rw-r-- 1 sd sd 9719 Feb 8 17:35 multinode | |
D. Install Kolla for development | |
D.1 | |
(kolla-base) sd@aio1:~$ git clone https://github.com/openstack/kolla | |
Cloning into 'kolla'... | |
remote: Enumerating objects: 36, done. | |
remote: Counting objects: 100% (36/36), done. | |
remote: Compressing objects: 100% (35/35), done. | |
remote: Total 70339 (delta 13), reused 20 (delta 0), pack-reused 70303 | |
Receiving objects: 100% (70339/70339), 12.84 MiB | 15.06 MiB/s, done. | |
Resolving deltas: 100% (42727/42727), done. | |
(kolla-base) sd@aio1:~$ git clone https://github.com/openstack/kolla-ansible | |
Cloning into 'kolla-ansible'... | |
remote: Enumerating objects: 156, done. | |
remote: Counting objects: 100% (156/156), done. | |
remote: Compressing objects: 100% (125/125), done. | |
remote: Total 99501 (delta 68), reused 99 (delta 29), pack-reused 99345 | |
Receiving objects: 100% (99501/99501), 18.03 MiB | 17.02 MiB/s, done. | |
Resolving deltas: 100% (65215/65215), done. | |
(kolla-base) sd@aio1:~$ | |
D.2 | |
(kolla-base) sd@aio1:~$ pip install ./kolla | |
(kolla-base) sd@aio1:~$ pip install ./kolla-ansible | |
D.3 ## not sure why this step is again here.. its already done on step C.2 | |
(kolla-base) sd@aio1:~$ sudo mkdir -p /etc/kolla | |
(kolla-base) sd@aio1:~$ sudo chown $USER:$USER /etc/kolla | |
D.4 ## this overrides the files copied before in the same way on step C.3 -- the file size is different. || whats the point of doing C.3 ? | |
(kolla-base) sd@aio1:~$ cp -r kolla-ansible/etc/kolla/* /etc/kolla | |
(kolla-base) sd@aio1:~$ ls -al /etc/kolla/ | |
total 44 | |
drwxr-xr-x 2 sd sd 4096 Feb 8 17:28 . | |
drwxr-xr-x 94 root root 4096 Feb 8 17:29 .. | |
-rw-rw-r-- 1 sd sd 24890 Feb 8 17:39 globals.yml | |
-rw-rw-r-- 1 sd sd 5075 Feb 8 17:39 passwords.yml | |
D.5 ## this copies the files again, but bigger file size as in step C.4 || whats the point of doing C.4 ? | |
(kolla-base) sd@aio1:~$ cp kolla-ansible/ansible/inventory/* . | |
(kolla-base) sd@aio1:~$ ls -al | |
total 76 | |
drwxr-xr-x 8 sd sd 4096 Feb 8 17:37 . | |
drwxr-xr-x 3 root root 4096 Jan 29 14:38 .. | |
-rw-rw-r-- 1 sd sd 9361 Feb 8 17:43 all-in-one | |
drwxrwxr-x 13 sd sd 4096 Feb 8 17:37 kolla | |
drwxrwxr-x 14 sd sd 4096 Feb 8 17:37 kolla-ansible | |
drwxrwxr-x 6 sd sd 4096 Feb 8 16:47 kolla-base | |
-rw-rw-r-- 1 sd sd 9835 Feb 8 17:43 multinode | |
E. Configure Ansible | |
(kolla-base) sd@aio1:~$ ls -al /etc/ansible | |
ls: cannot access '/etc/ansible': No such file or directory | |
Missing step: | |
(kolla-base) sd@aio1:~$ sudo mkdir /etc/ansible | |
sudo vi /etc/ansible/ansible.cfg | |
[defaults] | |
host_key_checking=False | |
pipelining=True | |
forks=100 | |
F. Prepare initial configuration | |
(kolla-base) sd@aio1:~$ ansible -i all-in-one all -m ping | |
[DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to allow bad characters in group names by default, this will change, but still be user | |
configurable on deprecation. This feature will be removed in version 2.10. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. | |
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details | |
[DEPRECATION WARNING]: Distribution Ubuntu 18.04 on host localhost should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior | |
Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See | |
https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. This feature will be removed in version 2.12. Deprecation | |
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. | |
localhost | SUCCESS => { | |
"ansible_facts": { | |
"discovered_interpreter_python": "/usr/bin/python" | |
}, | |
"changed": false, | |
"ping": "pong" | |
} | |
G. Kolla passwords | |
## there is no explaination between kolla-genpwd vs cd kolla-ansible/tools ./generate_passwords.py | |
(kolla-base) sd@aio1:~$ kolla-genpwd | |
H. Kolla globals.yml | |
--- | |
kolla_base_distro: "ubuntu" | |
kolla_install_type: "source" | |
openstack_release: "train" | |
kolla_internal_vip_address: "192.168.88.99" | |
network_interface: "enp0s3" | |
neutron_external_interface: "enp0s8" | |
neutron_plugin_agent: "openvswitch" | |
openstack_region_name: "NL" | |
enable_openstack_core: "yes" | |
I. Deployment | |
I.1 | |
(kolla-base) sd@aio1:~$ kolla-ansible -i ./all-in-one bootstrap-servers | |
Bootstrapping servers : ansible-playbook -i ./all-in-one -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e CONFIG_DIR=/etc/kolla -e kolla_action=bootstrap-servers /home/sd/kolla-base/share/kolla-ansible/ansible/kolla-host.yml | |
[DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to allow bad characters in group names by default, this will change, but still be user | |
configurable on deprecation. This feature will be removed in version 2.10. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. | |
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details | |
PLAY [Gather facts for all hosts] **************************************************************************************************************************************** | |
TASK [Gather facts] ****************************************************************************************************************************************************** | |
[DEPRECATION WARNING]: Distribution Ubuntu 18.04 on host localhost should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior | |
Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See | |
https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. This feature will be removed in version 2.12. Deprecation | |
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. | |
ok: [localhost] | |
TASK [Group hosts to determine when using --limit] *********************************************************************************************************************** | |
ok: [localhost] | |
[WARNING]: Could not match supplied host pattern, ignoring: all_using_limit_True | |
PLAY [Gather facts for all hosts (if using --limit)] ********************************************************************************************************************* | |
skipping: no hosts matched | |
PLAY [Apply role baremetal] ********************************************************************************************************************************************** | |
TASK [baremetal : include_tasks] ***************************************************************************************************************************************** | |
included: /home/sd/kolla-base/share/kolla-ansible/ansible/roles/baremetal/tasks/bootstrap-servers.yml for localhost | |
TASK [baremetal : include_tasks] ***************************************************************************************************************************************** | |
included: /home/sd/kolla-base/share/kolla-ansible/ansible/roles/baremetal/tasks/pre-install.yml for localhost | |
TASK [baremetal : Ensure localhost in /etc/hosts] ************************************************************************************************************************ | |
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "sudo: a password is required\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1} | |
PLAY RECAP *************************************************************************************************************************************************************** | |
localhost : ok=4 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 | |
Command failed ansible-playbook -i ./all-in-one -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e CONFIG_DIR=/etc/kolla -e kolla_action=bootstrap-servers /home/sd/kolla-base/share/kolla-ansible/ansible/kolla-host.yml | |
### document does not mention need to use sudo. | |
(kolla-base) sd@aio1:~$ sudo kolla-ansible -i ./all-in-one bootstrap-servers | |
[sudo] password for sd: | |
### does not work either. | |
Have to be root and then source /home/sd/kolla-base/bin/activate again | |
### need something in the documentation saying if you are doing this in local machine, which all-in-one has hardcoded as localhost, then be root directly. | |
(kolla-base) sd@aio1:~$ sudo su | |
root@aio1:/home/sd# source kolla-base/bin/activate | |
(kolla-base) root@aio1:/home/sd# | |
(kolla-base) root@aio1:/home/sd# kolla-ansible -i ./all-in-one bootstrap-servers | |
PLAY RECAP *************************************************************************************************************************************************************** | |
localhost : ok=39 changed=18 unreachable=0 failed=0 skipped=31 rescued=0 ignored=0 | |
I.2 | |
(kolla-base) root@aio1:/home/sd# kolla-ansible -i ./all-in-one prechecks | |
TASK [prechecks : Checking docker SDK version] *************************************************************************************************************************** | |
fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["/usr/bin/python", "-c", "import docker; print(docker.__version__)"], "delta": "0:00:00.006587", "end": "2020-02-08 18:00:47.157844", "failed_when_result": true, "msg": "non-zero return code", "rc": 1, "start": "2020-02-08 18:00:47.151257", "stderr": "Traceback (most recent call last):\n File \"<string>\", line 1, in <module>\nImportError: No module named docker", "stderr_lines": ["Traceback (most recent call last):", " File \"<string>\", line 1, in <module>", "ImportError: No module named docker"], "stdout": "", "stdout_lines": []} | |
PLAY RECAP *************************************************************************************************************************************************************** | |
localhost : ok=9 changed=0 unreachable=0 failed=1 skipped=3 rescued=0 ignored=0 | |
Command failed ansible-playbook -i ./all-in-one -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e CONFIG_DIR=/etc/kolla -e kolla_action=precheck /home/sd/kolla-base/share/kolla-ansible/ansible/site.yml | |
## need to install docker manually ? ## why did the bootstrap-servers not installed this ? | |
## running bootstrap again | |
(kolla-base) root@aio1:/home/sd# kolla-ansible -i ./all-in-one bootstrap-servers | |
PLAY RECAP *************************************************************************************************************************************************************** | |
localhost : ok=38 changed=2 unreachable=0 failed=0 skipped=32 rescued=0 ignored=0 | |
and again | |
(kolla-base) root@aio1:/home/sd# kolla-ansible -i ./all-in-one bootstrap-servers | |
PLAY RECAP *************************************************************************************************************************************************************** | |
localhost : ok=38 changed=2 unreachable=0 failed=0 skipped=32 rescued=0 ignored=0 | |
## running prechecks again # | |
TASK [prechecks : Checking docker SDK version] *************************************************************************************************************************** | |
fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["/usr/bin/python", "-c", "import docker; print(docker.__version__)"], "delta": "0:00:00.006322", "end": "2020-02-08 18:02:52.290186", "failed_when_result": true, "msg": "non-zero return code", "rc": 1, "start": "2020-02-08 18:02:52.283864", "stderr": "Traceback (most recent call last):\n File \"<string>\", line 1, in <module>\nImportError: No module named docker", "stderr_lines": ["Traceback (most recent call last):", " File \"<string>\", line 1, in <module>", "ImportError: No module named docker"], "stdout": "", "stdout_lines": []} | |
PLAY RECAP *************************************************************************************************************************************************************** | |
localhost : ok=9 changed=0 unreachable=0 failed=1 skipped=3 rescued=0 ignored=0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you ever resolve this?