[Open Stack] [Controller Node] โ‘ข Keystone - Identity ์„ค์น˜ ๋ฐ ๊ตฌ์„ฑ

2023. 9. 9. 17:40ใ†System ์ž‘์—…์‹ค/Server ๊ด€๋ จ

728x90
๋ฐ˜์‘ํ˜•

 

 

 

 

 

 

 

 

 

OpenStack for Architects - Second Edition Paperback

COUPANG

www.coupang.com

"์ด ํฌ์ŠคํŒ…์€ ์ฟ ํŒก ํŒŒํŠธ๋„ˆ์Šค ํ™œ๋™์˜ ์ผํ™˜์œผ๋กœ, ์ด์— ๋”ฐ๋ฅธ ์ผ์ •์•ก์˜ ์ˆ˜์ˆ˜๋ฃŒ๋ฅผ ์ œ๊ณต๋ฐ›์Šต๋‹ˆ๋‹ค."

 

 




๐Ÿ—‚ ๋ชฉ์ฐจ

1. [Hyper-V] [Open Stack] Open Stack์ด๋ž€?
2. [Hyper-V] [Open Stack] [Controller Node] Hyper-V ๊ตฌ์„ฑ ๋ฐ Ubuntu 22.04.3 LTS Server ์„ค์น˜
3. [Hyper-V] [Open Stack] [Controller Node] โ‘  ์˜คํ”ˆ์Šคํƒ ํŒจํ‚ค์ง€ ์„ค์น˜
4. [Hyper-V] [Open Stack] [Controller Node] โ‘ก NTP Server ๊ตฌ์„ฑ
5. [Hyper-V] [Open Stack] [Controller Node] โ‘ข RabbitMQ - Message Queue ์„ค์น˜ ๋ฐ ๊ตฌ์„ฑ
6. [Hyper-V] [Open Stack] [Controller Node] โ‘ฃ Memcached ์„ค์น˜ ๋ฐ ๊ตฌ์„ฑ
7. [Hyper-V] [Open Stack] [Controller Node] โ‘ค Etcd ์„ค์น˜ ๋ฐ ๊ตฌ์„ฑ
8. [Hyper-V] [Open Stack] [Controller Node] โ‘ฅ Keystone - Identity ์„ค์น˜ ๋ฐ ๊ตฌ์„ฑ
9. [Hyper-V] [Open Stack] [Controller Node] โ‘ฆ Image Service - Glance ์„ค์น˜ ๋ฐ ๊ตฌ์„ฑ  
10. [Hyper-V] [Open Stack] [Controller Node] โ‘ง Compute Service - Nova ์„ค์น˜ ๋ฐ ๊ตฌ์„ฑ
11. [Hyper-V] [Open Stack] [Contoller Node] โ‘จ Neutron - Network ์„œ๋น„์Šค ์„ค์น˜ ๋ฐ ๊ตฌ์„ฑ
12. [Hyper-V] [Open Stack] [Controller Node] โ‘ โ“ช Horizon - Dashboard ์„œ๋น„์Šค ์„ค์น˜ ๋ฐ ๊ตฌ์„ฑ

11. [Hyper-V] [Open Stack] [Compute Node] ์ค€๋น„์ค‘

 

 

 

 

๐Ÿš€ Controller Node ๊ตฌ์„ฑ

    ๐Ÿ”ฝ ๊ฐœ์š”

์ฃผ๋‹ˆ์˜ ์˜คํ”ˆ์Šคํƒ ๊ตฌ์„ฑ๋„

 

        ๐Ÿ“ฆ ์†Œ๊ฐœ

์ด๋ฒˆ์—๋Š” ์ธ์ฆ, ์Šน์ธ, ์„œ๋น„์Šค์— ๋Œ€ํ•œ ์นดํƒˆ๋กœ๊ทธ ๊ด€๋ฆฌ๋ฅผ ์œ„ํ•œ Identity ์„œ๋น„์Šค ์„ค์น˜ ๋ฐ ๊ตฌ์„ฑ์„ ์ง„ํ–‰ํ•ด ๋ณผ๊ฑฐ์—์š”.

์˜คํ”ˆ์Šคํƒ์˜ Identiry ์„œ๋น„์Šค๋Š” ์ธ์ฆ, ์Šน์ธ, ์„œ๋น„์Šค์— ๋Œ€ํ•œ ์นดํƒˆ๋กœ๊ทธ ๊ด€๋ฆฌ๋ฅผ ์œ„ํ•œ ๋‹จ์ผ ํ†ตํ•ฉ ์ง€์ ์„ ์ œ๊ณตํ•˜๊ณ  ์žˆ๋‹ค๊ณ  ํ•ด์š”.

Identity ์„œ๋น„์Šค๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ์ƒํ˜ธ ์ž‘์šฉํ•˜๋Š” ์ฒซ๋ฒˆ์งธ ์„œ๋น„์Šค์—์š”.
ํ•œ ๋ฒˆ ์ธ์ฆ์ด ์ด๋ฃจ์–ด์ง€๋ฉด ์ตœ์ข… ์‚ฌ์šฉ์ž๋Š” ์ž์‹ ์˜ ์‹ ์›์„ ์‚ฌ์šฉํ•˜์—ฌ ๋‹ค๋ฅธ ์˜คํ”ˆ์Šคํƒ ์„œ๋น„์Šค์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์–ด์š”.
๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ๋‹ค๋ฅธ ์˜คํ”ˆ์Šคํƒ ์„œ๋น„์Šค๋Š” Identity ์„œ๋น„์Šค๋ฅผ ํ™œ์šฉํ•˜์—ฌ ์‚ฌ์šฉ์ž๊ฐ€ ์ž์‹ ์ด ์ ‘์† ํ—ˆ์šฉํ•˜๋Š” ์‚ฌ์šฉ์ž์ž„์„ ํ™•์ธํ•˜๊ณ , ํ™˜๊ฒฝ ๋‚ด ๋‹ค๋ฅธ ์„œ๋น„์Šค์˜ ์œ„์น˜๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.
Identity ์„œ๋น„์Šค๋Š” ์ผ๋ถ€ ์™ธ๋ถ€ ์‚ฌ์šฉ์ž ๊ด€๋ฆฌ ์‹œ์Šคํ…œ (์˜ˆ: LDAP)๊ณผ ํ†ตํ•ฉํ•  ์ˆ˜๋„ ์žˆ๋‹ค๊ณ  ํ•ด์š”.

์‚ฌ์šฉ์ž ๋ฐ ์„œ๋น„์Šค๋Š” Identity ์„œ๋น„์Šค์—์„œ ๊ด€๋ฆฌํ•˜๋Š” ์„œ๋น„์Šค ์นดํƒˆ๋กœ๊ทธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋‹ค๋ฅธ ์„œ๋น„์Šค๋ฅผ ์ฐพ์„ ์ˆ˜๋„ ์žˆ๋‹ค๊ณ  ํ•ด์š”.
์ด๋ฆ„์—์„œ ๋ณด์ด๋“ฏ ์„œ๋น„์Šค ์นดํƒˆ๋กœ๊ทธ๋Š” ์˜คํ”ˆ์Šคํƒ ํ™˜๊ฒฝ์—์„œ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์„œ๋น„์Šค ๋ชจ์Œ์ด์—์š”.

๊ฐ ์„œ๋น„์Šค๋Š” ํ•˜๋‚˜ ์ด์ƒ์˜ endpoint๋ฅผ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๊ณ , ๊ฐ endpoint๋Š” admin, internal ๋˜๋Š” public ์„ธ ๊ฐ€์ง€ ์œ ํ˜• ์ค‘ ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•  ์ˆ˜ ์žˆ์–ด์š”. ํ”„๋กœ๋•์…˜ ํ™˜๊ฒฝ์—์„œ ์„œ๋กœ ๋‹ค๋ฅธ endpoint ์œ ํ˜•์ด ๋ณด์•ˆ์ƒ์˜ ์ด์œ ๋กœ ๋‹ค๋ฅธ ์œ ํ˜•์˜ ์‚ฌ์šฉ์ž์—๊ฒŒ ๋…ธ์ถœ๋œ ๋ณ„๋„์˜ ๋„คํŠธ์›Œํฌ์— ์กด์žฌํ•  ์ˆ˜๋„ ์žˆ์–ด์š”. ์˜ˆ๋ฅผ ๋“ค์–ด public API ๋„คํŠธ์›Œํฌ๋Š” ์ธํ„ฐ๋„ท์—์„œ ๋ณผ ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์‚ฌ์šฉ์ž๊ฐ€ ํด๋ผ์šฐ๋“œ๋ฅผ ๊ด€๋ฆฌ ํ•  ์ˆ˜ ์žˆ๊ณ , admin API ๋„คํŠธ์›Œํฌ๋Š” ํด๋ผ์šฐ๋“œ ์ธํ”„๋ผ๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ์กฐ์ง ๋‚ด์˜ ์šด์˜์ž๋กœ ์ œํ•œํ•  ์ˆ˜ ์žˆ์–ด์š”.
internal API ๋„คํŠธ์›Œํฌ๋Š” ์˜คํ”ˆ์Šคํƒ ์„œ๋น„์Šค๊ฐ€ ์žˆ๋Š” ํ˜ธ์ŠคํŠธ๋กœ ์ œํ•œํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ํ•ด์š”.

๋˜ํ•œ, ์˜คํ”ˆ์Šคํƒ์€ ํ™•์žฅ์„ฑ์„ ์œ„ํ•ด ์—ฌ๋Ÿฌ region์„ ์ง€์›ํ•˜๊ณ  ์žˆ์–ด์š”.
์ฃผ๋‹ˆ๋Š” ํ˜„์žฌ ํ•˜๋‚˜์˜ ๋ฌผ๋ฆฌ ์„œ๋ฒ„๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— endpoint ์œ ํ˜• ๋ฐ ๊ธฐ๋ณธ RegionOne region์— ๋Œ€ํ•œ ๊ด€๋ฆฌ ๋„คํŠธ์›Œํฌ๋กœ ๊ตฌ์„ฑํ•ด ๋ณด๋ ค๊ณ  ํ•ด์š”. Identity ์„œ๋น„์Šค์—์„œ ์ž‘์„ฑ๋œ region, ์„œ๋น„์Šค ๋ฐ endpoint๋ฅผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜์—ฌ ๋ฐฐํฌ๋ฅผ ์œ„ํ•œ ์„œ๋น„์Šค ์นดํƒˆ๋กœ๊ทธ๋ฅผ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ์–ด์š”.

๋ฐฐํฌ์˜ ๊ฐ ์˜คํ”ˆ์Šคํƒ ์„œ๋น„์Šค์—๋Š” Identity ์„œ๋น„์Šค์— ์ €์žฅ๋œ endpoint์— ๋Œ€ํ•œ ์„œ๋น„์Šค ์ง€์ ์ด ํ•„์š”ํ•ด์š”.
์ด ์ž‘์—…์€ ๋ชจ๋‘ Ideintity ์„œ๋น„์Šค ์„ค์น˜ ๋ฐ ๊ตฌ์„ฑํ•œ ๋‹ค์Œ ์ž‘์—…ํ•  ์ˆ˜ ์žˆ์–ด์š”.

Identity๋Š” ๋‹ค์Œ ๊ตฌ์„ฑ ์š”์†Œ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์š”.

