Installazione e configurazione del servizio Image (Glance)
Installazione Glance
Server designato per l'installazione: hostname1.domain.
Configurazione Glance
- Rimuovere, se esiste, il file
/var/lib/glance/glance.db
(cioè il DB sqlite). Verrà utilizzato MySQL.
- Collegarsi su MySQL da linea di comando lanciando
mysql -u root -p
e digitando la password dell'utente root.
Editare i file di configurazione di Glance
- Infine inizializzare il DB "glance":
# glance-manage db_sync
- Now you can populate or migrate the database
# glance-manage db_sync
Troubleshooting
- To begin troubleshooting, look at the logs in the
/var/log/glance/registry.log
or /var/log/glance/api.log
- You can find the version of the installation by using the
glance --version
command. The version number 2012.1 corresponds with the Essex release.
- Obtain a test image
# mkdir /tmp/images
# cd /tmp/images/
# wget http://smoser.brickies.net/ubuntu/ttylinux-uec/ttylinux-uec-amd64-12.1_2.6.35-22_1.tar.gz
# tar -zxvf ttylinux-uec-amd64-12.1_2.6.35-22_1.tar.gz
# glance -v -d --os_username=$OS_USERNAME --os_password=$OS_PASSWORD --os_tenant=$OS_TENANT_NAME --os_auth_url=$KEYSTONE5000 add name="tty-linux-kernel" disk_format=aki container_format=aki < ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz
==============================================================================================[100%] 8.36M/s, ETA 0h 0m 0s
Added new image with ID: 8393828d-b226-434c-b0ea-179674fa4329
Returned the following metadata for the new image:
checksum => 3ed2965d3f8d877a3ee3e061fd648e9a
container_format => aki
created_at => 2012-08-29T14:15:57
deleted => False
deleted_at => None
disk_format => aki
id => 8393828d-b226-434c-b0ea-179674fa4329
is_public => False
min_disk => 0
min_ram => 0
name => tty-linux-kernel
owner => c10d9c9f296b47f8a1212dd7a98357e0
properties => {}
protected => False
size => 4404752
status => active
updated_at => 2012-08-29T14:15:57
Completed in 0.7154 sec.
# glance -v -d --os_username=$OS_USERNAME --os_password=$OS_PASSWORD --os_tenant=$OS_TENANT_NAME --os_auth_url=$KEYSTONE5000 add name="tty-linux-ramdisk" disk_format=ari container_format=ari < ttylinux-uec-amd64-12.1_2.6.35-22_1-loader
========================================================================================[100%] 934.475402K/s, ETA 0h 0m 0s
Added new image with ID: 3db3e2dc-9d2f-40ff-8519-af7d04f8146a
Returned the following metadata for the new image:
checksum => 644cf7d6d9e7b41d527e30e8e8c685a4
container_format => ari
created_at => 2012-08-29T14:28:38
deleted => False
deleted_at => None
disk_format => ari
id => 3db3e2dc-9d2f-40ff-8519-af7d04f8146a
is_public => False
min_disk => 0
min_ram => 0
name => tty-linux-ramdisk
owner => c10d9c9f296b47f8a1212dd7a98357e0
properties => {}
protected => False
size => 96629
status => active
updated_at => 2012-08-29T14:28:39
Completed in 0.4333 sec.
# glance -v -d --os_username=$OS_USERNAME --os_password=$OS_PASSWORD --os_tenant=$OS_TENANT_NAME --os_auth_url=$KEYSTONE5000 add name="tty-linux" disk_format=ami container_format=ami kernel_id=8393828d-b226-434c-b0ea-179674fa4329 ramdisk_id=3db3e2dc-9d2f-40ff-8519-af7d04f8146a < ttylinux-uec-amd64-12.1_2.6.35-22_1.img
==============================================================================================[100%] 59.7M/s, ETA 0h 0m 0s
Added new image with ID: df3422c6-58f5-4d3d-8de2-b1b522ab4152
Returned the following metadata for the new image:
checksum => 10047a119149e08fb206eea89832eee0
container_format => ami
created_at => 2012-08-29T14:32:05
deleted => False
deleted_at => None
disk_format => ami
id => df3422c6-58f5-4d3d-8de2-b1b522ab4152
is_public => False
min_disk => 0
min_ram => 0
name => tty-linux
owner => c10d9c9f296b47f8a1212dd7a98357e0
properties => {u'kernel_id': u'8393828d-b226-434c-b0ea-179674fa4329', u'ramdisk_id': u'3db3e2dc-9d2f-40ff-8519-af7d04f8146a'}
protected => False
size => 25165824
status => active
updated_at => 2012-08-29T14:32:05
Completed in 0.5622 sec.
# glance index
ID Name Disk Format Container Format Size
------------------------------------ ------------------------------ -------------------- -------------------- --------------
df3422c6-58f5-4d3d-8de2-b1b522ab4152 tty-linux ami ami 25165824
3db3e2dc-9d2f-40ff-8519-af7d04f8146a tty-linux-ramdisk ari ari 96629
8393828d-b226-434c-b0ea-179674fa4329 tty-linux-kernel aki aki 4404752
--
PaoloVeronesi - 2012-08-30
This topic: MarcheCloud
> GestioneOpenstack > InstallingAndConfiguringGlance
Topic revision: r3 - 2012-10-10 - EnricoFattibene