In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Environment preparation 1. Virtual machine preparation IP address hostname operating system 192.168.56.11 linux-node1 CentOS7192.168.56.12 linux-node2 CentOS7
Where linux-node1 is used as the control node
Linux-node2 as a compute node
2. Mirror service OpenStack mirror service is the core service of IaaS. It accepts disk image or server image API requests, as well as metadata definitions from end users or OpenStack computing components. It also supports disk mirroring or server image storage on various types of repositories, including OpenStack object storage. A large number of periodic processes run on the OpenStack mirroring service to support caching. Synchronous replication (Replication) services guarantee consistency and availability in the cluster. Other periodic processes include auditors, updaters, and reapers. The OpenStack mirroring service includes the following components: glance-api receives calls to the mirror API, such as image discovery, recovery, and storage. Listens on port 9292 glance-registry to store, process, and restore mirrored metadata, including items such as size and type snooping 9191 port # glance-registry is a private internal service for serving OpenStack Image services. Do not expose the service to users 3, installation and configuration 1, install [root@linux-node1 ~] # yum install-y openstack-glance2, configuration
precondition
(1) create glance database (2) obtain admin credentials to obtain access to commands that only administrators can execute
Create a user
(3) modify glance-api.conf
Configure database connection
Vim / etc/glance/glance-api.confconnection = mysql+pymysql://glance:glance@192.168.56.11/glance (4) modify glance-registry.conf
Configure database connection
Vim / etc/glance/glance-registry.confconnection = mysql+pymysql://glance:glance@192.168.56.11/glance3, write to mirroring service database
Synchronize the database and create the table structure of glance
Su-s / bin/sh-c "glance-manage db_sync" glance
After the synchronization is completed, confirm whether the creation is successful.
[root@linux-node1] # mysql-h 192.168.56.11-uglance-pglance-e "use glance;show tables "+-- + | Tables_in_glance | +-+ | artifact_blob_locations | | artifact_blobs | | artifact_dependencies | | artifact_ Properties | | artifact_tags | | artifacts | | p_w_picpath_locations | | p_w_picpath_members | | p_w_picpath_properties | | p_w_picpath_tags | | p_w_picpaths | | metadef_namespace_resource_types | | metadef_namespaces | | metadef_objects | | metadef_properties | | metadef_resource_types | | metadef_tags | | migrate_version | | task_info | | tasks | +-| -+ 4. Configure keystone
Modify glance-api.conf
Vim / etc/glance/glance-api.conf# add auth_uri = http://192.168.56.11:5000auth_url = http://192.168.56.11:35357memcached_servers = 192.168.56.11:11211auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = serviceusername = glancepassword = glance# under [keystone_authtoken] and flavor = keystone under [paste_deploy]
Modify glance-registry.conf
Vim / etc/glance/glance-registry.conf add auth_uri = http://192.168.56.11:5000auth_url = http://192.168.56.11:35357memcached_servers = 192.168.56.11:11211auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = serviceusername = glancepassword = glance under [keystone_authtoken], add flavor = keystone5 under [paste_deploy], configure image storage location
Edit glance-api.conf
Under [glance_store], modify stores = file,httpdefault_store = filefilesystem_store_datadir = / var/lib/glance/p_w_picpaths6, boot glance settings, boot [root@linux-node1 ~] # systemctl enable openstack-glance-api.service\ > openstack-glance-registry.service startup [root @ linux-node1 ~] # systemctl start openstack-glance-api.service\ > openstack-glance-registry.service
Execute netstat-lntp to check port snooping. If both 9292 and 9191 are listening, it proves that glance starts successfully.
7. Register the service on keystone
Execute the environment variable script before creating it
[root@linux-node1 ~] # source admin-openstack.sh
Then create a glance service entity
[root@linux-node1 ~] # openstack service create-- name glance-- description "OpenStack Image" paired wishful picpathogical Murray + | Field | Value | +-+- -+ | description | OpenStack Image | | enabled | True | | id | 6b6de8cbe36d439bb9a4ef90a7aa6f0e | | name | glance | | type | p_w_picpath | +- -+-+
Create the API endpoint of the mirror service
[root@linux-node1 ~] # openstack endpoint create-- region RegionOne p_w_picpath public http://192.168.56.11:9292+--------------+----------------------------------+| Field | Value | +-+ -- + | enabled | True | | id | 560d86e5e9074b4b9a98564298e2e3bf | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_ Id | 6b6de8cbe36d439bb9a4ef90a7aa6f0e | | service_name | glance | | service_type | p_w_picpath | | url | http://192.168.56.11:9292 | +-- + [root@linux-node1 ~] # openstack endpoint create-- region RegionOne p_w_picpath internal http://192.168.56.11:9292+--------------+----------------------------------+| Field | Value | +-+ -- + | enabled | True | | id | 9f9bf0ef9e804099b2a11a94d8181e48 | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | | 6b6de8cbe36d439bb9a4ef90a7aa6f0e | | service_name | glance | | service_type | p_w_picpath | | url | http://192.168.56.11:9292 | +-- + [| Root@linux-node1 ~] # openstack endpoint create-region RegionOne p_w_picpath admin http://192.168.56.11:9292+--------------+----------------------------------+| Field | Value | +-+- -- + | enabled | True | | id | f7008f53f5664a6f81b90841fee66c93 | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | | 6b6de8cbe36d439bb9a4ef90a7aa6f0e | | service_name | glance | | service_type | p_w_picpath | | url | http://192.168.56.11:9292 | +-+-+ |
Verify that the creation is successful
[root@linux-node1 ~] # openstack p_w_picpath list [root@linux-node1 ~] # glance pendant pictureListListListMUMMUFUPULFUR | Name | +-- + [root@linux-node1 ~] # execute the above two commands. If the returned result is the same as the above result, the service is registered successfully. 8. Upload image
Using the QCOW2 disk format, the bare container format uploads the mirror to the mirror service and sets it to public so that all projects can access it
[root@linux-node1] # openstack p_w_picpath create "cirros"-- file cirros-0.3.4-x86_64-disk.img-- disk-format qcow2-- container-format bare-- public+-+ -+ | Field | Value | +-+-- + | checksum | ee1eca47dc88f4879d8a229cc70a07c6 | | container_format | bare | | created_at | 2016-10-27T16:21:42Z | | disk_format | qcow2 | | file | / v2andpumped _ | Picpaths/29d99654-ba91-4d04-8808-e1b8d16861fb/file | | id | 29d99654-ba91-4d04-8808-e1b8d16861fb | | min_disk | 0 | min_ram | 0 | name | cirros | | owner | 53f72af1420a4d098d48f2c82d7e9ec7 | | protected | False | | schema | / v2/schemas/p_w_picpath | | size | 13287936 | | | status | active | | tags | updated_at | 2016-10-27T16:21:43Z | Virtual_size | None | | visibility | public | +-- -+
Check whether the image is created successfully
[root@linux-node1 ~] # openstack p_w_picpath list+--+ | ID | Name | Status | +-- -+ | 29d99654-ba91-4d04-8808-e1b8d16861fb | cirros | active | +-+ [root@linux-node1 ~] # glance p_w_picpath -list+--+-+ | ID | Name | +-+-+ | 29d99654-ba91-4d04-8808-e1b8d16861fb | cirros | +-- +
The directory where the image is uploaded
[root@linux-node1 ~] # cd / var/lib/glance/p_w_picpaths/ [root @ linux-node1 p_w_picpaths] # ls29d99654-ba91-4d04-8808-e1b8d16861fb
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.