Orchestration service서비스는 인스턴스를 생성시 인스턴스에 대한 설정치를 일일히 입력하지 않고
자동화 시키는 서비스이며 코드명은 heat이다.
설치는 컨트롤러 노드에 하며 역시나 DB 부터 생성한다.
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 26
Server version: 5.5.44-MariaDB MariaDB Server
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> CREATE DATABASE heat;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' \
IDENTIFIED BY 'HEAT_DBPASS';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'controller'\
IDENTIFIED BY 'HEAT_DBPASS';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' \
IDENTIFIED BY 'HEAT_DBPASS';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> quit
Bye
heat 유저를 생성하고 admin 롤을 부여한다.
User Password:
Repeat User Password:
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | 970d758f242944be9eb34477786acfc5 |
| name | heat |
+-----------+----------------------------------+
[root@controller ~]# openstack role add --project service --user heat admin
heat와 heat-cfn에 대한 서비스를 만든다.
--description "Orchestration" orchestration
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Orchestration |
| enabled | True |
| id | 7b3ac90bc9524fab9367dff629b2522b |
| name | heat |
| type | orchestration |
+-------------+----------------------------------+
[root@controller ~]# openstack service create --name heat-cfn \
--description "Orchestration" cloudformation
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Orchestration |
| enabled | True |
| id | eab5fc4507644a37a0b79b6bce433470 |
| name | heat-cfn |
| type | cloudformation |
+-------------+----------------------------------+
2개의 서비스에 대해 각각 인터널, 퍼블릭, admin 접근 API 엔드포인트를 만든다.
+--------------+-----------------------------------------+
| Field | Value |
+--------------+-----------------------------------------+
| enabled | True |
| id | bf13be32e29246dd9c5299f4ee4352e9 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 7b3ac90bc9524fab9367dff629b2522b |
| service_name | heat |
| service_type | orchestration |
| url | http://controller:8004/v1/%(tenant_id)s |
+--------------+-----------------------------------------+
[root@controller ~]# openstack endpoint create --region RegionOne orchestration internal http://controller:8004/v1/%\(tenant_id\)s
+--------------+-----------------------------------------+
| Field | Value |
+--------------+-----------------------------------------+
| enabled | True |
| id | 14b6480a837647779df5e4d5235e8b11 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 7b3ac90bc9524fab9367dff629b2522b |
| service_name | heat |
| service_type | orchestration |
| url | http://controller:8004/v1/%(tenant_id)s |
+--------------+-----------------------------------------+
[root@controller ~]# openstack endpoint create --region RegionOne orchestration admin http://controller:8004/v1/%\(tenant_id\)s
+--------------+-----------------------------------------+
| Field | Value |
+--------------+-----------------------------------------+
| enabled | True |
| id | 76518471bb614f71874b11dd275a719e |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 7b3ac90bc9524fab9367dff629b2522b |
| service_name | heat |
| service_type | orchestration |
| url | http://controller:8004/v1/%(tenant_id)s |
+--------------+-----------------------------------------+
[root@controller ~]#
[root@controller ~]#
[root@controller ~]# openstack endpoint create --region RegionOne cloudformation public http://controller:8000/v1
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | eaee96fd7fb34e9d919849f8cee3db49 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | eab5fc4507644a37a0b79b6bce433470 |
| service_name | heat-cfn |
| service_type | cloudformation |
| url | http://controller:8000/v1 |
+--------------+----------------------------------+
[root@controller ~]# openstack endpoint create --region RegionOne cloudformation internal http://controller:8000/v1
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | a40350b0229f4680b259bd711813c9ef |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | eab5fc4507644a37a0b79b6bce433470 |
| service_name | heat-cfn |
| service_type | cloudformation |
| url | http://controller:8000/v1 |
+--------------+----------------------------------+
[root@controller ~]# openstack endpoint create --region RegionOne cloudformation admin http://controller:8000/v1
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 72fdae5aec2f464f858ac1cff94fc146 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | eab5fc4507644a37a0b79b6bce433470 |
| service_name | heat-cfn |
| service_type | cloudformation |
| url | http://controller:8000/v1 |
+--------------+----------------------------------+
오케스트레이션 서비스는 스택관리를 위해 추가로 작업해줄 것이 있다.
일단 heat라는 별도의 도메인을 만든다.
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Stack projects and users |
| enabled | True |
| id | df7ac09d39e54d6198acd3fd213ea43d |
| name | heat |
+-------------+----------------------------------+
heat_domain_admin 라는 heat 도메인의 관리자를 만들고 admin 롤을 부여한다.
User Password:
Repeat User Password:
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | df7ac09d39e54d6198acd3fd213ea43d |
| enabled | True |
| id | e656c268bea8414a9c76574762c6ffa0 |
| name | heat_domain_admin |
+-----------+----------------------------------+
[root@controller ~]# openstack role add --domain heat --user heat_domain_admin admin
heat_stack_owner 롤을 만들고 기존에 사용하던 demo계정에 heat_stack_owner 롤을 부여한다
+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | f09abe94c4b64b20bd49ff9b45a61cf5 |
| name | heat_stack_owner |
+-------+----------------------------------+
[root@controller ~]# openstack role add --project demo --user demo heat_stack_owner
heat_stack_user 롤을 만든다. 오케스트레이션 서비스는 자동으로 스택 배포 하는 동안 만들어지는 사용자에 게 heat_stack_user 역할을 할당 한다.
이 롤은 기본적으로이 API 작업이 제한되어 있고 충돌을 피하기 위해, heat_stack_owner 롤을 가진 사용자에게 이 롤을 추가 하지 않아야 한다.
+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | 84768c6edb9c4689b0314f5f7785ff0e |
| name | heat_stack_user |
+-------+----------------------------------+
이제 패키지를 설치한다.
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
* updates: www.ftp.ne.jp
Package python-heatclient-0.8.0-1.el7.noarch already installed and latest version
Resolving Dependencies
--> Running transaction check
...(중략)...
Dependency Installed:
openstack-heat-common.noarch 1:5.0.0-1.el7
python-oslo-cache.noarch 0:0.7.0-1.el7
Complete!
[root@controller ~]#
/etc/heat/heat.conf 파일을 열어 아래와 같이 수정한다.
[database] 섹션에서 DB 접근설정을 한다. HEAT_DBPASS는 설정한 패스워드로 변경
[DEFAULT] 과 [oslo_messaging_rabbit] 섹션에서 RabbitMQ 설정을 한다. RABBIT_PASS는 설정한 패스워드로 변경
[keystone_authtoken], [trustee], [clients_keystone], [ec2authtoken] 섹션에서, 인증서비스 접근 설정을 한다. RABBIT_PASS는 설정한 패스워드로 변경
[DEFAULT] 섹션에서 metadata 와 wait condition URLs 설정을 한다.
[DEFAULT] 섹션에서 스택도메인과 관리자격증명 설정을 한다. HEAT_DOMAIN_PASS는 heat_domain_admin 유저의 패스워드로 변경
(옵션)[DEFAULT] 섹션에서 트러블슈팅시 도움이 될수 있게 verbose를 활성화한다.
[database]
...
connection = mysql://heat:HEAT_DBPASS@controller/heat
...
rpc_backend = rabbit
...
heat_metadata_server_url = http://controller:8000
heat_waitcondition_server_url = http://controller:8000/v1/waitcondition
...
stack_domain_admin = heat_domain_admin
stack_domain_admin_password = HEAT_DOMAIN_PASS
stack_user_domain_name = heat
...
verbose = True
...
[oslo_messaging_rabbit]
...
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = RABBIT_PASS
...
[keystone_authtoken]
...
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = heat
password = HEAT_PASS
...
[trustee]
...
auth_plugin = password
auth_url = http://controller:35357
username = heat
password = HEAT_PASS
user_domain_id = default
[clients_keystone]
...
auth_uri = http://controller:5000
...
[ec2authtoken]
...
auth_uri = http://controller:5000
heat 서비스 DB의 table들을 생성한다.
[root@controller ~]# su -s /bin/sh -c "heat-manage db_sync" heat
2016-03-11 07:48:26.406 17856 INFO migrate.versioning.api [-] 27 -> 28...
2016-03-11 07:48:27.419 17856 INFO migrate.versioning.api [-] done
2016-03-11 07:48:27.419 17856 INFO migrate.versioning.api [-] 28 -> 29...
...(중략)...
서비스 등록 및 시작한다.
openstack-heat-api-cfn.service openstack-heat-engine.service
Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-heat-api.service to /usr/lib/systemd/system/openstack-heat-api.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-heat-api-cfn.service to /usr/lib/systemd/system/openstack-heat-api-cfn.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-heat-engine.service to /usr/lib/systemd/system/openstack-heat-engine.service.
[root@controller ~]# systemctl start openstack-heat-api.service \
openstack-heat-api-cfn.service openstack-heat-engine.service
서비스가 잘 설치되었는지 확인한다.
+------------+-------------+--------------------------------------+------------+--------+----------------------------+--------+
| hostname | binary | engine_id | host | topic | updated_at | status |
+------------+-------------+--------------------------------------+------------+--------+----------------------------+--------+
| controller | heat-engine | 4f28997b-9b78-4b0b-95d1-49b85359c630 | controller | engine | 2016-03-10T23:09:17.000000 | up |
| controller | heat-engine | 547feaa6-921d-4e02-a2f0-0ca11262ea20 | controller | engine | 2016-03-10T23:09:27.000000 | up |
| controller | heat-engine | 58648238-5102-4b12-9047-579abce72a57 | controller | engine | 2016-03-10T23:09:27.000000 | up |
| controller | heat-engine | 8d722bae-651b-4ceb-a81e-4c42ca6a5bd5 | controller | engine | 2016-03-10T23:09:17.000000 | up |
+------------+-------------+--------------------------------------+------------+--------+----------------------------+--------+
'cluod' 카테고리의 다른 글
openstack liberty 설치 정리12 - Telemetry service (0) | 2016.03.11 |
---|---|
openstack liberty 설치 정리10 - Object Storage Service (0) | 2016.03.07 |
openstack liberty 설치 정리9 - Block Storage Service (0) | 2016.03.06 |
openstack liberty 설치 정리8 - dashboard (0) | 2016.03.05 |
openstack liberty 설치 정리7 - networking service (0) | 2016.03.04 |