Installation [[:OpenStackLiberty|OpenStack Liberty]] ====== Serveur ====== Appelé aussi controller. Les RPMs nécessaires sont dans le dépôt EPEL. yum install -y openstack-utils qpid-cpp-server avahi yum install dnsmasq-utils dbus Le paquet openstack-utils fournit des scripts intéressants, dont le openstack-db. Le service qpid-cpp-server implémente la couche message bus type RabbitMQ. Dans /etc/qpidd.conf avoir: cluster-mechanism=DIGEST-MD5 ANONYMOUS auth=no Installation des paquets: yum install openstack* ===== Création des Bases ===== openstack-db --service nova --init nova-manage db sync openstack-db --service glance --init openstack-db --service cinder --init ===== Lancer les services connexes ===== service qpidd restart chkconfig qpidd on service libvirtd restart chkconfig libvirtd on ===== Lancer glance ===== service openstack-glance-api restart chkconfig openstack-glance-api on service openstack-glance-registry restart chkconfig openstack-glance-registry on ===== volumes cinder ===== La couche openstack cinder (volume en mode block) s'attend à disposer d'un VG nommé "cinder-volumes": vgcreate cinder-volumes /dev/mapper/damm0001 /dev/mapper/damm0000 service openstack-cinder-volume restart chkconfig openstack-cinder-volume on Il est possible pour des tests d'utiliser un VG dans un fichier en loopback. ===== services nova ===== 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 ===== Pour initialiser le service keystone: openstack-db --service keystone --init Un fichier pour faciliter l'authentification, via des variables d'environnement: cat> keystonerc <<_EOF export ADMIN_TOKEN=$(openssl rand -hex 10) export OS_USERNAME=admin export OS_PASSWORD=master export OS_TENANT_NAME=admin export OS_AUTH_URL=http://127.0.0.1:5000/v2.0/ export SERVICE_ENDPOINT=http://127.0.0.1:35357/v2.0/ export SERVICE_TOKEN=\$ADMIN_TOKEN _EOF Ce fichier doit être sourcé: source ./keystonerc Configuration du token d'administration: openstack-config --set /etc/keystone/keystone.conf DEFAULT admin_token $ADMIN_TOKEN service openstack-keystone restart chkconfig openstack-keystone on 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'accès à keystone fonctionne: keystone user-list Indiquer que nova doit reposer sur l'authentification via keystone: openstack-config --set /etc/nova/api-paste.ini filter:authtoken admin_tenant_name service openstack-config --set /etc/nova/api-paste.ini filter:authtoken admin_user nova openstack-config --set /etc/nova/api-paste.ini filter:authtoken admin_password servicepass openstack-config --set /etc/nova/nova.conf DEFAULT auth_strategy keystone 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: nova flavor-list ===== Configuration de Glance ===== openstack-config --set /etc/glance/glance-api.conf paste_deploy flavor keystone openstack-config --set /etc/glance/glance-registry.conf paste_deploy flavor keystone openstack-config --set /etc/glance/glance-api-paste.ini filter:authtoken admin_tenant_name service openstack-config --set /etc/glance/glance-api-paste.ini filter:authtoken admin_user glance openstack-config --set /etc/glance/glance-api-paste.ini filter:authtoken admin_password servicepass openstack-config --set /etc/glance/glance-registry-paste.ini filter:authtoken admin_tenant_name service openstack-config --set /etc/glance/glance-registry-paste.ini filter:authtoken admin_user glance openstack-config --set /etc/glance/glance-registry-paste.ini filter:authtoken admin_password servicepass Redemarrer les services concernés: for svc in api registry; do service openstack-glance-$svc restart; done Lancer l'indexation dans glance: glance index ====== Client ====== Pour installer un noeud OpenStack (hyperviseur): yum install openstack-nova python-keystone openstack-utils Les RPMs sont dispo au moins dans epel-testing. Pour configurer le client: openstack-config --set /etc/nova/nova.conf DEFAULT qpid_hostname pvidgsh101.pvi openstack-config --set /etc/nova/nova.conf DEFAULT sql_connection mysql://nova:nova@pvidgsh101.pvi/nova openstack-config --set /etc/nova/nova.conf DEFAULT glance_api_servers pvidgsh101.pvi:9292 openstack-config --set /etc/nova/nova.conf DEFAULT iscsi_ip_prefix 192.168.11.111 openstack-config --set /etc/nova/nova.conf DEFAULT auth_strategy keystone L'adresse du controleur openstack étant "pvidgsh101.pvi" et son IP 192.168.11.111. Pour configurer la partie réseaux: A FAIRE! Démarrer le service: service openstack-nova-compute start chkconfig openstack-nova-compute on