Hi….

Lanjut lagi COA series nya ya, maaf sebelumnya karena updatenya lama, karena laptop bermasalah.

Groups

Groups adalah cara mudah untuk memanage users yang membutuhkan roles yang sama. Untuk melihat perintah apa yang tersedia, mari check dengan help:

[[email protected] centos(keystone_admin)]# openstack group --help
Command "group" matches:
 group add user
 group contains user
 group create
 group delete
 group list
 group remove user
 group set
 group show

Kita coba lihat lebih detail pada “create” dengan command :

[[email protected] centos(keystone_admin)]# openstack group create --help
usage: openstack group create [-h] [-f {json,shell,table,value,yaml}]
 [-c COLUMN] [--max-width <integer>]
 [--fit-width] [--print-empty] [--noindent]
 [--prefix PREFIX] [--domain <domain>]
 [--description <description>] [--or-show]
 <group-name>

Sekarang, kita coba create

[[email protected] centos(keystone_admin)]# openstack group create support
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description |                                  |
| domain_id   | default                          |
| id          | 80bf27af59cb4db095f6b5d0844b8c1a |
| name        | support                          |
+-------------+----------------------------------+

Sekarang, kita coba set “description”, kemudian cek hasilnya

[[email protected] centos(keystone_admin)]# openstack group set --description "Konfigurasi Support Group" support
[[email protected] centos(keystone_admin)]# openstack group show support
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Konfigurasi Support Group        |
| domain_id   | default                          |
| id          | 80bf27af59cb4db095f6b5d0844b8c1a |
| name        | support                          |
+-------------+----------------------------------+

Nah, sekarang kita coba create user support_konfigurasi, kemudian masukan ke project konfigurasi, role _member_ dan group support

[[email protected] centos(keystone_admin)]# openstack user create --password-prompt support_konfigurasi
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | default                          |
| enabled             | True                             |
| id                  | 167f0bcb0dae41698e12e1020e86f536 |
| name                | support_konfigurasi              |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+
[[email protected] centos(keystone_admin)]# openstack role add --project konfigurasi --user support_konfigurasi _member_
[[email protected] centos(keystone_admin)]# openstack group add user support support_konfigurasi
[[email protected] centos(keystone_admin)]# openstack group contains user support support_konfigurasi
support_konfigurasi in group support

Untuk menghapus user dari group gunakan command

[[email protected] centos(keystone_admin)]# openstack group remove user support

Kemudian, untuk menghapus group

[[email protected] centos(keystone_admin)]# openstack group delete support

Domains

Domain hanya dapat dimanage dengan cli saja, berikut command yang ada di domain

[[email protected] centos(keystone_admin)]# openstack domain --help
Command "domain" matches:
 domain create
 domain delete
 domain list
 domain set
 domain show

Dan untuk melihat lebih detail salah satu nya

[[email protected] centos(keystone_admin)]# openstack domain create --help

Sekarang kita coba buat domain

[[email protected] centos(keystone_admin)]# openstack domain create supports
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description |                                  |
| enabled     | True                             |
| id          | 1687d2eff35c4a8e93167da9019e06ab |
| name        | supports                         |
+-------------+----------------------------------+

Kita coba beri deskripsi nya dan cek setelah set deskripsi

[[email protected] centos(keystone_admin)]# openstack domain set --description "Konfigurasi Support Domain" supports
[[email protected] centos(keystone_admin)]# openstack domain show supports
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | Konfigurasi Support Domain       |
| enabled     | True                             |
| id          | 1687d2eff35c4a8e93167da9019e06ab |
| name        | supports                         |
+-------------+----------------------------------+

Juga bisa cek dengan command

[[email protected] centos(keystone_admin)]# openstack domain list
+----------------------------------+----------+---------+----------------------------+
| ID                               | Name     | Enabled | Description                |
+----------------------------------+----------+---------+----------------------------+
| 1687d2eff35c4a8e93167da9019e06ab | supports | True    | Konfigurasi Support Domain |
| default                          | Default  | True    | The default domain         |
+----------------------------------+----------+---------+----------------------------+

Untuk project, user dll tidak bisa dipindahkan dari domain satu ke yang lain. Hanya bisa dibuat didalam domain.

Oleh karena itu, sekarang kita coba create project dan user yang baru

[[email protected] centos(keystone_admin)]# openstack project create --domain supports Support
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description |                                  |
| domain_id   | 1687d2eff35c4a8e93167da9019e06ab |
| enabled     | True                             |
| id          | 78343f30e9bd4fc6be433b7c070f7d6a |
| is_domain   | False                            |
| name        | Support                          |
| parent_id   | 1687d2eff35c4a8e93167da9019e06ab |
+-------------+----------------------------------+
[[email protected] centos(keystone_admin)]# openstack project list
+----------------------------------+-------------+
| ID                               | Name        |
+----------------------------------+-------------+
| 684756bc533142b7b6c83aa142919955 | services    |
| 78343f30e9bd4fc6be433b7c070f7d6a | Support     |
| 84268f39f25148739783ca2247b7ba21 | konfigurasi |
| 96f6342313114f2094488ec528c6a782 | demo        |
| 9db0b4d06d0548ff96d10845fe44e3b6 | admin       |
+----------------------------------+-------------+
[[email protected] centos(keystone_admin)]# openstack user create --domain supports ade --password-prompt
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | 1687d2eff35c4a8e93167da9019e06ab |
| enabled             | True                             |
| id                  | 953a6cc02b0840189e6d8c88699bd33b |
| name                | ade                              |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+
[[email protected] centos(keystone_admin)]# openstack user list
+----------------------------------+---------------------+
| ID                               | Name                |
+----------------------------------+---------------------+
| 167f0bcb0dae41698e12e1020e86f536 | support_konfigurasi |
| 23e4b8d17ec34921a44419fb243e2e9f | aodh                |
| 2aa274d6a1fc487c9620ba1c2ce3b185 | admin_konfigurasi   |
| 3261551f781840bcb52ac7e403717e1c | glance              |
| 3eb5ec95b83e424bbee3ade5ee43f737 | neutron             |
| 6b1887d907aa4920afc848db9707c431 | admin               |
| 6d3ec2aa483f4cb598bfdb7a5394dd69 | ceilometer          |
| 76abbdc01fe741d8976fc49ded6093d4 | swift               |
| 8301050d83804fe399e3731b0979f144 | demo                |
| 84af867a7810494e8dd837fe05d05f1b | gnocchi             |
| 93c6646c3d654084abb2710971e846db | nova                |
| 946edb0acc2d4b97bffffbaee8ff3474 | placement           |
| 953a6cc02b0840189e6d8c88699bd33b | ade                 |
| ac80bdff114a4b82a7afbf34c3949cf1 | cinder              |
+----------------------------------+---------------------+

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *