1. ubuntu 20.04 준비
2. ubuntu 20.04에 devstack 설치 (openstack 공식 사이트 참고)
https://docs.openstack.org/devstack/latest/
1) OpenStack 환경을 쉽게 가져오기 위한 DevStack을 설치
2) DevStack의 stack 계정 생성
[실습]
root@pa-virtual-machine:/home/pa# useradd -U -G sudo -s /bin/bash -m stack
root@pa-virtual-machine:/home/pa# echo "stack ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
root@pa-virtual-machine:/home/pa# passwd stack
New password:
Retype new password:
passwd: password updated successfully
root@pa-virtual-machine:/home/pa#
root@pa-virtual-machine:/home/pa# passwd stack
New password:
Retype new password:
passwd: password updated successfully
3) DevStack 다운로드
[실습]
root@pa-virtual-machine:/home/pa#
root@pa-virtual-machine:/home/pa# su stack
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
stack@pa-virtual-machine:/home/pa$
stack@pa-virtual-machine:/home/pa$
stack@pa-virtual-machine:/home/pa$ cd
stack@pa-virtual-machine:~$ git clone https://git.openstack.org/openstack-dev/devstack
Command 'git' not found, but can be installed with:
sudo apt install git
stack@pa-virtual-machine:~$ sudo apt install git
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
The following additional packages will be installed:
git-man liberror-perl
제안하는 패키지:
git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn
다음 새 패키지를 설치할 것입니다:
git git-man liberror-perl
0개 업그레이드, 3개 새로 설치, 0개 제거 및 253개 업그레이드 안 함.
5,451 k바이트 아카이브를 받아야 합니다.
이 작업 후 38.5 M바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까? [Y/n] y
받기:1 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 liberror-perl all 0.17029-1 [26.5 kB]
받기:2 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 git-man all 1:2.25.1-1ubuntu3.8 [886 kB]
받기:3 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 git amd64 1:2.25.1-1ubuntu3.8 [4,538 kB]
내려받기 5,451 k바이트, 소요시간 22초 (248 k바이트/초)
Selecting previously unselected package liberror-perl.
(데이터베이스 읽는중 ...현재 223662개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../liberror-perl_0.17029-1_all.deb ...
Unpacking liberror-perl (0.17029-1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../git-man_1%3a2.25.1-1ubuntu3.8_all.deb ...
Unpacking git-man (1:2.25.1-1ubuntu3.8) ...
Selecting previously unselected package git.
Preparing to unpack .../git_1%3a2.25.1-1ubuntu3.8_amd64.deb ...
Unpacking git (1:2.25.1-1ubuntu3.8) ...
liberror-perl (0.17029-1) 설정하는 중입니다 ...
git-man (1:2.25.1-1ubuntu3.8) 설정하는 중입니다 ...
git (1:2.25.1-1ubuntu3.8) 설정하는 중입니다 ...
Processing triggers for man-db (2.9.1-1) ...
stack@pa-virtual-machine:~$
stack@pa-virtual-machine:~$ git clone https://git.openstack.org/openstack-dev/devstack
Cloning into 'devstack'...
warning: redirecting to https://opendev.org/openstack/devstack/
remote: Enumerating objects: 28847, done.
remote: Counting objects: 100% (28847/28847), done.
remote: Compressing objects: 100% (9761/9761), done.
remote: Total 49652 (delta 28158), reused 19086 (delta 19086), pack-reused 20805
Receiving objects: 100% (49652/49652), 10.80 MiB | 86.00 KiB/s, done.
Resolving deltas: 100% (34923/34923), done.
stack@pa-virtual-machine:~$
혹시 위의 과정에서 git clone이 "server certifiate verification failed"
발생 할 경우
아래의 포스팅을 참고해주세요!
https://kuveminton.tistory.com/71
4) local.conf 파일 생성(환경 설정)
[실습]
** ubuntu 서버 변경으로 hostname 변경 됨
stack@sam-virtual-machine:~$ ls
devstack
stack@sam-virtual-machine:~$ cd devstack
stack@sam-virtual-machine:~/devstack$ ls -al
total 364
drwxrwxr-x 15 stack stack 4096 2월 1 11:21 .
drwxr-xr-x 3 stack stack 4096 2월 1 11:18 ..
-rwxrwxr-x 1 stack stack 3302 2월 1 11:21 clean.sh
-rw-rw-r-- 1 stack stack 607 2월 1 11:21 CONTRIBUTING.rst
drwxrwxr-x 2 stack stack 4096 2월 1 11:21 data
drwxrwxr-x 3 stack stack 4096 2월 1 11:21 doc
drwxrwxr-x 2 stack stack 4096 2월 1 11:21 extras.d
drwxrwxr-x 7 stack stack 4096 2월 1 11:21 files
-rw-rw-r-- 1 stack stack 31416 2월 1 11:21 functions
-rw-rw-r-- 1 stack stack 77894 2월 1 11:21 functions-common
-rw-rw-r-- 1 stack stack 3774 2월 1 11:21 FUTURE.rst
drwxrwxr-x 2 stack stack 4096 2월 1 11:21 gate
drwxrwxr-x 8 stack stack 4096 2월 1 11:21 .git
-rw-rw-r-- 1 stack stack 422 2월 1 11:21 .gitignore
-rw-rw-r-- 1 stack stack 75 2월 1 11:21 .gitreview
-rw-rw-r-- 1 stack stack 11799 2월 1 11:21 HACKING.rst
drwxrwxr-x 2 stack stack 4096 2월 1 11:21 inc
drwxrwxr-x 8 stack stack 4096 2월 1 11:21 lib
-rw-rw-r-- 1 stack stack 10143 2월 1 11:21 LICENSE
-rw-rw-r-- 1 stack stack 340 2월 1 11:21 .mailmap
-rw-rw-r-- 1 stack stack 2490 2월 1 11:21 Makefile
-rw-rw-r-- 1 stack stack 4038 2월 1 11:21 openrc
drwxrwxr-x 4 stack stack 4096 2월 1 11:21 playbooks
-rw-rw-r-- 1 stack stack 3930 2월 1 11:21 README.rst
drwxrwxr-x 22 stack stack 4096 2월 1 11:21 roles
-rwxrwxr-x 1 stack stack 1188 2월 1 11:21 run_tests.sh
drwxrwxr-x 2 stack stack 4096 2월 1 11:21 samples
-rw-rw-r-- 1 stack stack 37793 2월 1 11:21 stackrc
-rwxrwxr-x 1 stack stack 46563 2월 1 11:21 stack.sh
drwxrwxr-x 2 stack stack 4096 2월 1 11:21 tests
drwxrwxr-x 3 stack stack 4096 2월 1 11:21 tools
-rw-rw-r-- 1 stack stack 1828 2월 1 11:21 tox.ini
-rwxrwxr-x 1 stack stack 4000 2월 1 11:21 unstack.sh
-rw-rw-r-- 1 stack stack 32647 2월 1 11:21 .zuul.yaml
stack@sam-virtual-machine:~/devstack$
stack@sam-virtual-machine:~/devstack$ cat local.conf <------ editor로 local.conf 작성
[[local|localrc]]
HOST_IP=192.168.199.37
SERVICE_HOST=192.168.199.37
MYSQL_HOST=192.168.199.37
RABBIT_HOST=192.168.199.37
GLANCE_HOSTPORT=192.168.199.37:9292
ADMIN_PASSWORD=openstack
DATABASE_PASSWORD=openstack
RABBIT_PASSWORD=openstack
SERVICE_PASSWORD=openstack
5) stack 설치
[실습]
./stack.sh 로 설치 시 아래와 같은 에러 발생
구글링으로 몇날 몇일 붙들고 있었으나.. 해결 불가.....
ubuntu 16.04에서 설치해보기로 함...ㅠ
Requirement already satisfied: attrs===22.1.0 in /opt/stack/requirements/.venv/lib/python3.8/site-packages (from -c /opt/stack/requirements/upper-constraints.txt (line 90)) (22.1.0)
Building wheels for collected packages: openstack-requirements
Building wheel for openstack-requirements (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /opt/stack/requirements/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-2ovng15e/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-2ovng15e/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-dalbto_v
cwd: /tmp/pip-req-build-2ovng15e/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for openstack-requirements
Running setup.py clean for openstack-requirements
Failed to build openstack-requirements
Installing collected packages: openstack-requirements
Attempting uninstall: openstack-requirements
Found existing installation: openstack-requirements 1.2.1.dev5856
Uninstalling openstack-requirements-1.2.1.dev5856:
Successfully uninstalled openstack-requirements-1.2.1.dev5856
Running setup.py install for openstack-requirements ... done
Successfully installed openstack-requirements-1.2.1.dev5856
+inc/python:pip_install:196 result=0
+inc/python:pip_install:198 time_stop pip_install
+functions-common:time_stop:2433 local name
+functions-common:time_stop:2434 local end_time
Requirement already satisfied: extras>=1.0.0 in /usr/local/lib/python3.8/dist-packages (from testtools->testscenarios>=0.4->oslo.db>=6.0.0->keystone==22.1.0.dev8) (1.0.0)
Installing collected packages: keystone
Attempting uninstall: keystone
Found existing installation: keystone 22.1.0.dev8
Can't uninstall 'keystone'. No files were found to uninstall.
Running setup.py develop for keystone
error: subprocess-exited-with-error
× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [37 lines of output]
running develop
/usr/local/lib/python3.8/dist-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/local/lib/python3.8/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/opt/stack/keystone/setup.py", line 18, in <module>
setuptools.setup(
File "/usr/local/lib/python3.8/dist-packages/setuptools/__init__.py", line 108, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.8/dist-packages/setuptools/dist.py", line 1213, in run_command
super().run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 984, in run_command
cmd_obj.ensure_finalized()
File "/usr/lib/python3.8/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/usr/local/lib/python3.8/dist-packages/setuptools/command/develop.py", line 52, in finalize_options
easy_install.finalize_options(self)
File "/usr/local/lib/python3.8/dist-packages/setuptools/command/easy_install.py", line 311, in finalize_options
self.local_index = Environment(self.shadow_path + sys.path)
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 1044, in __init__
self.scan(search_path)
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 1077, in scan
self.add(dist)
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 1096, in add
dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 2631, in hashcmp
self.parsed_version,
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 2685, in parsed_version
raise packaging.version.InvalidVersion(f"{str(ex)} {info}") from None
pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: '0.23ubuntu1' (package: distro-info)
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Can't roll back keystone; was not uninstalled
error: subprocess-exited-with-error
× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [37 lines of output]
running develop
/usr/local/lib/python3.8/dist-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/local/lib/python3.8/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/opt/stack/keystone/setup.py", line 18, in <module>
setuptools.setup(
File "/usr/local/lib/python3.8/dist-packages/setuptools/__init__.py", line 108, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.8/dist-packages/setuptools/dist.py", line 1213, in run_command
super().run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 984, in run_command
cmd_obj.ensure_finalized()
File "/usr/lib/python3.8/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/usr/local/lib/python3.8/dist-packages/setuptools/command/develop.py", line 52, in finalize_options
easy_install.finalize_options(self)
File "/usr/local/lib/python3.8/dist-packages/setuptools/command/easy_install.py", line 311, in finalize_options
self.local_index = Environment(self.shadow_path + sys.path)
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 1044, in __init__
self.scan(search_path)
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 1077, in scan
self.add(dist)
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 1096, in add
dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 2631, in hashcmp
self.parsed_version,
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 2685, in parsed_version
raise packaging.version.InvalidVersion(f"{str(ex)} {info}") from None
pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: '0.23ubuntu1' (package: distro-info)
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
+inc/python:pip_install:1 exit_trap
https://kuveminton.tistory.com/80
https://kuveminton.tistory.com/56
https://kuveminton.tistory.com/57
https://kuveminton.tistory.com/58
'💾 공대 라이프 > 클라우드_가상화' 카테고리의 다른 글
VMWARE ESXi 네트워크 어댑터 유형 정리(E1000 / SR-IOV / VMXNET) (0) | 2023.02.22 |
---|---|
우분투(ubuntu 22.04 LTS)에 OpenStack 설치 실습 (2) | 2023.02.08 |
git clone 오류(server certificate verification failed. CAfile: none CRLfile: none) 시 해결법 (0) | 2023.02.01 |
하이퍼바이저 오픈스택(OpenStack)의 기본 개념과 역사 (0) | 2023.01.27 |
하이퍼바이저의 정의와 분류(BareMetal/Native/Hosted) (0) | 2023.01.26 |
댓글