[OpenStack] 오픈스택 시작

gununoo·2022년 9월 14일
1

OpenStack

목록 보기
1/4
post-thumbnail
post-custom-banner

이미지 출처: https://de.slideshare.net/koolhead17/openstack-open-source-software-for-building-public-and-private-cloud?next_slideshow=true

  • admin으로 로그인
  • 메인 화면
  • 프로젝트 확인
  • services : Tenant for the openstack services
  • admin: admin tenant
  • demo: default tenant

프로젝트 생성

  • 프로젝트 생성
  • 이름 입력
  • 멤버 추가
  • 프로젝트 생성

  • demo로 로그인
  • Quota 확인

admin에서 제한을 걸 수 있다.


이미지 생성

  • CirrOS 이미지 다운로드

이미지 출처: https://rzfeeser.com/cgi-sys/

이미지 다운로드 http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img

  • 이미지 생성

  • 이미지 생성 확인

네트워크 생성

  • 네트워크 이름 입력
  • 서브넷 구성

라우터 생성

  • 라우터 생성
  • 라우터의 인터페이스 선택
  • 인터페이스 추가
  • 네트워크 토폴로지 확인

인스턴스 생성

  • 인스턴스 시작

이름 입력, 개수 선택

  • 소스 선택

위에서 생성한 CIRROS 이미지 생성

  • Flavor 선택
  • 인스턴스 시작
  • 인스턴스 생성 확인
  • 네트워크 토폴로지 확인
  • 콘솔 열기
  • 로그인 및 ip 확인

user: cirros
password: gocubsgo

  • TESTVM-1: 172.16.123.213
  • TESTVM-2: 172.16.123.208
  • 서로 통신 확인
  • 디스크 확인

  • keystonerc_admin 확인
[root@localhost ~]# cat keystonerc_admin 
unset OS_SERVICE_TOKEN
    export OS_USERNAME=admin
    export OS_PASSWORD='test123'
    export OS_REGION_NAME=RegionOne
    export OS_AUTH_URL=http://211.183.3.111:5000/v3
    export PS1='[\u@\h \W(keystone_admin)]\$ '
    
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3

로그인을 위한 API 주소: http://211.183.3.111:5000/v3

-> PS1 프롬프트를

  • 백업
[root@localhost ~]# cp keystonerc_admin keystonerc_admin.bak
  • 수정
[root@localhost ~]# vi keystonerc_admin
    export PS1='[\u@\h \W(adm)]\$ '
  • 수정 반영
[root@localhost ~]# source keystonerc_admin 
[root@localhost ~(adm)]# 
  • server 확인
[root@localhost ~(adm)]# openstack server list

[root@localhost ~(adm)]# 

-> 아무것도 안 뜬다

  • network 확인
[root@localhost ~(adm)]# openstack network list
+--------------------------------------+---------+--------------------------------------+
| ID                                   | Name    | Subnets                              |
+--------------------------------------+---------+--------------------------------------+
| 91efa7f3-1d54-4b57-a50a-39de141d0519 | TESTNET | 727266ee-51e7-4fb2-b791-675277e191c8 |
+--------------------------------------+---------+--------------------------------------+
  • 서브넷 확인
[root@localhost ~(adm)]# openstack subnet list 
+--------------------------------------+----------------+--------------------------------------+-----------------+
| ID                                   | Name           | Network                              | Subnet          |
+--------------------------------------+----------------+--------------------------------------+-----------------+
| 727266ee-51e7-4fb2-b791-675277e191c8 | TESTNET_SUBNET | 91efa7f3-1d54-4b57-a50a-39de141d0519 | 172.16.123.0/24 |
+--------------------------------------+----------------+--------------------------------------+-----------------+
  • MariaDB 확인
[root@localhost ~(adm)]# systemctl status mariadb | grep Active
   Active: active (running) since Wed 2022-09-14 14:11:53 KST; 2h 54min ago
  • MariaDB 접속
