tech:notes_openstack_glance_images
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tech:notes_openstack_glance_images [2025/06/02 14:58] – Jean-Baptiste | tech:notes_openstack_glance_images [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Notes OpenStack Glance (images) | ||
| + | |||
| + | ## Install de Glance (Pour gérer les images) | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | ~~~bash | ||
| + | sudo yum install openstack-glance penstack-glance-doc | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | sudo su - postgres | ||
| + | ~~~ | ||
| + | |||
| + | ~~~sql | ||
| + | CREATE ROLE glanceuser WITH LOGIN PASSWORD ' | ||
| + | CREATE DATABASE glance OWNER glanceuser ; | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | source openrc | ||
| + | openstack project create service | ||
| + | |||
| + | openstack user create --domain default --password-prompt glance | ||
| + | openstack role add --project service --user glance admin | ||
| + | openstack service create image --name glance --description " | ||
| + | |||
| + | openstack endpoint create --region RegionOne glance public http:// | ||
| + | ~~~ | ||
| + | |||
| + | Conf | ||
| + | * / | ||
| + | * / | ||
| + | |||
| + | |||
| + | `/ | ||
| + | ~~~ini | ||
| + | [DEFAULT] | ||
| + | debug = true | ||
| + | |||
| + | [database] | ||
| + | connection = postgresql:// | ||
| + | |||
| + | [glance_store] | ||
| + | stores = file,http | ||
| + | default_store = file | ||
| + | filesystem_store_datadir = / | ||
| + | |||
| + | [keystone_authtoken] | ||
| + | www_authenticate_uri = http:// | ||
| + | auth_type = password | ||
| + | project_domain_name = Default | ||
| + | user_domain_name = Default | ||
| + | project_name = service | ||
| + | username = glance | ||
| + | password = toor | ||
| + | |||
| + | [paste_deploy] | ||
| + | flavor = keystone | ||
| + | ~~~ | ||
| + | |||
| + | Idem pour `/ | ||
| + | |||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | su -s /bin/sh -c ' | ||
| + | |||
| + | mkdir / | ||
| + | chown glance: | ||
| + | |||
| + | systemctl start openstack-glance-api.service | ||
| + | systemctl start openstack-glance-registry.service | ||
| + | |||
| + | systemctl enable openstack-glance-api.service | ||
| + | systemctl enable openstack-glance-registry.service | ||
| + | ~~~ | ||
| + | |||
| + | Test | ||
| + | ~~~bash | ||
| + | openstack image list | ||
| + | |||
| + | wget http:// | ||
| + | openstack image create cirros --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --public | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | ## API CLI | ||
| + | |||
| + | `openstack.rc` | ||
| + | ~~~bash | ||
| + | |||
| + | unset $(set | grep _ENDPOINT_ | cut -d= -f1) | ||
| + | unset $(set | grep ^OS_ | cut -d= -f1) | ||
| + | |||
| + | export LC_ALL=C | ||
| + | # LC_ALL=C.UTF-8 | ||
| + | export OS_NO_CACHE=' | ||
| + | export OS_CACERT=/ | ||
| + | |||
| + | export OS_IDENTITY_API_VERSION=' | ||
| + | export OS_AUTH_URL=' | ||
| + | export OS_USERNAME=admin | ||
| + | export OS_PASSWORD=' | ||
| + | export OS_PROJECT_NAME=admin | ||
| + | export OS_USER_DOMAIN_NAME=Default | ||
| + | export OS_PROJECT_DOMAIN_NAME=Default | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | glance image-list | ||
| + | |||
| + | glance image-create --name plop --file plop.vmdk --disk-format vmdk --container-format bare --visibility private | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Policy | ||
| + | |||
| + | Voir | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | ### OpenStack Glance: allow user to create public images | ||
| + | |||
| + | Source : https:// | ||
| + | |||