๊ตฌ์„ฑ ์š”์†Œ ์ƒ์„ธ ๋‚ด์šฉ
Server(์„œ๋ฒ„) ์ค‘์•™ ์ง‘์ค‘๋œ ์„œ๋ฒ„๋Š” RESTful ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์ด์šฉํ•˜์—ฌ ์ธ์ฆ๊ณผ ๊ถŒํ•œ ๋ถ€์—ฌ ์„œ๋น„์Šค ์ œ๊ณต.
Driver(๋“œ๋ผ์ด๋ฒ„) ๋“œ๋ผ์ด๋ฒ„๋‚˜ ์„œ๋น„์Šค ๋ฐฑ์—”๋“œ๋Š” ์ค‘์•™ ์ง‘์ค‘๋œ ์„œ๋ฒ„์— ํ†ตํ•ฉ๋จ.
์˜คํ”ˆ์Šคํƒ ์™ธ๋ถ€ ์ €์žฅ์†Œ์—์„œ Ientity ์ •๋ณด๋ฅผ ์ ‘๊ทผํ•˜๋Š”๋ฐ ์‚ฌ์šฉ๋˜๋ฉฐ, ์˜คํ”ˆ์Šคํƒ ๋ฐฐํฌ ์‹œ
(์˜ˆ: SQL DBMS, LDAP ์„œ๋ฒ„) ์ธํ”„๋ผ์— ๋จผ์ € ์„ค์น˜ํ•  ์ˆ˜ ์žˆ์Œ.
Module(๋ชจ๋“ˆ) ๋ฏธ๋“ค์›จ์–ด ๋ชจ๋“ˆ์€ Ientity ์„œ๋น„์Šค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์˜คํ”ˆ์Šคํƒ ๊ตฌ์„ฑ ์š”์†Œ์— ๋Œ€ํ•œ ์ฃผ์†Œ ๊ณต๊ฐ„์—์„œ ์‹คํ–‰.
์ด๋Ÿฌํ•œ ๋ชจ๋“ˆ์€ ์„œ๋น„์Šค ์š”์ฒญ์„ ๊ฐ€๋กœ์ฑˆ ๋’ค ์‚ฌ์šฉ์ž ์ธ์ฆ์„ ์–ป์–ด๋‚ด์–ด ๊ถŒํ•œ ๋ถ€์—ฌ์— ๋Œ€ํ•œ ์ค‘์•™ ์ง‘์ค‘๋œ ์„œ๋ฒ„์— ์ „์†ก.
๊ธฐ์กด ๋ฏธ๋“ค์›จ์–ด ๋ชจ๋“ˆ๊ณผ ์˜คํ”ˆ์Šคํƒ ๊ตฌ์„ฑ ์š”์†Œ๊ฐ„ ํ†ตํ•ฉ์„ ํŒŒ์ด์ฌ ์›น์œผ๋กœ ๊ตฌ์„ฑ๋œ ์„œ๋ฒ„ ๊ฒŒ์ดํŠธ์›จ์ด ์ธํ„ฐํŽ˜์ด์Šค ์‚ฌ์šฉ.

 

Identity๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” keystone์ด๋ผ๋Š” ํ”„๋กœ์ ํŠธ ์ด๋ฆ„์„ ๊ฐ€์ง„ ์˜คํ”ˆ์Šคํƒ Ientity ์„œ๋น„์Šค๋ฅผ ์ปจํŠธ๋กค๋Ÿฌ ๋…ธ๋“œ์— ์„ค์น˜ํ•˜๊ณ , ๊ตฌ์„ฑํ•ด ์ฃผ์–ด์•ผ ํ•ด์š”. ํ™•์žฅ์„ฑ ๋ชฉ์ ์„ ์œ„ํ•ด ํ•ด๋‹น ๊ตฌ์„ฑ์—์„œ ์š”์ฒญ์„ ๋‹ค๋ฃจ๊ธฐ ์œ„ํ•œ Fernet ํ† ํฐ ๋ฐ Apache HTTP ์„œ๋ฒ„๋ฅผ ๋ฐฐํฌํ•  ๊ฑฐ์—์š”.

 

 

 

    ๐Ÿ”ฝ ๊ตฌ์„ฑ ์š”์†Œ ์„ค์น˜ ๋ฐ ๊ตฌ์„ฑ

       ๐Ÿ“ฆ ๊ตฌ์„ฑ ์š”์†Œ ์„ค์น˜ ๋ฐ ๊ตฌ์„ฑ

์ตœ์ดˆ ์œ„ ์ž‘์—…์„ ํ•˜๊ธฐ ์ „ ์ด์ „์— ๋งŒ๋“ค์–ด ๋‘” Maria DBMS์— Data Base๋ฅผ ๋งŒ๋“ค์–ด ์ค˜์•ผ ํ•ด์š”.

 

# === keystone ===
# Identity ์„œ๋น„์Šค ์ด์šฉ์„ ์œ„ํ•œ keystone DB ์ƒ์„ฑ
use mysql;

CREATE DATABASE keystone;

# Keystone ๊ณ„์ • ๋ฐ ๊ถŒํ•œ ๋ถ€์—ฌ
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'192.168.0.%' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'192.168.10.%' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'192.168.20.%' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'192.168.40.%' IDENTIFIED BY 'PASSWORD';

flush privileges;