[root@localhost ~(adm)]# mysql -u root -ptest123 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 90536
Server version: 10.1.20-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 
  • db 보기
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| aodh               |
| cinder             |
| glance             |
| gnocchi            |
| heat               |
| information_schema |
| keystone           |
| mysql              |
| neutron            |
| nova               |
| nova_api           |
| nova_cell0         |
| nova_placement     |
| performance_schema |
| test               |
+--------------------+
15 rows in set (0.00 sec)
  • glance의 테이블 확인
MariaDB [(none)]> use glance;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [glance]> show tables;
+----------------------------------+
| Tables_in_glance                 |
+----------------------------------+
| alembic_version                  |
| image_locations                  |
| image_members                    |
| image_properties                 |
| image_tags                       |
| images                           |
| metadef_namespace_resource_types |
| metadef_namespaces               |
| metadef_objects                  |
| metadef_properties               |
| metadef_resource_types           |
| metadef_tags                     |
| migrate_version                  |
| task_info                        |
| tasks                            |
+----------------------------------+
15 rows in set (0.00 sec)

MariaDB [glance]> 
  • images 확인
MariaDB [glance]> select * from images;
+--------------------------------------+--------+----------+---------+---------------------+---------------------+---------------------+---------+-------------+------------------+----------------------------------+----------------------------------+----------+---------+-----------+--------------+------------+-----------+--------------+----------------------------------------------------------------------------------------------------------------------------------+
| id                                   | name   | size     | status  | created_at          | updated_at          | deleted_at          | deleted | disk_format | container_format | checksum                         | owner                            | min_disk | min_ram | protected | virtual_size | visibility | os_hidden | os_hash_algo | os_hash_value                                                                                                                    |
+--------------------------------------+--------+----------+---------+---------------------+---------------------+---------------------+---------+-------------+------------------+----------------------------------+----------------------------------+----------+---------+-----------+--------------+------------+-----------+--------------+----------------------------------------------------------------------------------------------------------------------------------+
| 866d515d-b370-47ae-a06c-b74fffc23459 | cirros |      273 | deleted | 2022-09-13 14:54:57 | 2022-09-14 07:03:03 | 2022-09-14 07:03:03 |       1 | qcow2       | bare             | 52ba1c45042aa3688c09f303da283524 | 1de8dde7337841639030a4752e63f287 |        0 |       0 |         0 |         NULL | public     |         0 | sha512       | 507ca3ef53a49145ede39d6cb7394bb40b5f419aec5abac496880112825cf177c15f49e35ac7c8c9a45d659598b71d0c59b93d85c79c2d54c69748bdeda2b0a5 |
| 9423808f-294d-40da-a765-e4bce5460d5e | CIRROS | 16338944 | active  | 2022-09-14 07:11:26 | 2022-09-14 07:11:27 | NULL                |       0 | qcow2       | bare             | 1d3062cd89af34e419f7100277f38b2b | c2d7fa0658f941c9865f777384aee613 |        0 |       0 |         0 |         NULL | public     |         0 | sha512       | 553d220ed58cfee7dafe003c446a9f197ab5edf8ffc09396c74187cf83873c877e7ae041cb80f3b91489acf687183adcd689b53b38e3ddd22e627e7f98a09c46 |
+--------------------------------------+--------+----------+---------+---------------------+---------------------+---------------------+---------+-------------+------------------+----------------------------------+----------------------------------+----------+---------+-----------+--------------+------------+-----------+--------------+----------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.01 sec)

MariaDB [glance]> 

openstack 배포
1. 수동 설치
2. 자동 설치

  • packstack(*) => 저사양에서는 POC로 one node로 사용 할 수 있다
  • devstack
  • ooo (openstack on openstack)
  • 컨테이너

Cloud 플랫폼

Control		    Network             Compute             Storage 
- 인증           - DHCP              - VM 생성           - 볼륨 서비스  
- Dashboard 	- 라우팅             - Network 생성 		- block Storage
- API           - NAT/floatingIP 	- volume 생성       - File Storage 
                                                       - Object Storage
                                                       - Ceph
                                                       - glusterFS
profile
take a look
post-custom-banner

0개의 댓글