How to install OpenStack on a VM for CB Spider Testing - cloud-barista/cb-spider GitHub Wiki
------------------------------- In my case: AWS: Seoul Region (2020/12/04)
Image: Ubuntu Server 20.04 LTS (HVM), SSD Volume Type - ami-007b7745d0725de95
Spec: t2.2xlarge
storage: 50GB
SecurityGroup: powerkim-openstack (22, openstack dashboard: 80, Spider: 1024, 2048, 4096)
=> In my case: public-IP: 13.125.xxx.xxx
$ ssh -i powerkim.pem [email protected]
$ sudo useradd -s /bin/bash -d /opt/stack -m stack
$ 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
$ cp ./samples/local.conf ./
$ vi local.conf
ADMIN_PASSWORD=****
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
$ ./stack.sh
=========== ์ค์น ์๋ฃ ํ ์ถ๋ ฅ ๋ฉ์์ง
This is your host IP address: 172.31.30.48
This is your host IPv6 address: ::1
Horizon is now available at http://172.31.30.48/dashboard
Keystone is serving at http://172.31.30.48/identity/
The default users are: admin and demo
The password: ****
============
============== ์ดํ ์ค์น ์ค๋ฅ ์ ์ฐธ์กฐ ===========
* ์ค์น์ ์ค๋ฅ ๋ฐ์ํ๋ฉด,
1) ./unstack.sh ์คํ
2) ์ค์ ๋ณ๊ฒฝ ๋ฐ ์ค๋ฅ ํด๊ฒฐ
3) ./stack.sh ์ฌ์คํ
$ openstack --version
openstack 5.4.0
- Browser> http://13.125.xxx.xxx/dashboard admin / ****
- ์ฐธ๊ณ ์ฌํญ
- (์ค๋ฅ) Dashboard ํตํ instance ์์ฑ ์ '์๋ก์ด ๋ณผ๋ฅจ ์์ฑ' '์'๊ฐ ๊ธฐ๋ณธ ์ ํ ์ฌํญ์ด๋ฉฐ, ์ด ๊ฒฝ์ฐ VM ์์ฑ์ ๋์ง๋ง, Volume ์์ฑ ์ค๋ฅ๋ก VM์ด fail ์ํ
- (์ถ์ ) ๋ณผ๋ฅจ ์๋น์ค ์ค์ ์ค๋ฅ๊ฐ ์๋ ๋ฏ.
- (๋์) instance ์์ฑ ์ '์๋ก์ด ๋ณผ๋ฅจ ์์ฑ' '์๋์ค' ์ ํ. Spider Test์์๋ volume ์์ฑ์ ์ฌ์ฉํ์ง ์์์ ๋ฌด์ํ๊ณ ์งํ.
- Quick Guide ์ฐธ๊ณ : https://github.com/cloud-barista/cb-spider/wiki/Quick-Start-Guide
- Public Cloud์ VM์ OpenStack ์ค์น์ธ ๊ฒฝ์ฐ ๋คํธ์ํฌ ํ๊ฒฝ ๋ฌธ์ ๋ฐ์: ํด๊ฒฐํด๋ณด๋ ค๋ค ํ์ฌ๋ ํํผํจ.
- ์ค๋ฅ ํํฉ
- (์ค๋ฅ) Spider๋ฅผ ํตํด์ VM์ public IP๋ก OpenStack API ํธ์ถ์์ VM Private IP timeout ์ค๋ฅ ๋ฉ์์ง ์ถ๋ ฅ.
- (์ถ์ ) OpenStack ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋ด๋ถ์์ VM์ผ๋ก ๋ถํฐ ์ป์ ์๋ฒ ์ ๋ณด(private IP)๋ก ์ ์ ์๋ ์ค์ timeout ๋๋ ๊ฒ์ผ๋ก ๋ณด์.
- (๋์) ํ๊ฒฝ ๋ฌธ์ ์ด๋ฏ๋ก ํํผ^^
-
์ฐ๋ ์ ๋ณด ๋ฑ๋ก ์คํฌ๋ฆฝํธ ์์น
- ์์น1(์ค์น๋ฒ์ ): cb-spider/api-runtime/rest-runtime/test/connect-config/3.aws-devstack-openstack-conn-config.sh
- ์์น2(์ต์ ๋ฒ์ ): https://github.com/cloud-barista/cb-spider/blob/master/api-runtime/rest-runtime/test/connect-config/3.aws-devstack-openstack-conn-config.sh
-
์คํฌ๋ฆฝํธ์ ๋ค์ Key์ Value ์์ ํ ์คํ
- IdentityEndpoint
- Username
- Password
-
์ํ ํญ๋ชฉ(์ํ ์คํฌ๋ฆฝํธ ๋ด์ฉ ์ฐธ๊ณ )
- ์์น1(์ค์น๋ฒ์ ): cb-spider/blob/master/api-runtime/rest-runtime/test/full-test/full_test.sh
- ์์น2(์ต์ ๋ฒ์ ): https://github.com/cloud-barista/cb-spider/blob/master/api-runtime/rest-runtime/test/full-test/full_test.sh
- VPC: Create -> List -> Get
- SecurityGroup: Create -> List -> Get
- KeyPair: Create -> List -> Get"
- VM: StartVM -> List -> Get -> ListStatus -> GetStatus -> Suspend -> Resume -> Reboot
- VM: Terminate(Delete)
- KeyPair: Delete
- SecurityGroup: Delete
- VPC: Delete
-
์ํ ์คํฌ๋ฆฝํธ ์คํ
- ์์น1(์ค์น๋ฒ์ ): cb-spider/api-runtime/rest-runtime/test/full-test/3.aws-desvstack-openstack-test.sh
- ์์น2(์ต์ ๋ฒ์ ): https://github.com/cloud-barista/cb-spider/blob/master/api-runtime/rest-runtime/test/full-test/3.aws-desvstack-openstack-test.sh
- ํน๋ณํ ์ค๋ฅ ๋ฉ์์ง ์ถ๋ ฅ ์์ผ๋ฉด ์ฑ๊ณต
- ์ค๋ฅ ๋ฐ์์: ๋ฌธ์์ฒ
- gituhb issue: https://github.com/cloud-barista/cb-spider/issues
- slack channel: https://cloud-barista.slack.com/archives/CLFCLNFTJ