[ English | Indonesia | русский | English (United Kingdom) | Deutsch ]
Verify OpenStack-Ansible cloud¶
Bab ini dimaksudkan untuk mendokumentasikan operasi OpenStack dasar untuk memverifikasi penerapan OpenStack-Ansible Anda.
Ini menjelaskan bagaimana CLI dapat digunakan sebagai admin dan pengguna, untuk memastikan perilaku baik cloud Anda.
[ English | Indonesia | русский | English (United Kingdom) | Deutsch ]
Periksa cloud OpenStack-Ansible Anda¶
Bab ini membahas langkah-langkah verifikasi untuk operasi dasar OpenStack API dan dasbor, sebagai administrator.
Catatan
Kontainer utilitas menyediakan lingkungan CLI untuk konfigurasi dan pengujian tambahan.
Akses kontainer utilitas:
$ lxc-attach -n `lxc-ls -1 | grep utility | head -n 1`
Beri sumber kredensial penyewa (tenant credential)
admin
:$ . ~/openrc
Jalankan perintah OpenStack yang menggunakan satu atau lebih API. Sebagai contoh:
$ openstack user list --domain default +----------------------------------+--------------------+ | ID | Name | +----------------------------------+--------------------+ | 04007b990d9442b59009b98a828aa981 | glance | | 0ccf5f2020ca4820847e109edd46e324 | keystone | | 1dc5f638d4d840c690c23d5ea83c3429 | neutron | | 3073d0fa5ced46f098215d3edb235d00 | cinder | | 5f3839ee1f044eba921a7e8a23bb212d | admin | | 61bc8ee7cc9b4530bb18acb740ee752a | stack_domain_admin | | 77b604b67b79447eac95969aafc81339 | alt_demo | | 85c5bf07393744dbb034fab788d7973f | nova | | a86fc12ade404a838e3b08e1c9db376f | swift | | bbac48963eff4ac79314c42fc3d7f1df | ceilometer | | c3c9858cbaac4db9914e3695b1825e41 | dispersion | | cd85ca889c9e480d8ac458f188f16034 | demo | | efab6dc30c96480b971b3bd5768107ab | heat | +----------------------------------+--------------------+
With a web browser, access the Dashboard using the external load balancer domain name or IP address. This is defined by the
external_lb_vip_address
option in the/etc/openstack_deploy/openstack_user_config.yml
file. The dashboard uses HTTPS on port 443.Otentikasi menggunakan username
admin
dan kata sandi yang ditentukan oleh opsikeystone_auth_admin_password
dalam file/etc/openstack_deploy/user_secrets.yml
.Jalankan perintah OpenStack untuk mengungkapkan semua titik akhir dari penerapan Anda. Sebagai contoh:
$ openstack endpoint list +----------------+-----------+--------------+----------------+---------+-----------+---------------------------------------------------+ | ID | Region | Service Name | Service Type | Enabled | Interface | URL | +----------------+-----------+--------------+----------------+---------+-----------+---------------------------------------------------+ | [ID truncated] | RegionOne | cinderv2 | volumev2 | True | admin | http://172.29.236.100:8776/v2/%(project_id)s | | [ID truncated] | RegionOne | cinderv3 | volumev3 | True | public | https://10.23.100.127:8776/v3/%(project_id)s | | [ID truncated] | RegionOne | aodh | alarming | True | internal | http://172.29.236.100:8042 | | [ID truncated] | RegionOne | glance | image | True | public | https://10.23.100.127:9292 | | [ID truncated] | RegionOne | cinderv2 | volumev2 | True | internal | http://172.29.236.100:8776/v2/%(project_id)s | | [ID truncated] | RegionOne | heat-cfn | cloudformation | True | admin | http://172.29.236.100:8000/v1 | | [ID truncated] | RegionOne | neutron | network | True | admin | http://172.29.236.100:9696 | | [ID truncated] | RegionOne | aodh | alarming | True | public | https://10.23.100.127:8042 | | [ID truncated] | RegionOne | nova | compute | True | admin | http://172.29.236.100:8774/v2.1/%(project_id)s | | [ID truncated] | RegionOne | heat-cfn | cloudformation | True | internal | http://172.29.236.100:8000/v1 | | [ID truncated] | RegionOne | swift | object-store | True | public | https://10.23.100.127:8080/v1/AUTH_%(project_id)s | | [ID truncated] | RegionOne | designate | dns | True | admin | http://172.29.236.100:9001 | | [ID truncated] | RegionOne | cinderv2 | volumev2 | True | public | https://10.23.100.127:8776/v2/%(project_id)s | | [ID truncated] | RegionOne | keystone | identity | True | admin | http://172.29.236.100:5000/v3 | | [ID truncated] | RegionOne | nova | compute | True | public | https://10.23.100.127:8774/v2.1/%(project_id)s | | [ID truncated] | RegionOne | keystone | identity | True | internal | http://172.29.236.100:5000/v3 | | [ID truncated] | RegionOne | nova | compute | True | internal | http://172.29.236.100:8774/v2.1/%(project_id)s | | [ID truncated] | RegionOne | gnocchi | metric | True | public | https://10.23.100.127:8041 | | [ID truncated] | RegionOne | neutron | network | True | internal | http://172.29.236.100:9696 | | [ID truncated] | RegionOne | aodh | alarming | True | admin | http://172.29.236.100:8042 | | [ID truncated] | RegionOne | heat | orchestration | True | admin | http://172.29.236.100:8004/v1/%(project_id)s | | [ID truncated] | RegionOne | glance | image | True | internal | http://172.29.236.100:9292 | | [ID truncated] | RegionOne | designate | dns | True | internal | http://172.29.236.100:9001 | | [ID truncated] | RegionOne | cinderv3 | volume | True | internal | http://172.29.236.100:8776/v3/%(project_id)s | | [ID truncated] | RegionOne | heat-cfn | cloudformation | True | public | https://10.23.100.127:8000/v1 | | [ID truncated] | RegionOne | designate | dns | True | public | https://10.23.100.127:9001 | | [ID truncated] | RegionOne | swift | object-store | True | admin | http://172.29.236.100:8080/v1/AUTH_%(project_id)s | | [ID truncated] | RegionOne | heat | orchestration | True | internal | http://172.29.236.100:8004/v1/%(project_id)s | | [ID truncated] | RegionOne | cinderv3 | volumev3 | True | admin | http://172.29.236.100:8776/v3/%(project_id)s | | [ID truncated] | RegionOne | swift | object-store | True | internal | http://172.29.236.100:8080/v1/AUTH_%(project_id)s | | [ID truncated] | RegionOne | neutron | network | True | public | https://10.23.100.127:9696 | | [ID truncated] | RegionOne | heat | orchestration | True | public | https://10.23.100.127:8004/v1/%(project_id)s | | [ID truncated] | RegionOne | gnocchi | metric | True | admin | http://172.29.236.100:8041 | | [ID truncated] | RegionOne | gnocchi | metric | True | internal | http://172.29.236.100:8041 | | [ID truncated] | RegionOne | keystone | identity | True | public | https://10.23.100.127:5000/v3 | | [ID truncated] | RegionOne | glance | image | True | admin | http://172.29.236.100:9292 | | [ID truncated] | RegionOne | placement | placement | True | internal | http://172.29.236.100:8780 | | [ID truncated] | RegionOne | placement | placement | True | admin | http://172.29.236.100:8780 | | [ID truncated] | RegionOne | placement | placement | True | public | https://10.23.100.127:8780 | +----------------+-----------+--------------+----------------+---------+-----------+---------------------------------------------------+
Jalankan perintah OpenStack untuk memastikan semua layanan komputasi bekerja (output tergantung pada konfigurasi Anda) Misalnya:
$ openstack compute service list +----+------------------+----------------------------------------+----------+---------+-------+----------------------------+ | ID | Binary | Host | Zone | Status | State | Updated At | +----+------------------+----------------------------------------+----------+---------+-------+----------------------------+ | 1 | nova-conductor | aio1-nova-conductor-container-5482ff27 | internal | enabled | up | 2018-02-14T15:34:42.000000 | | 2 | nova-scheduler | aio1-nova-scheduler-container-0b594e89 | internal | enabled | up | 2018-02-14T15:34:47.000000 | | 5 | nova-consoleauth | aio1-nova-console-container-835ca240 | internal | enabled | up | 2018-02-14T15:34:47.000000 | | 6 | nova-compute | ubuntu-focal | nova | enabled | up | 2018-02-14T15:34:42.000000 | +----+------------------+----------------------------------------+----------+---------+-------+----------------------------+
Jalankan perintah OpenStack untuk memastikan layanan jaringan berfungsi (hasilnya juga tergantung pada konfigurasi Anda) Misalnya:
$ openstack network agent list +--------------------------------------+----------------------+----------------------------------------+-------------------+-------+-------+---------------------------+ | ID | Agent Type | Host | Availability Zone | Alive | State | Binary | +--------------------------------------+----------------------+----------------------------------------+-------------------+-------+-------+---------------------------+ | 262b29fe-e60e-44b0-ae3c-065565f8deb7 | Metering agent | aio1-neutron-agents-container-2b0569d5 | None | :-) | UP | neutron-metering-agent | | 41135f7f-9e6c-4122-b6b3-d131bfaae53e | Open vSwitch agent | ubuntu-focal | None | :-) | UP | neutron-openvswitch-agent | | 615d12a8-e738-490a-8552-2a03c8544b51 | Metadata agent | aio1-neutron-agents-container-2b0569d5 | None | :-) | UP | neutron-metadata-agent | | 99b2abd3-a330-4ca7-b524-ed176c10b31c | DHCP agent | aio1-neutron-agents-container-2b0569d5 | nova | :-) | UP | neutron-dhcp-agent | | e0139a26-fbf7-4cee-a37f-90940dc5851f | Open vSwitch agent | aio1-neutron-agents-container-2b0569d5 | None | :-) | UP | neutron-openvswitch-agent | | feb20ed4-4346-4ad9-b50c-41efd784f2e9 | L3 agent | aio1-neutron-agents-container-2b0569d5 | nova | :-) | UP | neutron-l3-agent | +--------------------------------------+----------------------+----------------------------------------+-------------------+-------+-------+---------------------------+
Jalankan perintah OpenStack untuk memastikan layanan penyimpanan blok berfungsi (tergantung pada konfigurasi Anda). Sebagai contoh:
$ openstack volume service list +------------------+------------------------------------------+------+---------+-------+----------------------------+ | Binary | Host | Zone | Status | State | Updated At | +------------------+------------------------------------------+------+---------+-------+----------------------------+ | cinder-scheduler | aio1-cinder-scheduler-container-ff4c6c1e | nova | enabled | up | 2018-02-14T15:37:21.000000 | | cinder-volume | ubuntu-bionic@lvm | nova | enabled | up | 2018-02-14T15:37:25.000000 | | cinder-backup | ubuntu-bionic | nova | enabled | up | 2018-02-14T15:37:21.000000 | +------------------+------------------------------------------+------+---------+-------+----------------------------+
Jalankan perintah OpenStack untuk memastikan layanan penyimpanan image berfungsi (tergantung pada gambar yang Anda unggah). Sebagai contoh:
$ openstack image list +--------------------------------------+--------+--------+ | ID | Name | Status | +--------------------------------------+--------+--------+ | 6092d7b3-87c1-4d6c-a822-66c0c6171bd3 | cirros | active | +--------------------------------------+--------+--------+
Check the backend API health on your load balancer nodes. For example, if using HAProxy, ensure no backend is marked as "DOWN":
$ hatop -s /var/run/haproxy.stat
[ English | Indonesia | русский | English (United Kingdom) | Deutsch ]
Konfigurasikan jaringan pertama Anda¶
A newly deployed OpenStack-Ansible has no networks by default. If you need to add networks, you can use the OpenStack CLI, or you can use the Ansible modules for it.
Contoh untuk yang terakhir adalah di repositori openstack-ansible-ops
, di bawah openstack-service-setup.yml
playbook.
[ English | Indonesia | русский | English (United Kingdom) | Deutsch ]
Gunakan klien command line¶
Bagian ini menjelaskan beberapa perintah yang lebih umum untuk menggunakan cloud OpenStack Anda.
Log in to any utility container or install the OpenStack client on your machine, and run the following commands:
Perintah openstack flavor list mencantumkan flavors yang tersedia. Ini adalah berbagai ukuran disk yang dapat ditetapkan untuk images:
$ openstack flavor list
+-----+-----------+-------+------+-----------+-------+-----------+
| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public |
+-----+-----------+-------+------+-----------+-------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | 1 | True |
| 2 | m1.small | 2048 | 20 | 0 | 1 | True |
| 3 | m1.medium | 4096 | 40 | 0 | 2 | True |
| 4 | m1.large | 8192 | 80 | 0 | 4 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | 8 | True |
+-----+-----------+-------+------+-----------+-------+-----------+
Perintah openstack floating ip list mencantumkan alamat IP mengambang yang tersedia saat ini dan instance yang terkait dengan:
$ openstack floating ip list
+------------------+---------------------+------------------+---------+-------------------+---------------+
| ID | Floating IP Address | Fixed IP Address | Port | Floating Network | Project |
+------------------+---------------------+------------------+---------+-------------------+---------------+
| 0a88589a-ffac... | 192.168.12.7 | None | None | d831dac6-028c... | 32db2ccf2a... |
+------------------+---------------------+------------------+---------+-------------------+---------------+
Untuk informasi lebih lanjut tentang penggunaan klien OpenStack, lihat tautan ini: