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:newton:controller [2016/10/09 15:23] – [Création de l'utilisateur et service Neutron dans OpenStack] madko | openstack:newton:controller [2016/10/14 06:37] (Version actuelle) – [Configuration de HEAT] madko | ||
---|---|---|---|
Ligne 357: | Ligne 357: | ||
[mks] | [mks] | ||
[neutron] | [neutron] | ||
+ | url = http:// | ||
+ | auth_url = http:// | ||
+ | auth_type = password | ||
+ | project_domain_name = default | ||
+ | user_domain_name = default | ||
+ | region_name = RegionOne | ||
+ | project_name = service | ||
+ | username = neutron | ||
+ | password = neutron | ||
+ | service_metadata_proxy = True | ||
+ | metadata_proxy_shared_secret = METADATA_SECRET | ||
[osapi_v21] | [osapi_v21] | ||
[oslo_concurrency] | [oslo_concurrency] | ||
Ligne 401: | Ligne 412: | ||
systemctl start openstack-nova-api openstack-nova-consoleauth openstack-nova-scheduler openstack-nova-conductor openstack-nova-novncproxy | systemctl start openstack-nova-api openstack-nova-consoleauth openstack-nova-scheduler openstack-nova-conductor openstack-nova-novncproxy | ||
</ | </ | ||
+ | |||
+ | |||
===== Service de gestion des réseaux Neutron ===== | ===== Service de gestion des réseaux Neutron ===== | ||
Ligne 448: | Ligne 461: | ||
Fichier de configuration / | Fichier de configuration / | ||
+ | < | ||
+ | [DEFAULT] | ||
+ | auth_strategy = keystone | ||
+ | core_plugin = ml2 | ||
+ | service_plugins = router | ||
+ | allow_overlapping_ips = True | ||
+ | notify_nova_on_port_status_changes = true | ||
+ | notify_nova_on_port_data_changes = true | ||
+ | rpc_backend = rabbit | ||
+ | [agent] | ||
+ | [cors] | ||
+ | [cors.subdomain] | ||
+ | [database] | ||
+ | connection = mysql+pymysql:// | ||
+ | [keystone_authtoken] | ||
+ | auth_uri = http:// | ||
+ | auth_url = http:// | ||
+ | memcached_servers = controller.internal: | ||
+ | auth_type = password | ||
+ | project_domain_name = default | ||
+ | user_domain_name = default | ||
+ | project_name = service | ||
+ | username = neutron | ||
+ | password = neutron | ||
+ | [matchmaker_redis] | ||
+ | [nova] | ||
+ | auth_url = http:// | ||
+ | auth_type = password | ||
+ | project_domain_name = default | ||
+ | user_domain_name = default | ||
+ | region_name = RegionOne | ||
+ | project_name = service | ||
+ | username = nova | ||
+ | password = nova | ||
+ | [oslo_concurrency] | ||
+ | lock_path = / | ||
+ | [oslo_messaging_amqp] | ||
+ | [oslo_messaging_notifications] | ||
+ | [oslo_messaging_rabbit] | ||
+ | rabbit_host = bdd | ||
+ | rabbit_userid = openstack | ||
+ | rabbit_password = RABBIT_PASS | ||
+ | [oslo_messaging_zmq] | ||
+ | [oslo_policy] | ||
+ | [qos] | ||
+ | [quotas] | ||
+ | [ssl] | ||
+ | </ | ||
- | ===== Dashboard Horizon ===== | + | Configuration du plugin ML2 dans / |
+ | < | ||
+ | [DEFAULT] | ||
+ | [ml2] | ||
+ | type_drivers = flat, | ||
+ | tenant_network_types = vlan, | ||
+ | mechanism_drivers = openvswitch, | ||
+ | extension_drivers = port_security | ||
+ | [ml2_type_flat] | ||
+ | flat_networks = external | ||
+ | [ml2_type_geneve] | ||
+ | vni_ranges = 5000:7000 | ||
+ | [ml2_type_gre] | ||
+ | tunnel_id_ranges = 100:999 | ||
+ | [ml2_type_vlan] | ||
+ | network_vlan_ranges = external, | ||
+ | [ml2_type_vxlan] | ||
+ | vni_ranges = 1000:2000 | ||
+ | [securitygroup] | ||
+ | firewall_driver = iptables_hybrid | ||
+ | </ | ||
+ | |||
+ | Pour utiliser le plugin ML2 : | ||
+ | |||
+ | < | ||
+ | ln -s / | ||
+ | </ | ||
+ | |||
+ | Initialiser la base Neutron : | ||
+ | |||
+ | < | ||
+ | su -s /bin/sh -c " | ||
+ | </ | ||
+ | |||
+ | Pour activer et démarrer les services Neutron : | ||
+ | |||
+ | < | ||
+ | systemctl enable neutron-server | ||
+ | systemctl start neutron-server | ||
+ | </ | ||
+ | |||
+ | La suite se passe sur le [[: | ||
+ | |||
+ | Les [[: | ||
+ | |||
+ | |||
+ | ===== Dashboard Horizon ===== | ||
==== Installation du dashboard ==== | ==== Installation du dashboard ==== | ||
Ligne 459: | Ligne 566: | ||
yum install openstack-dashboard | yum install openstack-dashboard | ||
</ | </ | ||
+ | |||
+ | |||
==== Configuration du dashboard ==== | ==== Configuration du dashboard ==== | ||
Ligne 464: | Ligne 573: | ||
< | < | ||
+ | # -*- coding: utf-8 -*- | ||
+ | |||
import os | import os | ||
from django.utils.translation import ugettext_lazy as _ | from django.utils.translation import ugettext_lazy as _ | ||
Ligne 765: | Ligne 876: | ||
< | < | ||
systemctl restart httpd | systemctl restart httpd | ||
+ | </ | ||
+ | ===== Service d' | ||
+ | |||
+ | ==== Création de la base SQL pour HEAT ==== | ||
+ | |||
+ | Se connecter au serveur SQL : | ||
+ | |||
+ | < | ||
+ | CREATE DATABASE heat; | ||
+ | GRANT ALL PRIVILEGES ON heat.* TO ' | ||
+ | GRANT ALL PRIVILEGES ON heat.* TO ' | ||
+ | </ | ||
+ | ==== Création des utilisateus et services HEAT dans OpenStack ==== | ||
+ | |||
+ | Sur le serveur d' | ||
+ | |||
+ | < | ||
+ | sourceadmin-openrc | ||
+ | </ | ||
+ | |||
+ | Puis : | ||
+ | |||
+ | < | ||
+ | openstack user create --domain default --password-prompt heat | ||
+ | openstack role add --project service --user heat admin | ||
+ | openstack service create --name heat --description " | ||
+ | openstack service create --name heat-cfn --description " | ||
+ | </ | ||
+ | |||
+ | Création des endpoints pour l'API HEAT : | ||
+ | |||
+ | < | ||
+ | openstack endpoint create --region RegionOne orchestration public http:// | ||
+ | openstack endpoint create --region RegionOne orchestration internal http:// | ||
+ | openstack endpoint create --region RegionOne orchestration admin http:// | ||
+ | openstack endpoint create --region RegionOne cloudformation public http:// | ||
+ | openstack endpoint create --region RegionOne cloudformation internal http:// | ||
+ | openstack endpoint create --region RegionOne cloudformation admin http:// | ||
+ | </ | ||
+ | |||
+ | Création d'un domaine qui contiendra les " | ||
+ | |||
+ | < | ||
+ | openstack domain create --description "Stack projects and users" heat | ||
+ | openstack user create --domain heat --password heat_domain_admin heat_domain_admin | ||
+ | openstack role add --domain heat --user-domain heat --user heat_domain_admin admin | ||
+ | openstack role create heat_stack_owner | ||
+ | openstack role create heat_stack_user | ||
+ | </ | ||
+ | |||
+ | Pour autoriser l' | ||
+ | |||
+ | < | ||
+ | openstack role add --project demo --user demo heat_stack_owner | ||
+ | </ | ||
+ | ==== Installation de HEAT ==== | ||
+ | |||
+ | Installer les paquets suivants : | ||
+ | |||
+ | < | ||
+ | yum install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine | ||
+ | </ | ||
+ | ==== Configuration de HEAT ==== | ||
+ | |||
+ | Fichier / | ||
+ | |||
+ | < | ||
+ | [DEFAULT] | ||
+ | heat_metadata_server_url = http:// | ||
+ | heat_waitcondition_server_url = http:// | ||
+ | stack_domain_admin = heat_domain_admin | ||
+ | stack_domain_admin_password = heat_domain_admin | ||
+ | stack_user_domain_name = heat | ||
+ | rpc_backend = rabbit | ||
+ | [auth_password] | ||
+ | [clients] | ||
+ | [clients_aodh] | ||
+ | [clients_barbican] | ||
+ | [clients_ceilometer] | ||
+ | [clients_cinder] | ||
+ | [clients_designate] | ||
+ | [clients_glance] | ||
+ | [clients_heat] | ||
+ | [clients_keystone] | ||
+ | auth_uri = http:// | ||
+ | [clients_magnum] | ||
+ | [clients_manila] | ||
+ | [clients_mistral] | ||
+ | [clients_monasca] | ||
+ | [clients_neutron] | ||
+ | [clients_nova] | ||
+ | [clients_sahara] | ||
+ | [clients_senlin] | ||
+ | [clients_swift] | ||
+ | [clients_trove] | ||
+ | [clients_zaqar] | ||
+ | [cors] | ||
+ | [cors.subdomain] | ||
+ | [database] | ||
+ | connection = mysql+pymysql:// | ||
+ | [ec2authtoken] | ||
+ | auth_uri = http:// | ||
+ | [eventlet_opts] | ||
+ | [heat_api] | ||
+ | [heat_api_cfn] | ||
+ | [heat_api_cloudwatch] | ||
+ | [keystone_authtoken] | ||
+ | auth_uri = http:// | ||
+ | auth_url = http:// | ||
+ | memcached_servers = controller.internal: | ||
+ | auth_type = password | ||
+ | project_domain_name = default | ||
+ | user_domain_name = default | ||
+ | project_name = service | ||
+ | username = heat | ||
+ | password = heat | ||
+ | [matchmaker_redis] | ||
+ | [oslo_messaging_amqp] | ||
+ | [oslo_messaging_notifications] | ||
+ | [oslo_messaging_rabbit] | ||
+ | rabbit_host = bdd | ||
+ | rabbit_userid = openstack | ||
+ | rabbit_password = RABBIT_PASS | ||
+ | [oslo_messaging_zmq] | ||
+ | [oslo_middleware] | ||
+ | [oslo_policy] | ||
+ | [paste_deploy] | ||
+ | [profiler] | ||
+ | [revision] | ||
+ | [ssl] | ||
+ | [trustee] | ||
+ | auth_type = password | ||
+ | auth_url = http:// | ||
+ | username = heat | ||
+ | password = heat | ||
+ | user_domain_name = default | ||
+ | [volumes] | ||
+ | </ | ||
+ | |||
+ | Initialisation de la base HEAT : | ||
+ | |||
+ | < | ||
+ | su -s /bin/sh -c " | ||
+ | </ | ||
+ | |||
+ | Pour activer et démarrer les services en rapports avec HEAT : | ||
+ | |||
+ | < | ||
+ | systemctl start openstack-heat-api.service openstack-heat-api-cfn.service openstack-heat-engine.service | ||
</ | </ | ||