์œ„์™€ ๊ฐ™์ด keystone์ด๋ผ๋Š” DB๋ฅผ ๋งŒ๋“ค๊ณ , ๊ณ„์ •์„ ์ƒ์„ฑํ•˜๊ณ , ๊ถŒํ•œ์„ ๋ถ€์—ฌํ•ด ์ฃผ์—ˆ์–ด์š”.



๋‹ค์‹œ ์ปจํŠธ๋กค๋Ÿฌ ๋…ธ๋“œ๋กœ ๋Œ์•„์™€ ์„ค์น˜์™€ ๊ตฌ์„ฑ์„ ์ง„ํ–‰ํ•ด ๋ณผ๊ฒŒ์š”.

apt install -y keystone python3-openstackclient apache2 libapache2-mod-wsgi-py3 python3-oauth2client


์œ„์™€ ๊ฐ™์ด ํ•„์š” ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•ด ์ฃผ์—ˆ์–ด์š”.


vim /etc/keystone/keystone.conf 443๋ฒˆ์งธ ์ค„

 

memcache_servers = {Controller IP}:11211



vim /etc/keystone/keystone.conf 661๋ฒˆ์งธ ์ค„

 

[database]
connection = mysql+pymysql://keystone:password@{database IP}/keystone



์œ„์™€ ๊ฐ™์ด ๋ณ€๊ฒฝ์„ ํ•ด ์ฃผ๋Š”๋ฐ, PASSWORD์—๋Š” DB ๊ณ„์ • ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ๋„ฃ์–ด์ฃผ์–ด์•ผ ํ•ด์š”.

vim /etc/keystone/keystone.conf 2639๋ฒˆ์งธ ์ค„

 

provider = fernet


์—ฌ๊ธฐ๊นŒ์ง€ ์™„๋ฃŒ ๋˜์—ˆ๋‹ค๋ฉด ์ €์žฅํ•˜๊ณ , ๋‚˜์˜ต๋‹ˆ๋‹ค.

su -s /bin/sh -c "keystone-manage db_sync" keystone

๋ฐ˜์‘ํ˜•


์œ„ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด Identity ์„œ๋น„์Šค์— ๋Œ€ํ•œ Data Base์— Data๋ฅผ ๋„ฃ์–ด์ค๋‹ˆ๋‹ค.

 


์œ„์™€ ๊ฐ™์ด Table์ด ์ƒ์„ฑ๋œ ๊ฑธ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.

 

Fernet Key ์ €์žฅ์†Œ ์ดˆ๊ธฐํ™”

 

# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
# keystone-manage credential_setup --keystone-user keystone --keystone-group keystone
728x90

์œ„ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด Fernet Key ์ €์žฅ์†Œ๋ฅผ ์ดˆ๊ธฐํ™” ํ•ด์ฃผ์–ด์•ผ ํ•ด์š”.


export controller={Controller Node Domain Name}


์œ„์™€ ๊ฐ™์ด ์ฃผ๋‹ˆ๋Š” hosts File์— ๋„๋ฉ”์ธ ์ด๋ฆ„์„ ์ •์˜ํ•˜๊ณ , ํ‚ค์Šคํ†ค API Host ์ •์˜๋ฅผ ์œ„ํ•ด controller๋ผ๋Š” ๋ณ€์ˆ˜์— ๊ฐ’์„ ๋„ฃ์–ด์ฃผ์—ˆ์–ด์š”.

vim bootstrap-keyston (Identity ์„œ๋น„์Šค ๋ถ€ํŠธ์ŠคํŠธ๋ž˜ํ•‘)


์œ„์—์„œ adminpassword ๋ถ€๋ถ„์€ ๊ด€๋ฆฌ ๊ถŒํ•œ์ด ์žˆ๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ์‚ฌ์šฉํ•  ์ ์ ˆํ•œ ์•”ํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด ์ฃผ์–ด์•ผ ํ•ด์š”.


chmod +x bootstrap-keyston; ./bootstrap-keyston


์ €์žฅํ•˜๊ณ , ๋‚˜์˜จ ๋’ค ํ•ด๋‹น ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‹คํ–‰ํ•ด ์ค๋‹ˆ๋‹ค.

 

vim /etc/apache2/apache2.conf 70๋ฒˆ์งธ ์ค„ ์ถ”๊ฐ€


