Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
openstack [2012/12/20 14:24] – [Keystone] madko | openstack [2016/02/04 18:52] (Version actuelle) – madko | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | Installation [[: | ||
+ | |||
+ | |||
====== Serveur ====== | ====== Serveur ====== | ||
+ | |||
Appelé aussi controller. Les RPMs nécessaires sont dans le dépôt EPEL. | Appelé aussi controller. Les RPMs nécessaires sont dans le dépôt EPEL. | ||
- | | + | |
- | yum install dnsmasq-utils dbus | + | < |
- | + | yum install -y openstack-utils qpid-cpp-server avahi | |
+ | yum install dnsmasq-utils dbus | ||
+ | </ | ||
+ | |||
+ | |||
+ | Le paquet openstack-utils fournit des scripts intéressants, | ||
+ | |||
+ | |||
+ | Le service qpid-cpp-server implémente la couche message bus type RabbitMQ. | ||
+ | |||
Dans / | Dans / | ||
- | | + | |
- | auth=no | + | |
- | + | < | |
+ | cluster-mechanism=DIGEST-MD5 ANONYMOUS | ||
+ | auth=no | ||
+ | </ | ||
+ | |||
Installation des paquets: | Installation des paquets: | ||
- | | + | |
- | + | ||
+ | < | ||
+ | yum install openstack* | ||
+ | </ | ||
+ | |||
===== Création des Bases ===== | ===== Création des Bases ===== | ||
- | | + | |
- | nova-manage db sync | + | < |
- | openstack-db --service glance --init | + | openstack-db --service nova --init |
- | openstack-db --service cinder --init | + | nova-manage db sync |
- | + | openstack-db --service glance --init | |
+ | openstack-db --service cinder --init | ||
+ | </ | ||
===== Lancer les services connexes ===== | ===== Lancer les services connexes ===== | ||
- | | + | |
- | chkconfig qpidd on | + | < |
- | service libvirtd restart | + | service qpidd restart |
- | chkconfig libvirtd on | + | chkconfig qpidd on |
+ | service libvirtd restart | ||
+ | chkconfig libvirtd on | ||
+ | </ | ||
===== Lancer glance ===== | ===== Lancer glance ===== | ||
- | | + | |
- | chkconfig openstack-glance-api on | + | < |
- | service openstack-glance-registry restart | + | service openstack-glance-api restart |
- | chkconfig openstack-glance-registry on | + | chkconfig openstack-glance-api on |
+ | service openstack-glance-registry restart | ||
+ | chkconfig openstack-glance-registry on | ||
+ | </ | ||
===== volumes cinder ===== | ===== volumes cinder ===== | ||
+ | |||
La couche openstack cinder (volume en mode block) s' | La couche openstack cinder (volume en mode block) s' | ||
- | | + | |
- | service openstack-cinder-volume restart | + | |
- | chkconfig openstack-cinder-volume on | + | < |
- | + | vgcreate cinder-volumes / | |
+ | service openstack-cinder-volume restart | ||
+ | chkconfig openstack-cinder-volume on | ||
+ | </ | ||
+ | |||
Il est possible pour des tests d' | Il est possible pour des tests d' | ||
+ | |||
===== services nova ===== | ===== services nova ===== | ||
- | | + | |
- | for svc in api objectstore compute network scheduler cert; do chkconfig openstack-nova-$svc on; done | + | < |
+ | for svc in api objectstore compute network scheduler cert; do service openstack-nova-$svc restart; done | ||
+ | for svc in api objectstore compute network scheduler cert; do chkconfig openstack-nova-$svc on; done | ||
+ | </ | ||
===== Keystone ===== | ===== Keystone ===== | ||
+ | |||
Pour initialiser le service keystone: | Pour initialiser le service keystone: | ||
- | | + | |
+ | |||
+ | < | ||
+ | openstack-db --service keystone --init | ||
+ | </ | ||
Un fichier pour faciliter l' | Un fichier pour faciliter l' | ||
- | | + | |
- | export ADMIN_TOKEN=$(openssl rand -hex 10) | + | |
- | export OS_USERNAME=admin | + | < |
- | export OS_PASSWORD=master | + | cat> keystonerc << |
- | export OS_TENANT_NAME=admin | + | export ADMIN_TOKEN=$(openssl rand -hex 10) |
- | export OS_AUTH_URL=http:// | + | export OS_USERNAME=admin |
- | export SERVICE_ENDPOINT=http:// | + | export OS_PASSWORD=master |
- | export SERVICE_TOKEN=\$ADMIN_TOKEN | + | export OS_TENANT_NAME=admin |
- | _EOF | + | export OS_AUTH_URL=http:// |
+ | export SERVICE_ENDPOINT=http:// | ||
+ | export SERVICE_TOKEN=\$ADMIN_TOKEN | ||
+ | _EOF | ||
+ | </ | ||
Ce fichier doit être sourcé: | Ce fichier doit être sourcé: | ||
- | | + | |
+ | |||
+ | < | ||
+ | source ./ | ||
+ | </ | ||
Configuration du token d' | Configuration du token d' | ||
- | | + | |
- | + | ||
- | service openstack-keystone restart | + | < |
- | chkconfig openstack-keystone on | + | openstack-config --set / |
+ | |||
+ | service openstack-keystone restart | ||
+ | chkconfig openstack-keystone on | ||
+ | </ | ||
Chargement d'un jeu de données de test: | Chargement d'un jeu de données de test: | ||
- | | + | |
+ | |||
+ | < | ||
+ | ADMIN_PASSWORD=$OS_PASSWORD SERVICE_PASSWORD=servicepass openstack-keystone-sample-data | ||
+ | </ | ||
Pour vérifier que l' | Pour vérifier que l' | ||
- | | + | |
+ | |||
+ | < | ||
+ | keystone user-list | ||
+ | </ | ||
Indiquer que nova doit reposer sur l' | Indiquer que nova doit reposer sur l' | ||
- | openstack-config --set / | ||
- | openstack-config --set / | ||
- | openstack-config --set / | ||
- | openstack-config --set / | ||
- | Redemarrer les services concernés: | + | |
- | for svc in api compute; do service openstack-nova-$svc restart; done | + | < |
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | </ | ||
+ | |||
+ | |||
+ | Redemarrer les services concernés: for svc in api compute; do service openstack-nova-$svc restart; done | ||
Vérifier que la communication avec nova fonctionne: | Vérifier que la communication avec nova fonctionne: | ||
- | | + | |
+ | |||
+ | < | ||
+ | nova flavor-list | ||
+ | </ | ||
===== Configuration de Glance ===== | ===== Configuration de Glance ===== | ||
- | | + | |
- | openstack-config --set / | + | < |
- | openstack-config --set / | + | openstack-config --set / |
- | openstack-config --set / | + | openstack-config --set / |
- | openstack-config --set / | + | openstack-config --set / |
- | openstack-config --set / | + | openstack-config --set / |
- | openstack-config --set / | + | openstack-config --set / |
- | openstack-config --set / | + | openstack-config --set / |
- | + | openstack-config --set / | |
+ | openstack-config --set / | ||
+ | </ | ||
+ | |||
Redemarrer les services concernés: | Redemarrer les services concernés: | ||
- | | + | |
+ | |||
+ | < | ||
+ | for svc in api registry; do service openstack-glance-$svc restart; done | ||
+ | </ | ||
Lancer l' | Lancer l' | ||
- | | + | |
+ | |||
+ | < | ||
+ | glance index | ||
+ | </ | ||
====== Client ====== | ====== Client ====== | ||
+ | |||
Pour installer un noeud OpenStack (hyperviseur): | Pour installer un noeud OpenStack (hyperviseur): | ||
- | | + | |
+ | < | ||
+ | yum install openstack-nova python-keystone openstack-utils | ||
+ | </ | ||
Les RPMs sont dispo au moins dans epel-testing. | Les RPMs sont dispo au moins dans epel-testing. | ||
+ | |||
Pour configurer le client: | Pour configurer le client: | ||
- | | + | |
- | openstack-config --set / | + | < |
- | openstack-config --set / | + | openstack-config --set / |
- | openstack-config --set / | + | openstack-config --set / |
- | openstack-config --set / | + | openstack-config --set / |
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | </ | ||
L' | L' | ||
+ | |||
Pour configurer la partie réseaux: | Pour configurer la partie réseaux: | ||
+ | |||
A FAIRE! | A FAIRE! | ||
+ | |||
Démarrer le service: | Démarrer le service: | ||
- | | + | |
- | chkconfig openstack-nova-compute on | + | < |
+ | service openstack-nova-compute start | ||
+ | chkconfig openstack-nova-compute on | ||
+ | </ |