{"id":1534,"date":"2024-08-28T17:16:21","date_gmt":"2024-08-28T09:16:21","guid":{"rendered":"https:\/\/www.chencuo.top\/?p=1534"},"modified":"2024-08-28T17:16:21","modified_gmt":"2024-08-28T09:16:21","slug":"openstack-v%e7%89%88-centos-stream-8-%e6%89%8b%e5%b7%a5%e6%90%ad%e5%bb%ba-glance%e6%90%ad%e5%bb%ba","status":"publish","type":"post","link":"https:\/\/www.chencuo.top\/?p=1534","title":{"rendered":"openstack v\u7248 centos stream 8 \u624b\u5de5\u642d\u5efa\u2014\u2014Glance\u642d\u5efa(\u4e09)"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>\u6ce8\u610f<\/strong><\/h2>\n\n\n\n<p>1.\u672c\u6559\u7a0b\u4e3aopenstack \u642d\u5efa\u5e73\u53f0victoria \u7248\uff0c\u865a\u62df\u673a\u4e3acentos stream 8<\/p>\n\n\n\n<p>2.\u672c\u6559\u7a0b\u8bbe\u8ba1\u5185\u5bb9\u975e\u5e38\u591a\uff0c\u5f88\u590d\u6742\uff0c\u4f46\u4e5f\u5f88\u6709\u6280\u5de7\uff0c\u8bf7\u6ce8\u610f\u6bcf\u4e00\u6b65\uff0c\u6211\u8bf4\u53ef\u4ee5\u66f4\u6539\u7684\u5730\u65b9\u53ef\u4ee5\u66f4\u6539\uff0c\u5176\u4f59\u5efa\u8bae\u548c\u6211\u4e00\u6837<\/p>\n\n\n\n<p>3.\u5185\u5bb9\u677f\u5757\u5927\u4f53\u5305\u62ec\uff1a\u57fa\u7840\u73af\u5883\u8bbe\u7f6e\uff0c keystone\u7ec4\u5efa\u5b89\u88c5\uff0cglance\u7ec4\u5efa\u5b89\u88c5\uff0cplacement\u7ec4\u5efa\u5b89\u88c5\uff0cnova\u7ec4\u5efa\u5b89\u88c5\uff0cneutron\u7ec4\u5efa\u5b89\u88c5\uff0cdashboard\u7ec4\u5efa\u5b89\u88c5<\/p>\n\n\n\n<p><strong>4.\u5bc6\u7801\u7ea6\u5b9a\uff1a\u672c\u6587\u6240\u6709\u548c\u6570\u636e\u5e93\u53ca\u6d88\u606f\u961f\u5217\u76f8\u5173\u7684\u5bc6\u7801\u7edf\u4e00\u8bbe\u5b9a rootroot\uff0copenstack \u7ec4\u4ef6\u7528\u6237\u5bc6\u7801\u7edf\u4e00\u8bbe\u5b9a redhat<\/strong><\/p>\n\n\n\n<p>5.\u5b66\u4e60\u6b64\u7ae0\u8282\uff0c\u4f60\u9700\u8981\u4e86\u89e3\u7684\u77e5\u8bc6\uff1a\u6570\u636e\u5e93sql\u4e2ddcl\u7528\u6237\u7ba1\u7406\u7684\u77e5\u8bc6\uff0clinux\u57fa\u7840\u547d\u4ee4\uff0copenstack\u57fa\u7840\u547d\u4ee4<\/p>\n\n\n\n<p>6.\u5b98\u65b9\u7f51\u5740\uff1a<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.openstack.org\/install-guide\/environment.html\">GlanceOpenStack Docs: Install and configure (Red Hat)<\/a><\/p>\n\n\n\n<p>7.\u73af\u5883\u914d\u7f6e\uff1a<\/p>\n\n\n\n<p>\u73af\u5883\u7528\u5230 2\u53f0 \u865a\u62df\u673a\uff0c\u5355\u7f51\u5361\uff0c\u5e76\u4e3a\u5176\u914d\u7f6e \u9759\u6001 IP \u53ca DNS<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\u4e3b\u673a\u540d<\/td><td>ip<\/td><td>\u7f51\u5173<\/td><td>DNS<\/td><td>cpu\/\u5185\u5b58<\/td><td>\u78c1\u76d8<\/td><td>\u89d2\u8272<\/td><td>\u5907\u6ce8<\/td><\/tr><tr><td>controller<\/td><td>192.168.100.128<\/td><td>192.168.100.2<\/td><td>114.114.114.114<\/td><td>4c\/6g<\/td><td>100g<\/td><td>\u63a7\u5236\u8282\u70b9<\/td><td>\u5f00\u542f\u865a\u62df\u5316\u5f15\u64ce<\/td><\/tr><tr><td>compute<\/td><td>192.168.100.129<\/td><td>192.168.100.2<\/td><td>114.114.114.114<\/td><td>4c\/6g<\/td><td>100g<\/td><td>\u8ba1\u7b97\u8282\u70b9<\/td><td>\u5f00\u542f\u865a\u62df\u5316\u5f15\u64ce<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u5efa\u5e93\u53ca\u6388\u6743\uff08\u4ec5\u63a7\u5236\u8282\u70b9<\/strong>\uff09<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@controller ~(myuser)]$ mysql -u root -prootroot\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MariaDB connection id is 26\nServer version: 10.3.28-MariaDB MariaDB Server\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMariaDB &#91;(none)]> create database glance;  ##\u521b\u5efa\u5e93glance\nQuery OK, 1 row affected (0.001 sec)\n\nMariaDB &#91;(none)]> grant all privileges on glance.* to 'glance'@'localhost' identified by 'rootroot';\n##\u4e3aglance\u7528\u6237\u5728\u672c\u5730\u5bf9glance\u6570\u636e\u5e93\u6240\u6709\u5bf9\u8c61\u7ed9\u4e88\u5168\u90e8\u6743\u9650\uff0c\u6307\u5b9a\u5bc6\u7801\u4e3arootroot\nQuery OK, 0 rows affected (0.005 sec)\n\nMariaDB &#91;(none)]> grant all privileges on glance.* to 'glance'@'%' identified by 'rootroot';\n##\u4e3aglance\u7528\u6237\u5728\u672c\u5730\u5bf9glance\u6570\u636e\u5e93\u6240\u6709\u5bf9\u8c61\u7ed9\u4e88\u5168\u90e8\u6743\u9650\uff0c\u6307\u5b9a\u5bc6\u7801\u4e3arootroot\nQuery OK, 0 rows affected (0.000 sec)\n\nMariaDB &#91;(none)]> show grants for 'glance'@'localhost';  ##\u53ef\u9009\uff0c\u53ea\u662f\u67e5\u770bglance\u7528\u6237\u5bf9\u4e8eglance\u5e93\u672c\u5730\u6743\u9650\uff0c\u4e0b\u4e00\u6837\uff0c\u53ea\u662f\u8303\u56f4\u4e0d\u540c\n+---------------------------------------------------------------------------------------------------------------+\n| Grants for glance@localhost                                                                                   |\n+---------------------------------------------------------------------------------------------------------------+\n| GRANT USAGE ON *.* TO `glance`@`localhost` IDENTIFIED BY PASSWORD '*6C362347EBEAA7DF44F6D34884615A35095E80EB' |\n| GRANT ALL PRIVILEGES ON `glance`.* TO `glance`@`localhost`                                                    |\n+---------------------------------------------------------------------------------------------------------------+\n2 rows in set (0.002 sec)\n\nMariaDB &#91;(none)]> show grants for 'glance'@'%';\n+-------------------------------------------------------------------------------------------------------+\n| Grants for glance@%                                                                                   |\n+-------------------------------------------------------------------------------------------------------+\n| GRANT USAGE ON *.* TO `glance`@`%` IDENTIFIED BY PASSWORD '*6C362347EBEAA7DF44F6D34884615A35095E80EB' |\n| GRANT ALL PRIVILEGES ON `glance`.* TO `glance`@`%`                                                    |\n+-------------------------------------------------------------------------------------------------------+\n2 rows in set (0.000 sec)\nMariaDB &#91;(none)]> show database; ## \u8fd9\u662f\u9519\u7684\uff0c\u67e5\u770b\u975e\u5177\u4f53\u5e93\u8981\u5e26\u2018s\u2019\u54e6\nERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'database' at line 1\nMariaDB &#91;(none)]> show databases;  ##\u67e5\u770b\u5e93\n+--------------------+\n| Database           |\n+--------------------+\n| glance             |\n| information_schema |\n| keystone           |\n| mysql              |\n| performance_schema |\n+--------------------+\n5 rows in set (0.004 sec)\n\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u521b\u5efa\u7528\u6237\u53ca\u5173\u8054\u89d2\u8272\uff08\u4ec5\u63a7\u5236\u8282\u70b9\uff09<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@controller ~(myuser)]$ source keystonerc_admin\n&#91;root@controller ~(admin)]$ openstack user create --domain default --password-prompt glance\nUser Password:   ##\u5bc6\u7801\u4f9d\u65e7redhat\nRepeat User Password:\n+---------------------+----------------------------------+\n| Field               | Value                            |\n+---------------------+----------------------------------+\n| domain_id           | default                          |\n| enabled             | True                             |\n| id                  | 2c401bee20a245ac88cf4629ed4ee440 |\n| name                | glance                           |\n| options             | {}                               |\n| password_expires_at | None                             |\n+---------------------+----------------------------------+\n&#91;root@controller ~(admin)]$ openstack user list\n+----------------------------------+--------+\n| ID                               | Name   |\n+----------------------------------+--------+\n| cda7fc3c6ff74289b8f40e149d397710 | admin  |\n| 9688822b0dcd41929430ab48335fceb2 | myuser |\n| 2c401bee20a245ac88cf4629ed4ee440 | glance |\n+----------------------------------+--------+\n&#91;root@controller ~(admin)]$ openstack role add --project service --user glance admin\n##\u548c\u4e4b\u524d\u4e00\u6837\u7684\uff0c\u8ba9glance\u7528\u6237\u4f5c\u4e3aadmin \u6765\u4e0eservice\u9879\u76ee\u5efa\u7acb\u8fde\u63a5\n&#91;root@controller ~(admin)]$ openstack role assignment list --user glance \n\n+----------------------------------+----------------------------------+-------+----------------------------------+--------+--------+-----------+\n| Role                             | User                             | Group | Project                          | Domain | System | Inherited |\n+----------------------------------+----------------------------------+-------+----------------------------------+--------+--------+-----------+\n| 35eb6220a4b14503b1672de9f0ffcae9 | 2c401bee20a245ac88cf4629ed4ee440 |       | 578eca45e7e549858c97314e3f2ec1e3 |        |        | False     |\n+----------------------------------+----------------------------------+-------+----------------------------------+--------+--------+-----------+<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u521b\u5efa\u670d\u52a1\u53ca\u6ce8\u518cAPI\uff08\u4ec5\u63a7\u5236\u8282\u70b9\uff09<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@controller ~(admin)]$ openstack service create --name glance --description \"OpenStack Image\" image\n+-------------+----------------------------------+\n| Field       | Value                            |\n+-------------+----------------------------------+\n| description | OpenStack Image                  |\n| enabled     | True                             |\n| id          | fa2e979295a546fd8b0f0f54bcd0a534 |\n| name        | glance                           |\n| type        | image                            |\n+-------------+----------------------------------+\n&#91;root@controller ~(admin)]$ openstack endpoint create --region RegionOne image public http:\/\/controller:9292\n+--------------+----------------------------------+\n| Field        | Value                            |\n+--------------+----------------------------------+\n| enabled      | True                             |\n| id           | 861dc3b20d324e4892e506058c2c7b1f |\n| interface    | public                           |\n| region       | RegionOne                        |\n| region_id    | RegionOne                        |\n| service_id   | fa2e979295a546fd8b0f0f54bcd0a534 |\n| service_name | glance                           |\n| service_type | image                            |\n| url          | http:\/\/controller:9292           |\n+--------------+----------------------------------+\n&#91;root@controller ~(admin)]$ openstack endpoint create --region RegionOne image internal http:\/\/controller:9292\n+--------------+----------------------------------+\n| Field        | Value                            |\n+--------------+----------------------------------+\n| enabled      | True                             |\n| id           | 0347ebc573814319b61f2b061d12a76d |\n| interface    | internal                         |\n| region       | RegionOne                        |\n| region_id    | RegionOne                        |\n| service_id   | fa2e979295a546fd8b0f0f54bcd0a534 |\n| service_name | glance                           |\n| service_type | image                            |\n| url          | http:\/\/controller:9292           |\n+--------------+----------------------------------+\n&#91;root@controller ~(admin)]$ openstack endpoint create --region RegionOne image admin http:\/\/controller:9292\n+--------------+----------------------------------+\n| Field        | Value                            |\n+--------------+----------------------------------+\n| enabled      | True                             |\n| id           | 810eab1198cc44dc8a2f4de04d227da4 |\n| interface    | admin                            |\n| region       | RegionOne                        |\n| region_id    | RegionOne                        |\n| service_id   | fa2e979295a546fd8b0f0f54bcd0a534 |\n| service_name | glance                           |\n| service_type | image                            |\n| url          | http:\/\/controller:9292           |\n+--------------+----------------------------------+\n&#91;root@controller ~(admin)]$ openstack endpoint list\n+----------------------------------+-----------+--------------+--------------+---------+-----------+----------------------------+\n| ID                               | Region    | Service Name | Service Type | Enabled | Interface | URL                        |\n+----------------------------------+-----------+--------------+--------------+---------+-----------+----------------------------+\n| 0347ebc573814319b61f2b061d12a76d | RegionOne | glance       | image        | True    | internal  | http:\/\/controller:9292     |\n| 6395f0c625274f4b90e9137f38e93882 | RegionOne | keystone     | identity     | True    | admin     | http:\/\/controller:5000\/v3\/ |\n| 810eab1198cc44dc8a2f4de04d227da4 | RegionOne | glance       | image        | True    | admin     | http:\/\/controller:9292     |\n| 861dc3b20d324e4892e506058c2c7b1f | RegionOne | glance       | image        | True    | public    | http:\/\/controller:9292     |\n| ca45bbfeef81436688974a8d04e75d88 | RegionOne | keystone     | identity     | True    | internal  | http:\/\/controller:5000\/v3\/ |\n| ff9d2f5be3c54026a27d8661b68460b9 | RegionOne | keystone     | identity     | True    | public    | http:\/\/controller:5000\/v3\/ |\n+----------------------------------+-----------+--------------+--------------+---------+-----------+----------------------------+\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u5b89\u88c5\u5305\uff08\u4ec5\u63a7\u5236\u8282\u70b9\uff09<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@controller ~(admin)]$ yum install openstack-glance -y\n##\u4e00\u6837\u7684\uff0c\u592a\u591a\u5566\uff01\uff01\uff01\uff0c\u53ea\u5c55\u793a\u5b89\u88c5\u5185\u5bb9\n\u5df2\u5347\u7ea7:\n  platform-python-3.6.8-62.el8.x86_64                                      python3-libs-3.6.8-62.el8.x86_64                                     \n\u5df2\u5b89\u88c5:\n  blosc-1.17.0-1.el8.x86_64                                            graphviz-2.40.1-45.el8.x86_64                                            \n  hdf5-1.10.5-5.el8.x86_64                                             libXaw-1.0.13-10.el8.x86_64                                              \n  libaec-1.0.2-3.el8.x86_64                                            libgfortran-8.5.0-22.el8.x86_64                                          \n  libqhull-1:7.2.1-2.el8.x86_64                                        libquadmath-8.5.0-22.el8.x86_64                                          \n  openblas-0.3.15-4.el8.x86_64                                         openblas-threads-0.3.15-4.el8.x86_64                                     \n  openstack-glance-1:21.1.0-1.el8.noarch                               perl-Filter-2:1.58-2.el8.x86_64                                          \n  perl-Text-Unidecode-1.30-5.el8.noarch                                perl-XML-Parser-2.44-11.el8.x86_64                                       \n  perl-XML-XPath-1.42-3.el8.noarch                                     perl-encoding-4:2.22-3.el8.x86_64                                        \n  perl-open-1.11-422.el8.noarch                                        platform-python-devel-3.6.8-62.el8.x86_64                                \n  python-oslo-privsep-lang-2.4.0-2.el8.noarch                          python-oslo-vmware-lang-3.7.0-2.el8.noarch                               \n  python-rpm-macros-3-45.el8.noarch                                    python-srpm-macros-3-45.el8.noarch                                       \n  python3-Bottleneck-1.2.1-13.el8.x86_64                               python3-automaton-2.2.0-1.el8.noarch                                     \n  python3-barbicanclient-5.0.1-2.el8.noarch                            python3-boto-2.49.0-4.el8.noarch                                         \n  python3-castellan-3.6.1-1.el8.noarch                                 python3-cursive-0.2.2-1.el8.noarch                                       \n  python3-cycler-0.10.0-13.el8.noarch                                  python3-glance-1:21.1.0-1.el8.noarch                                     \n  python3-glance-store-2.3.1-1.el8.noarch                              python3-glanceclient-1:3.2.2-2.el8.noarch                                \n  python3-httplib2-0.10.3-4.el8.noarch                                 python3-kiwisolver-1.1.0-4.el8.x86_64                                    \n  python3-matplotlib-3.1.1-2.el8.x86_64                                python3-matplotlib-data-3.1.1-2.el8.noarch                               \n  python3-matplotlib-data-fonts-3.1.1-2.el8.noarch                     python3-matplotlib-tk-3.1.1-2.el8.x86_64                                 \n  python3-mock-3.0.5-7.el8.noarch                                      python3-networkx-2.5-1.el8.noarch                                        \n  python3-numexpr-2.7.1-1.el8.x86_64                                   python3-numpy-1:1.14.3-10.el8.x86_64                                     \n  python3-numpy-f2py-1:1.14.3-10.el8.x86_64                            python3-os-brick-4.0.5-1.el8.noarch                                      \n  python3-os-win-5.2.0-1.el8.noarch                                    python3-oslo-privsep-2.4.0-2.el8.noarch                                  \n  python3-oslo-reports-2.2.0-2.el8.noarch                              python3-oslo-rootwrap-6.2.0-2.el8.noarch                                 \n  python3-oslo-vmware-3.7.0-2.el8.noarch                               python3-pandas-0.25.3-1.el8.x86_64                                       \n  python3-pillow-5.1.1-21.el8.x86_64                                   python3-pydot-1.4.1-1.el8.noarch                                         \n  python3-pygraphviz-1.5-9.el8.x86_64                                  python3-pysendfile-2.0.1-15.el8.x86_64                                   \n  python3-pyxattr-0.5.3-18.el8.x86_64                                  python3-retrying-1.2.3-21.el8.noarch                                     \n  python3-rpm-generators-5-8.el8.noarch                                python3-rpm-macros-3-45.el8.noarch                                       \n  python3-rsa-4.6-2.el8s.noarch                                        python3-scipy-1.0.0-21.module_el8+762+77bd8591.x86_64                    \n  python3-simplegeneric-0.8.1-17.el8.noarch                            python3-suds-0.7-0.11.94664ddd46a6.el8.noarch                            \n  python3-tables-3.5.2-6.el8.x86_64                                    python3-taskflow-4.5.0-2.el8.noarch                                      \n  python3-tenacity-6.2.0-1.el8.noarch                                  python3-tkinter-3.6.8-62.el8.x86_64                                      \n  python3-warlock-1.3.3-1.el8.noarch                                   python3-wsme-0.9.3-1.el8.noarch                                          \n  sysfsutils-2.1.0-25.el8.x86_64                                       tcl-1:8.6.8-2.el8.x86_64                                                 \n  texlive-base-7:20180414-29.el8.noarch                                texlive-dvipng-7:20180414-29.el8.x86_64                                  \n  texlive-kpathsea-7:20180414-29.el8.x86_64                            texlive-lib-7:20180414-29.el8.x86_64                                     \n  texlive-tetex-7:20180414-29.el8.noarch                               texlive-texlive.infra-7:20180414-29.el8.noarch                           \n  tk-1:8.6.8-1.el8.x86_64                                              xorg-x11-fonts-ISO8859-1-100dpi-7.5-19.el8.noarch                        \n\n\u5b8c\u6bd5\uff01\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\uff08\u4ec5\u63a7\u5236\u8282\u70b9\uff09<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@controller ~(admin)]$ vim \/etc\/glance\/glance-api.conf\n\n\u5f88\u591a\u6162\u6162\u627e\uff0c\u8fd8\u662f\uff1a\/database\n&#91;database]\nconnection = mysql+pymysql:\/\/glance:rootroot@controller\/glance  ##\u5927\u7ea61590\u884c\n\n &#91;keystone_authtoken]\n www_authenticate_uri  = http:\/\/controller:5000\n auth_url = http:\/\/controller:5000\n memcached_servers = controller:11211\n auth_type = password\n project_domain_name = Default                               ##\u5927\u7ea64650\u884c\n user_domain_name = Default\n project_name = service\n username = glance\n password = redhat\n\n &#91;paste_deploy]                  \n flavor = keystone                              ##\u5927\u7ea65300\u884c\n\n\n&#91;glance_store]\nstores = file,http\ndefault_store = file\nfilesystem_store_datadir = \/var\/lib\/glance\/images\/        ##\u5927\u7ea62980\u884c\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u521d\u59cb\u5316\u6570\u636e\u5e93\uff08\u4ec5\u63a7\u5236\u8282\u70b9\uff09<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@controller ~(admin)]$ su -s \/bin\/sh -c \"glance-manage db_sync\" glance  ##\u811a\u672c\u521d\u59cb\u5316glance\u6570\u636e\u5e93\nINFO  &#91;alembic.runtime.migration] Context impl MySQLImpl.\nINFO  &#91;alembic.runtime.migration] Will assume non-transactional DDL.\nINFO  &#91;alembic.runtime.migration] Running upgrade  -> liberty, liberty initial\nINFO  &#91;alembic.runtime.migration] Running upgrade liberty -> mitaka01, add index on created_at and updated_at columns of 'images' table\nINFO  &#91;alembic.runtime.migration] Running upgrade mitaka01 -> mitaka02, update metadef os_nova_server\nINFO  &#91;alembic.runtime.migration] Running upgrade mitaka02 -> ocata_expand01, add visibility to images\nINFO  &#91;alembic.runtime.migration] Running upgrade ocata_expand01 -> pike_expand01, empty expand for symmetry with pike_contract01\nINFO  &#91;alembic.runtime.migration] Running upgrade pike_expand01 -> queens_expand01\nINFO  &#91;alembic.runtime.migration] Running upgrade queens_expand01 -> rocky_expand01, add os_hidden column to images table\nINFO  &#91;alembic.runtime.migration] Running upgrade rocky_expand01 -> rocky_expand02, add os_hash_algo and os_hash_value columns to images table\nINFO  &#91;alembic.runtime.migration] Running upgrade rocky_expand02 -> train_expand01, empty expand for symmetry with train_contract01\nINFO  &#91;alembic.runtime.migration] Running upgrade train_expand01 -> ussuri_expand01, empty expand for symmetry with ussuri_expand01\nINFO  &#91;alembic.runtime.migration] Context impl MySQLImpl.\nINFO  &#91;alembic.runtime.migration] Will assume non-transactional DDL.\nUpgraded database to: ussuri_expand01, current revision(s): ussuri_expand01\nINFO  &#91;alembic.runtime.migration] Context impl MySQLImpl.\nINFO  &#91;alembic.runtime.migration] Will assume non-transactional DDL.\nINFO  &#91;alembic.runtime.migration] Context impl MySQLImpl.\nINFO  &#91;alembic.runtime.migration] Will assume non-transactional DDL.\nDatabase migration is up to date. No migration needed.\nINFO  &#91;alembic.runtime.migration] Context impl MySQLImpl.\nINFO  &#91;alembic.runtime.migration] Will assume non-transactional DDL.\nINFO  &#91;alembic.runtime.migration] Context impl MySQLImpl.\nINFO  &#91;alembic.runtime.migration] Will assume non-transactional DDL.\nINFO  &#91;alembic.runtime.migration] Running upgrade mitaka02 -> ocata_contract01, remove is_public from images\nINFO  &#91;alembic.runtime.migration] Running upgrade ocata_contract01 -> pike_contract01, drop glare artifacts tables\nINFO  &#91;alembic.runtime.migration] Running upgrade pike_contract01 -> queens_contract01\nINFO  &#91;alembic.runtime.migration] Running upgrade queens_contract01 -> rocky_contract01\nINFO  &#91;alembic.runtime.migration] Running upgrade rocky_contract01 -> rocky_contract02\nINFO  &#91;alembic.runtime.migration] Running upgrade rocky_contract02 -> train_contract01\nINFO  &#91;alembic.runtime.migration] Running upgrade train_contract01 -> ussuri_contract01\nINFO  &#91;alembic.runtime.migration] Context impl MySQLImpl.\nINFO  &#91;alembic.runtime.migration] Will assume non-transactional DDL.\nUpgraded database to: ussuri_contract01, current revision(s): ussuri_contract01\nINFO  &#91;alembic.runtime.migration] Context impl MySQLImpl.\nINFO  &#91;alembic.runtime.migration] Will assume non-transactional DDL.\nDatabase is synced successfully.\n&#91;root@controller ~(admin)]$ mysql -u root -prootroot\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MariaDB connection id is 29\nServer version: 10.3.28-MariaDB MariaDB Server\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMariaDB &#91;(none)]> show databases;\n+--------------------+\n| Database           |\n+--------------------+\n| glance             |\n| information_schema |\n| keystone           |\n| mysql              |\n| performance_schema |\n+--------------------+\n5 rows in set (0.001 sec)\n\nMariaDB &#91;(none)]> use glance\nReading table information for completion of table and column names\nYou can turn off this feature to get a quicker startup with -A\n\nDatabase changed\nMariaDB &#91;glance]> show tables;\n+----------------------------------+\n| Tables_in_glance                 |\n+----------------------------------+\n| alembic_version                  |\n| image_locations                  |\n| image_members                    |\n| image_properties                 |\n| image_tags                       |\n| images                           |\n| metadef_namespace_resource_types |\n| metadef_namespaces               |\n| metadef_objects                  |\n| metadef_properties               |\n| metadef_resource_types           |\n| metadef_tags                     |\n| migrate_version                  |\n| task_info                        |\n| tasks                            |\n+----------------------------------+\n15 rows in set (0.001 sec)\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u738b\u4e94<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@controller ~(admin)]$ systemctl start openstack-glance-api.service\n&#91;root@controller ~(admin)]$ systemctl enable openstack-glance-api.service\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/openstack-glance-api.service \u2192 \/usr\/lib\/systemd\/system\/openstack-glance-api.service.\n&#91;root@controller ~(admin)]$ source keystonerc_admin\n&#91;root@controller ~(admin)]$ ll\n\u603b\u7528\u91cf 20756\ndrwxr-xr-x. 2 root root        6 8\u6708  27 23:59 \u516c\u5171\ndrwxr-xr-x. 2 root root        6 8\u6708  27 23:59 \u6a21\u677f\ndrwxr-xr-x. 2 root root        6 8\u6708  27 23:59 \u89c6\u9891\ndrwxr-xr-x. 2 root root        6 8\u6708  27 23:59 \u56fe\u7247\ndrwxr-xr-x. 2 root root        6 8\u6708  27 23:59 \u6587\u6863\ndrwxr-xr-x. 2 root root        6 8\u6708  27 23:59 \u4e0b\u8f7d\ndrwxr-xr-x. 2 root root        6 8\u6708  27 23:59 \u97f3\u4e50\ndrwxr-xr-x. 2 root root        6 8\u6708  27 23:59 \u684c\u9762\n-rw-------. 1 root root     1250 8\u6708  27 23:37 anaconda-ks.cfg\n-rw-r--r--  1 root root 21233664 8\u6708  25 07:42 cirros-0.6.1-x86_64-disk.img\n-rw-r--r--. 1 root root     1531 8\u6708  27 23:59 initial-setup-ks.cfg\n-rw-r--r--  1 root root      296 8\u6708  28 04:57 keystonerc_admin\n-rw-r--r--  1 root root      300 8\u6708  28 04:58 keystonerc_user\n-rw-r--r--  1 root root        0 8\u6708  28 04:54 --os-project-domain-name\n-rw-r--r--  1 root root      172 8\u6708  28 04:54 --os-project-name\n&#91;root@controller ~(admin)]$ mv cirros-0.6.1-x86_64-disk.img \/tmp\/   \n##\u81ea\u5df1\u7528winscp\u4e0a\u4f20\ud83e\udd8c\uff0c\u7d2f\u4e86\u7d2f\u4e86= =\n&#91;root@controller ~(admin)]$ ls \/tmp\/cir*\n\/tmp\/cirros-0.6.1-x86_64-disk.img\n&#91;root@controller ~(admin)]$ openstack image create --disk-format qcow2 --container-format bare --public --file \/tmp\/cirros-0.6.1-x86_64-disk.img centos7   \n##\u9a8c\u8bc1\u955c\u50cf\u80fd\u5426\u6b63\u5e38\u4e0a\u4f20\n+------------------+---------------------------------------------------------------------------------------------------------------------------------------------+\n| Field            | Value                                                                                                                                       |\n+------------------+---------------------------------------------------------------------------------------------------------------------------------------------+\n| container_format | bare                                                                                                                                        |\n| created_at       | 2024-08-28T09:48:31Z                                                                                                                        |\n| disk_format      | qcow2                                                                                                                                       |\n| file             | \/v2\/images\/9ca52084-c37b-48b8-b4f5-7390e19b3567\/file                                                                                        |\n| id               | 9ca52084-c37b-48b8-b4f5-7390e19b3567                                                                                                        |\n| min_disk         | 0                                                                                                                                           |\n| min_ram          | 0                                                                                                                                           |\n| name             | centos7                                                                                                                                     |\n| owner            | 660df1d651a940fda39757aee91856bf                                                                                                            |\n| properties       | os_hidden='False', owner_specified.openstack.md5='', owner_specified.openstack.object='images\/centos7', owner_specified.openstack.sha256='' |\n| protected        | False                                                                                                                                       |\n| schema           | \/v2\/schemas\/image                                                                                                                           |\n| status           | queued                                                                                                                                      |\n| tags             |                                                                                                                                             |\n| updated_at       | 2024-08-28T09:48:31Z                                                                                                                        |\n| visibility       | public                                                                                                                                      |\n+------------------+---------------------------------------------------------------------------------------------------------------------------------------------+\n&#91;root@controller ~(admin)]$ openstack image list  ##\u67e5\u770b\u955c\u50cf\n+--------------------------------------+---------+--------+\n| ID                                   | Name    | Status |\n+--------------------------------------+---------+--------+\n| 9ca52084-c37b-48b8-b4f5-7390e19b3567 | centos7 | active |\n+--------------------------------------+---------+--------+\n&#91;root@controller ~(admin)]$ mysql -u root -prootroot\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MariaDB connection id is 36\nServer version: 10.3.28-MariaDB MariaDB Server\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMariaDB &#91;(none)]> use glance\nReading table information for completion of table and column names\nYou can turn off this feature to get a quicker startup with -A\n\nDatabase changed\nMariaDB &#91;glance]> show tables;\n+----------------------------------+\n| Tables_in_glance                 |\n+----------------------------------+\n| alembic_version                  |\n| image_locations                  |\n| image_members                    |\n| image_properties                 |\n| image_tags                       |\n| images                           |\n| metadef_namespace_resource_types |\n| metadef_namespaces               |\n| metadef_objects                  |\n| metadef_properties               |\n| metadef_resource_types           |\n| metadef_tags                     |\n| migrate_version                  |\n| task_info                        |\n| tasks                            |\n+----------------------------------+\n15 rows in set (0.001 sec)\n\nMariaDB &#91;glance]> select * from image_locations   ##\u6570\u636e\u5e93\u5185\u67e5\u770b\u955c\u50cf\n    -> ;\n+----+--------------------------------------+--------------------------------------------------------------------+---------------------+---------------------+------------+---------+-----------+--------+\n| id | image_id                             | value                                                              | created_at          | updated_at          | deleted_at | deleted | meta_data | status |\n+----+--------------------------------------+--------------------------------------------------------------------+---------------------+---------------------+------------+---------+-----------+--------+\n|  1 | 9ca52084-c37b-48b8-b4f5-7390e19b3567 | file:\/\/\/var\/lib\/glance\/images\/9ca52084-c37b-48b8-b4f5-7390e19b3567 | 2024-08-28 09:48:32 | 2024-08-28 09:48:32 | NULL       |       0 | {}        | active |\n+----+--------------------------------------+--------------------------------------------------------------------+---------------------+---------------------+------------+---------+-----------+--------+\n1 row in set (0.001 sec)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6ce8\u610f 1.\u672c\u6559\u7a0b\u4e3aopenstack \u642d\u5efa\u5e73\u53f0victoria \u7248\uff0c\u865a\u62df\u673a\u4e3acentos stream 8 2 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,9,14],"tags":[30,32],"class_list":["post-1534","post","type-post","status-publish","format-standard","hentry","category-5","category-9","category-14","tag-openstack","tag-victoria"],"_links":{"self":[{"href":"https:\/\/www.chencuo.top\/index.php?rest_route=\/wp\/v2\/posts\/1534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chencuo.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chencuo.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chencuo.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chencuo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1534"}],"version-history":[{"count":0,"href":"https:\/\/www.chencuo.top\/index.php?rest_route=\/wp\/v2\/posts\/1534\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.chencuo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chencuo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chencuo.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}