์œ„ ํŒŒ์ผ์„ Editor๋ฅผ ์ด์šฉํ•˜์—ฌ ServerName Option(์˜ต์…˜)์ด ์ปจํŠธ๋กค๋Ÿฌ ๋…ธ๋“œ๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋„๋ก ์ง€์ •ํ•ด ์ค๋‹ˆ๋‹ค.


service apache2 restart


์•„ํŒŒ์น˜ ์„œ๋น„์Šค๋ฅผ ์žฌ ๊ธฐ๋™ํ•˜๊ณ , ๊ธฐ์กด์— ๋งŒ๋“ค์–ด์กŒ๋˜ SQLite Data Base๋ฅผ ์ œ๊ฑฐํ•˜์—ฌ ์ฃผ์—ˆ์–ด์š”.

 

 

 

       ๐Ÿ“ฆ Keystone Project ๋งŒ๋“ค๊ธฐ

vim ~/keystonerc

export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=adminpassword
export OS_AUTH_URL=http://junyss-os-controller:5000/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
export PS1='\u@\h \W(keystone)\$ '

ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ๋จผ์ € ๋กœ๋“œํ•ด ์ค„ ๊ฑฐ์—์š”.
keystone ๋ถ€ํŠธ์ŠคํŠธ๋žฉ์„ ๊ตฌ์„ฑํ•  ๋•Œ [OS_PASWORD] ๊ฐ’์€ ์•”ํ˜ธ์—์„œ ๋‚˜์˜ฌ ๊ฑฐ์—์š”.
[OS_AUTH_URL]์˜ ๊ฒฝ์šฐ ํ‚ค์Šคํ†ค ์„œ๋ฒ„์˜ ํ˜ธ์ŠคํŠธ ์ด๋ฆ„ ๋˜๋Š” IP ์ฃผ์†Œ๋ฅผ ์ง€์ •ํ•ด ์ฃผ์—ˆ์–ด์š”.

๊ทธ๋ฆฌ๊ณ , ์œ„์™€ ๊ฐ™์ด ๊ด€๋ฆฌ ๊ณ„์ •์„ ๊ตฌ์„ฑํ•ด ์ค๋‹ˆ๋‹ค.

์—ฌ๊ธฐ๊นŒ์ง€ ๋˜์—ˆ๋‹ค๋ฉด ์ €์žฅํ•˜๊ณ , ๋‚˜์™€์ค๋‹ˆ๋‹ค.


chmod 600 ~/keystonerc; source ~/keystonerc; echo "source ~/keystonerc " >> ~/.bashrc


์œ„์™€ ๊ฐ™์ด ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ํŒŒ์ผ์— ๋Œ€ํ•œ ๊ถŒํ•œ์„ ์ฃผ๊ณ , ๋“ฑ๋กํ•ด ์ฃผ์—ˆ์–ด์š”.


์ฐธ๊ณ ๋กœ OS_PASSWORD์—๋Š” Keystone-install-configure ์•ˆ์— 
keystone-manage bootstrap ๋ช…๋ น์–ด์—์„œ ์‚ฌ์šฉ๋˜๋Š” ์•”ํ˜ธ๋กœ ๋ณ€๊ฒฝํ•ด์ฃผ์–ด์•ผ ํ•ด์š”.

 

์ด๋ฒˆ์—๋Š” ๋„๋ฉ”์ธ, ํ”„๋กœ์ ํŠธ, ์‚ฌ์šฉ์ž, ์—ญํ•  ์ƒ์„ฑ ์ž‘์—…์„ ํ•ด๋ณผ๊ฒŒ์š”.

Identity ์„œ๋น„์Šค๋Š” ๊ฐ ์˜คํ”ˆ์Šคํƒ ์„œ๋น„์Šค๋ฅผ ์œ„ํ•œ ์ธ์ฆ ์„œ๋น„์Šค๋ฅผ ์ œ๊ณตํ•˜๊ณ  ์žˆ์–ด์š”. ์ธ์ฆ ์„œ๋น„์Šค๋Š” domains, projects, users, roles๋ฅผ ๊ฒฐํ•ฉํ•˜์—ฌ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋‹ต๋‹ˆ๋‹ค.


openstack project create --domain default --description "Service Project" service

์ตœ์ดˆ ๊ฐ ์„œ๋น„์Šค์— ๋Œ€ํ•œ ๊ณ ์œ  ์‚ฌ์šฉ์ž๋ฅผ ํฌํ•จํ•˜๋Š” ์„œ๋น„์Šค ํ”„๋กœ์ ํŠธ๋ฅผ ๋งŒ๋“ค์–ด ์ค„๊ฑฐ์—์š”.
service ํ”„๋กœ์ ํŠธ๋ฅผ ์œ„์™€ ๊ฐ™์ด ๋งŒ๋“ค์–ด ์ค๋‹ˆ๋‹ค.

๋งŒ์•ฝ ์ž˜๋ชป ๋งŒ๋“ค์–ด์ฃผ์—ˆ๋‹ค๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ์‚ญ์ œํ•  ์ˆ˜ ์žˆ์–ด์š”.

openstack project delete {Project Name ํ˜น์€ ID}



openstack project list


์œ„ ๋ช…๋ น์–ด๋กœ ํ”„๋กœ์ ํŠธ ๋ชฉ๋ก์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”.



 

 

       ๐Ÿ“ฆ Open Stack Client ํ™˜๊ฒฝ Script ์ƒ์„ฑ

์œ„์—์„œ ์ฃผ๋‹ˆ๋Š” openstack Client(ํด๋ผ์ด์–ธํŠธ)๋ฅผ ์ด์šฉํ•˜์—ฌ Identity ์„œ๋น„์Šค์™€์˜ ์ƒํ˜ธ ์ž‘์šฉ์„ ์œ„ํ•œ ํ™˜๊ฒฝ ๋ณ€์ˆ˜์™€ ๋ช…๋ น์–ด ์˜ต์…˜์„ ๊ฒฐํ•ฉํ•˜์—ฌ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ๊ฒŒ ๋˜์—ˆ์–ด์š”.

ํด๋ผ์ด์–ธํŠธ ๋™์ž‘์— ๋Œ€ํ•œ ํšจ์œจ์„ฑ ์ฆ๋Œ€๋ฅผ ์œ„ํ•ด ์˜คํ”ˆ ์Šคํƒ์€ OpenRC ํŒŒ์ผ์„ ์ด์šฉํ•˜์—ฌ ๋‹จ์ˆœ ํด๋ผ์ด์–ธํŠธ ํ™˜๊ฒฝ Script(์Šคํฌ๋ฆฝํŠธ)๋ฅผ ์ง€์›ํ•œ๋‹ค๊ณ  ํ•ด์š”.
ํ•ด๋‹น ์Šคํฌ๋ฆฝํŠธ๋Š” ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ์— ๋Œ€ํ•œ ๊ณตํ†ต ์˜ต์…˜์„ ํฌํ•จํ•˜๊ณ , ํŠน์ • ์˜ต์…˜๋„ ์ง€์ •ํ•ด ์ค„ ์ˆ˜ ์žˆ์–ด์š”.

 

์ตœ์ดˆ admin๊ณผ demo Project(ํ”„๋กœ์ ํŠธ)์™€ ์‚ฌ์šฉ์ž์— ๋Œ€ํ•œ ํด๋ผ์ด์–ธํŠธ ํ™˜๊ฒฝ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ๋งŒ๋“ค์–ด ๋ณด๋ ค๊ณ  ํ•ด์š”.
์ด ์Šคํฌ๋ฆฝํŠธ๋ฅผ ํด๋ผ์ด์–ธํŠธ ์ž‘์—…์— ๋Œ€ํ•ด ์ ์ ˆํ•œ credential๋กœ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์žˆ๋‹ต๋‹ˆ๋‹ค.

์ฐธ๊ณ ๋กœ ํ•ด๋‹น ์Šคํฌ๋ฆฝํŠธ ์œ„์น˜๋Š” ์–ด๋””์— ๋‘์–ด๋„ ์ƒ๊ด€์—†์–ด์š”.
์ฃผ๋‹ˆ๋Š” root home Directory์— ๋†“๋„๋ก ํ• ๊ฑฐ์—์š”.

๋งŒ์•ฝ ์ข€ ๋” ํŽธ๋ฆฌํ•œ ๋ฐฉ๋ฒ•์œผ๋กœ ์ง„ํ–‰ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด cluds.yaml๊ณผ ๊ฐ™์€ yaml ํ˜•์‹์„ ์ง€์›ํ•˜๋Š” os-client-config๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์–ด์š”.

์ฃผ๋‹ˆ๋Š” yaml์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ๋ฐฉ๋ฒ•์œผ๋กœ ์ง„ํ–‰ํ•ด ๋ณผ๊ฒŒ์š”.

admin์— ๊ด€๋ จํ•œ ๋‚ด์šฉ์€ ์œ„์—์„œ ๊ธฐ์ˆ ํ–ˆ์œผ๋‹ˆ demo์— ๋Œ€ํ•œ ๋‚ด์šฉ๋งŒ ๊ธฐ์ˆ ํ•ด ๋ณผ๊ฒŒ์š”.


vim /root/keystone/management/demo-openrc


OS_PASSWORD์—๋Š” demo๋ฅผ ์ด์šฉํ•  ๊ณ„์ •์˜ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ ์–ด์ฃผ๋ฉด ๋ผ์š”.


openstack --os-auth-url http://{controller IP}:5000/v3 --os-project-domain-name default --os-user-domain-name default --os-project-name demo --os-username demo token issue


์ด๋ ‡๊ฒŒ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ด์šฉํ•˜์—ฌ ํŠน์ • ํ”„๋กœ์ ํŠธ ๋ฐ ์‚ฌ์šฉ์ž๋กœ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•ด์„œ ์‹คํ–‰ ์ „ ๊ด€๋ จ ํด๋ผ์ด์–ธํŠธ ํ™˜๊ฒฝ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ค€๋น„ํ•ด ๋‘˜ ์ˆ˜ ์žˆ์–ด์š”.

์œ„์™€ ๊ฐ™์ด demo-openrc ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‹คํ–‰ํ•˜์—ฌ Ientity ์„œ๋น„์Šค์— ๋Œ€ํ•œ ์œ„์น˜์™€ demo ํ”„๋กœ์ ํŠธ ๋ฐ ์‚ฌ์šฉ์ž credential์„ ํ•จ๊ป˜ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋กœ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ์–ด์š”.

 

 

       ๐Ÿ“ฆ ์ž˜ ์„ค์น˜ ๋˜์—ˆ๋‚˜? ๐Ÿค”

 

openstack --os-auth-url http://$controller:5000/v3 --os-project-domain-name default --os-user-domain-name default --os-project-name admin --os-username admin token issue

 

์ตœ์ดˆ unset ๋ช…๋ น์–ด๋กœ ์ „์—ญ ๋ณ€์ˆ˜๋กœ ๋“ฑ๋ก๋œ OS_AUTH_URL๊ณผ OS_PASSWORD๋ฅผ ๋ฉ”๋ชจ๋ฆฌ์—์„œ ์ œ๊ฑฐํ•ด ์ค€ ๋’ค ์œ„ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ๊ด€๋ฆฌ์ž ๊ณ„์ •์œผ๋กœ ํ† ํฐ์„ ์š”์ฒญํ•ด ๋ณด์•˜์–ด์š”.

Password๋Š” ๊ด€๋ฆฌ์ž ๊ณ„์ •์˜ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด ์ฃผ๋ฉด ๋œ๋‹ต๋‹ˆ๋‹ค.

 

 

 

 

 

Openstack Essentials Second Edition Paperback

COUPANG

www.coupang.com

"์ด ํฌ์ŠคํŒ…์€ ์ฟ ํŒก ํŒŒํŠธ๋„ˆ์Šค ํ™œ๋™์˜ ์ผํ™˜์œผ๋กœ, ์ด์— ๋”ฐ๋ฅธ ์ผ์ •์•ก์˜ ์ˆ˜์ˆ˜๋ฃŒ๋ฅผ ์ œ๊ณต๋ฐ›์Šต๋‹ˆ๋‹ค."

 

 

๐Ÿง ์ฐธ๊ณ  ์ž๋ฃŒ

 

OpenStack Docs: Identity ์„œ๋น„์Šค

 

docs.openstack.org

 

Ubuntu 22.04 LTS : OpenStack Zed : Configure Keystone #1 : Server World

root@dlp:~# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 31 Server version: 10.6.7-MariaDB-2ubuntu1.1 Ubuntu 22.04 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' f

www.server-world.info

 

 

 

 

 

728x90
๋ฐ˜์‘ํ˜•