设为首页 收藏本站
查看: 869|回复: 0

[经验分享] install openstack by apt-get

[复制链接]

尚未签到

发表于 2017-6-26 17:38:05 | 显示全部楼层 |阅读模式
  1.  dashboard  安装
  Install the packages:
  # apt-get install openstack-dashboard
  Edit the /etc/openstack-dashboard/local_settings.py file and complete the following actions:
  Configure the dashboard to use OpenStack services on the controller node:
  OPENSTACK_HOST = "controller"
  Allow all hosts to access the dashboard:
  ALLOWED_HOSTS = ['*', ]
  Configure the memcached session storage service:
  SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
  CACHES = {
  'default': {
  'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
  'LOCATION': 'controller:11211',
  }
  }
  Note
  Comment out any other session storage configuration.
  Enable the Identity API version 3:
  OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
  Enable support for domains:
  OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
  Configure API versions:
  OPENSTACK_API_VERSIONS = {
  "identity": 3,
  "image": 2,
  "volume": 2,
  }
  Configure default as the default domain for users that you create via the dashboard:
  OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "default"
  Configure user as the default role for users that you create via the dashboard:
  OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
  If you chose networking option 1, disable support for layer-3 networking services:
  OPENSTACK_NEUTRON_NETWORK = {
  ...
  'enable_router': False,
  'enable_quotas': False,
  'enable_distributed_router': False,
  'enable_ha_router': False,
  'enable_lb': False,
  'enable_firewall': False,
  'enable_vpn': False,
  'enable_fip_topology_check': False,
  }
  Optionally, configure the time zone:
  TIME_ZONE = "TIME_ZONE"
  Replace TIME_ZONE with an appropriate time zone identifier. For more information, see the list of time zones.
  Finalize installation¶
  Reload the web server configuration:
  # service apache2 reload
  2. manila-api  manila-schedule  安装了
  Before you install and configure the Share File System service, you must create a database, service credentials, and API endpoints.
  To create the database, complete these steps:
  Use the database access client to connect to the database server as the root user:
  $ mysql -u root -p
  Create the manila database:
  CREATE DATABASE manila;
  Grant proper access to the manila database:
  GRANT ALL PRIVILEGES ON manila.* TO 'manila'@'localhost' \
  IDENTIFIED BY 'MANILA_DBPASS';
  GRANT ALL PRIVILEGES ON manila.* TO 'manila'@'%' \
  IDENTIFIED BY 'MANILA_DBPASS';
  Replace MANILA_DBPASS with a suitable password.
  Exit the database access client.
  Source the admin credentials to gain access to admin-only CLI commands:
  $ . admin-openrc
  To create the service credentials, complete these steps:
  Create a manila user:
  $ openstack user create --domain default --password-prompt manila
  User Password:
  Repeat User Password:
  +-----------+----------------------------------+
  | Field     | Value                            |
  +-----------+----------------------------------+
  | domain_id | e0353a670a9e496da891347c589539e9 |
  | enabled   | True                             |
  | id        | 83a3990fc2144100ba0e2e23886d8acc |
  | name      | manila                           |
  +-----------+----------------------------------+
  Add the admin role to the manila user:
  $ openstack role add --project service --user manila admin
  Note
  This command provides no output.
  Create the manila and manilav2 service entities:
  $ openstack service create --name manila \
  --description "OpenStack Shared File Systems" share
  +-------------+----------------------------------+
  | Field       | Value                            |
  +-------------+----------------------------------+
  | description | OpenStack Shared File Systems    |
  | enabled     | True                             |
  | id          | 82378b5a16b340aa9cc790cdd46a03ba |
  | name        | manila                           |
  | type        | share                            |
  +-------------+----------------------------------+
  $ openstack service create --name manilav2 \
  --description "OpenStack Shared File Systems" sharev2
  +-------------+----------------------------------+
  | Field       | Value                            |
  +-------------+----------------------------------+
  | description | OpenStack Shared File Systems    |
  | enabled     | True                             |
  | id          | 30d92a97a81a4e5d8fd97a32bafd7b88 |
  | name        | manilav2                         |
  | type        | sharev2                          |
  +-------------+----------------------------------+
  Note
  The Share File System services require two service entities.
  Create the Shared File Systems service API endpoints:
  $ openstack endpoint create --region RegionOne \
  share public http://controller:8786/v1/%\(tenant_id\)s
  +--------------+-----------------------------------------+
  | Field        | Value                                   |
  +--------------+-----------------------------------------+
  | enabled      | True                                    |
  | id           | 0bd2bbf8d28b433aaea56a254c69f69d        |
  | interface    | public                                  |
  | region       | RegionOne                               |
  | region_id    | RegionOne                               |
  | service_id   | 82378b5a16b340aa9cc790cdd46a03ba        |
  | service_name | manila                                  |
  | service_type | share                                   |
  | url          | http://controller:8786/v1/%(tenant_id)s |
  +--------------+-----------------------------------------+
  $ openstack endpoint create --region RegionOne \
  share internal http://controller:8786/v1/%\(tenant_id\)s
  +--------------+-----------------------------------------+
  | Field        | Value                                   |
  +--------------+-----------------------------------------+
  | enabled      | True                                    |
  | id           | a2859b5732cc48b5b083dd36dafb6fd9        |
  | interface    | internal                                |
  | region       | RegionOne                               |
  | region_id    | RegionOne                               |
  | service_id   | 82378b5a16b340aa9cc790cdd46a03ba        |
  | service_name | manila                                  |
  | service_type | share                                   |
  | url          | http://controller:8786/v1/%(tenant_id)s |
  +--------------+-----------------------------------------+
  $ openstack endpoint create --region RegionOne \
  share admin http://controller:8786/v1/%\(tenant_id\)s
  +--------------+-----------------------------------------+
  | Field        | Value                                   |
  +--------------+-----------------------------------------+
  | enabled      | True                                    |
  | id           | f7f46df93a374cc49c0121bef41da03c        |
  | interface    | admin                                   |
  | region       | RegionOne                               |
  | region_id    | RegionOne                               |
  | service_id   | 82378b5a16b340aa9cc790cdd46a03ba        |
  | service_name | manila                                  |
  | service_type | share                                   |
  | url          | http://controller:8786/v1/%(tenant_id)s |
  +--------------+-----------------------------------------+
  $ openstack endpoint create --region RegionOne \
  sharev2 public http://controller:8786/v2/%\(tenant_id\)s
  +--------------+-----------------------------------------+
  | Field        | Value                                   |
  +--------------+-----------------------------------------+
  | enabled      | True                                    |
  | id           | d63cc0d358da4ea680178657291eddc1        |
  | interface    | public                                  |
  | region       | RegionOne                               |
  | region_id    | RegionOne                               |
  | service_id   | 30d92a97a81a4e5d8fd97a32bafd7b88        |
  | service_name | manilav2                                |
  | service_type | sharev2                                 |
  | url          | http://controller:8786/v2/%(tenant_id)s |
  +--------------+-----------------------------------------+
  $ openstack endpoint create --region RegionOne \
  sharev2 internal http://controller:8786/v2/%\(tenant_id\)s
  +--------------+-----------------------------------------+
  | Field        | Value                                   |
  +--------------+-----------------------------------------+
  | enabled      | True                                    |
  | id           | afc86e5f50804008add349dba605da54        |
  | interface    | internal                                |
  | region       | RegionOne                               |
  | region_id    | RegionOne                               |
  | service_id   | 30d92a97a81a4e5d8fd97a32bafd7b88        |
  | service_name | manilav2                                |
  | service_type | sharev2                                 |
  | url          | http://controller:8786/v2/%(tenant_id)s |
  +--------------+-----------------------------------------+
  $ openstack endpoint create --region RegionOne \
  sharev2 admin http://controller:8786/v2/%\(tenant_id\)s
  +--------------+-----------------------------------------+
  | Field        | Value                                   |
  +--------------+-----------------------------------------+
  | enabled      | True                                    |
  | id           | e814a0cec40546e98cf0c25a82498483        |
  | interface    | admin                                   |
  | region       | RegionOne                               |
  | region_id    | RegionOne                               |
  | service_id   | 30d92a97a81a4e5d8fd97a32bafd7b88        |
  | service_name | manilav2                                |
  | service_type | sharev2                                 |
  | url          | http://controller:8786/v2/%(tenant_id)s |
  +--------------+-----------------------------------------+
  Note
  The Share File System services require endpoints for each service entity.
  Install and configure components¶
  Install the packages:
  # apt-get install manila-api manila-scheduler \
  python-manilaclient
  Edit the /etc/manila/manila.conf file and complete the following actions:
  In the [database] section, configure database access:
  [database]
  ...
  connection = mysql+pymysql://manila:MANILA_DBPASS@controller/manila
  Replace MANILA_DBPASS with the password you chose for the Share File System database.
  In the [DEFAULT] and [oslo_messaging_rabbit] sections, configure RabbitMQ message queue access:
  [DEFAULT]
  ...
  rpc_backend = rabbit
  [oslo_messaging_rabbit]
  ...
  rabbit_host = controller
  rabbit_userid = openstack
  rabbit_password = RABBIT_PASS
  Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ.
  In the [DEFAULT] section, set the following config values:
  [DEFAULT]
  ...
  default_share_type = default_share_type
  rootwrap_config = /etc/manila/rootwrap.conf
  In the [DEFAULT] and [keystone_authtoken] sections, configure Identity service access:
  [DEFAULT]
  ...
  auth_strategy = keystone
  [keystone_authtoken]
  ...
  memcached_servers = controller:11211
  auth_uri = http://controller:5000
  auth_url = http://controller:35357
  auth_type = password
  project_domain_name = default
  user_domain_name = default
  project_name = service
  username = manila
  password = MANILA_PASS
  Replace MANILA_PASS with the password you chose for the manila user in the Identity service.
  In the [DEFAULT] section, configure the my_ip option to use the management interface IP address of the controller node:
  [DEFAULT]
  ...
  my_ip = 10.0.0.11
  In the [oslo_concurrency] section, configure the lock path:
  [oslo_concurrency]
  ...
  lock_path = /var/lib/manila/tmp
  Populate the Share File System database:
  # su -s /bin/sh -c "manila-manage db sync" manila
  Note
  Ignore any deprecation messages in this output.
  Finalize installation¶
  Restart the Share File Systems services:
  # service manila-scheduler restart
  # service manila-api restart
  2.安装manila-share服务
  Install the packages:
  # apt-get install manila-share python-pymysql
  Edit the /etc/manila/manila.conf file and complete the following actions:
  In the [database] section, configure database access:
  [database]
  ...
  connection = mysql+pymysql://manila:MANILA_DBPASS@controller/manila
  Replace MANILA_DBPASS with the password you chose for the Share File System database.
  In the [DEFAULT] and [oslo_messaging_rabbit] sections, configure RabbitMQ message queue access:
  [DEFAULT]
  ...
  rpc_backend = rabbit
  [oslo_messaging_rabbit]
  ...
  rabbit_host = controller
  rabbit_userid = openstack
  rabbit_password = RABBIT_PASS
  Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ.
  In the [DEFAULT] section, set the following config values:
  [DEFAULT]
  ...
  default_share_type = default_share_type
  rootwrap_config = /etc/manila/rootwrap.conf
  In the [DEFAULT] and [keystone_authtoken] sections, configure Identity service access:
  [DEFAULT]
  ...
  auth_strategy = keystone
  [keystone_authtoken]
  ...
  memcached_servers = controller:11211
  auth_uri = http://controller:5000
  auth_url = http://controller:35357
  auth_type = password
  project_domain_name = default
  user_domain_name = default
  project_name = service
  username = manila
  password = MANILA_PASS
  Replace MANILA_PASS with the password you chose for the manila user in the Identity service.
  In the [DEFAULT] section, configure the my_ip option:
  [DEFAULT]
  ...
  my_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
  Replace MANAGEMENT_INTERFACE_IP_ADDRESS with the IP address of the management network interface on your share node, typically 10.0.0.41 for the first node in the example architecture.
  In the [oslo_concurrency] section, configure the lock path:
  [oslo_concurrency]
  ...
  lock_path = /var/lib/manila/tmp
  Configure share server management support options¶
  The share node can support two modes, with and without the handling of share servers. The mode depends on driver support.
  Option 1 deploys the service without driver support for share management. In this mode, the service does not do anything related to networking. The operator must ensure network connectivity between instances and the NFS server. This option uses LVM driver that requires LVM and NFS packages as well as an additional disk for the manila-share LVM volume group.
  Option 2 deploys the service with driver support for share management. In this mode, the service requires Compute (nova), Networking (neutron) and Block storage (cinder) services for managing share servers. The information used for creating share servers is configured as share networks. This option uses the generic driver with the handling of share servers capacity and requires attaching the selfservice network to a router.
  Warning
  A bug prevents using both driver options on the same share node. For more information, see LVM Driver section at the Configuration Reference.
  Choose one of the following options to configure the share driver. Afterwards, return here and proceed to Finalize installation.
  Shared File Systems Option 1: No driver support for share servers management
  Shared File Systems Option 2: Driver support for share servers management
  Finalize installation¶
  Start the Share File Systems service including its dependencies:
  这里选择模式2安装
  Install the Networking service components:
  # apt-get install neutron-plugin-linuxbridge-agent
  Configure components¶
  Note
  Default configuration files vary by distribution. You might need to add these sections and options rather than modifying existing sections and options. Also, an ellipsis (...) in the configuration snippets indicates potential default configuration options that you should retain.
  Edit the /etc/manila/manila.conf file and complete the following actions:
  In the [DEFAULT] section, enable the generic driver and the NFS/CIFS protocols:
  [DEFAULT]
  ...
  enabled_share_backends = generic
  enabled_share_protocols = NFS,CIFS
  Note
  Back end names are arbitrary. As an example, this guide uses the name of the driver.
  In the [neutron], [nova], and [cinder] sections, enable authentication for those services:
  [neutron]
  ...
  url = http://controller:9696
  auth_uri = http://controller:5000
  auth_url = http://controller:35357
  memcached_servers = controller:11211
  auth_type = password
  project_domain_name = default
  user_domain_name = default
  region_name = RegionOne
  project_name = service
  username = neutron
  password = NEUTRON_PASS
  [nova]
  ...
  auth_uri = http://controller:5000
  auth_url = http://controller:35357
  memcached_servers = controller:11211
  auth_type = password
  project_domain_name = default
  user_domain_name = default
  region_name = RegionOne
  project_name = service
  username = nova
  password = NOVA_PASS
  [cinder]
  ...
  auth_uri = http://controller:5000
  auth_url = http://controller:35357
  memcached_servers = controller:11211
  auth_type = password
  project_domain_name = default
  user_domain_name = default
  region_name = RegionOne
  project_name = service
  username = cinder
  password = CINDER_PASS
  In the [generic] section, configure the generic driver:
  [generic]
  share_backend_name = GENERIC
  share_driver = manila.share.drivers.generic.GenericShareDriver
  driver_handles_share_servers = True
  service_instance_flavor_id = 100
  service_image_name = manila-service-image
  service_instance_user = manila
  service_instance_password = manila
  interface_driver = manila.network.linux.interface.BridgeInterfaceDriver
  Note
  You can also use SSH keys instead of password authentication for service instance credentials.
  最后重启manila-share
  # service manila-share restart
  3.cinder 安装
  Before you install and configure the Block Storage service, you must create a database, service credentials, and API endpoints.
  To create the database, complete these steps:
  Use the database access client to connect to the database server as the root user:
  $ mysql -u root -p
  Create the cinder database:
  CREATE DATABASE cinder;
  Grant proper access to the cinder database:
  GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' \
  IDENTIFIED BY 'CINDER_DBPASS';
  GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' \
  IDENTIFIED BY 'CINDER_DBPASS';
  Replace CINDER_DBPASS with a suitable password.
  Exit the database access client.
  Source the admin credentials to gain access to admin-only CLI commands:
  $ . admin-openrc
  To create the service credentials, complete these steps:
  Create a cinder user:
  $ openstack user create --domain default --password-prompt cinder
  User Password:
  Repeat User Password:
  +-----------+----------------------------------+
  | Field     | Value                            |
  +-----------+----------------------------------+
  | domain_id | e0353a670a9e496da891347c589539e9 |
  | enabled   | True                             |
  | id        | bb279f8ffc444637af38811a5e1f0562 |
  | name      | cinder                           |
  +-----------+----------------------------------+
  Add the admin role to the cinder user:
  $ openstack role add --project service --user cinder admin
  Note
  This command provides no output.
  Create the cinder and cinderv2 service entities:
  $ openstack service create --name cinder \
  --description "OpenStack Block Storage" volume
  +-------------+----------------------------------+
  | Field       | Value                            |
  +-------------+----------------------------------+
  | description | OpenStack Block Storage          |
  | enabled     | True                             |
  | id          | ab3bbbef780845a1a283490d281e7fda |
  | name        | cinder                           |
  | type        | volume                           |
  +-------------+----------------------------------+
  $ openstack service create --name cinderv2 \
  --description "OpenStack Block Storage" volumev2
  +-------------+----------------------------------+
  | Field       | Value                            |
  +-------------+----------------------------------+
  | description | OpenStack Block Storage          |
  | enabled     | True                             |
  | id          | eb9fd245bdbc414695952e93f29fe3ac |
  | name        | cinderv2                         |
  | type        | volumev2                         |
  +-------------+----------------------------------+
  Note
  The Block Storage services require two service entities.
  Create the Block Storage service API endpoints:
  $ openstack endpoint create --region RegionOne \
  volume public http://controller:8776/v1/%\(tenant_id\)s
  +--------------+-----------------------------------------+
  | Field        | Value                                   |
  +--------------+-----------------------------------------+
  | enabled      | True                                    |
  | id           | 03fa2c90153546c295bf30ca86b1344b        |
  | interface    | public                                  |
  | region       | RegionOne                               |
  | region_id    | RegionOne                               |
  | service_id   | ab3bbbef780845a1a283490d281e7fda        |
  | service_name | cinder                                  |
  | service_type | volume                                  |
  | url          | http://controller:8776/v1/%(tenant_id)s |
  +--------------+-----------------------------------------+
  $ openstack endpoint create --region RegionOne \
  volume internal http://controller:8776/v1/%\(tenant_id\)s
  +--------------+-----------------------------------------+
  | Field        | Value                                   |
  +--------------+-----------------------------------------+
  | enabled      | True                                    |
  | id           | 94f684395d1b41068c70e4ecb11364b2        |
  | interface    | internal                                |
  | region       | RegionOne                               |
  | region_id    | RegionOne                               |
  | service_id   | ab3bbbef780845a1a283490d281e7fda        |
  | service_name | cinder                                  |
  | service_type | volume                                  |
  | url          | http://controller:8776/v1/%(tenant_id)s |
  +--------------+-----------------------------------------+
  $ openstack endpoint create --region RegionOne \
  volume admin http://controller:8776/v1/%\(tenant_id\)s
  +--------------+-----------------------------------------+
  | Field        | Value                                   |
  +--------------+-----------------------------------------+
  | enabled      | True                                    |
  | id           | 4511c28a0f9840c78bacb25f10f62c98        |
  | interface    | admin                                   |
  | region       | RegionOne                               |
  | region_id    | RegionOne                               |
  | service_id   | ab3bbbef780845a1a283490d281e7fda        |
  | service_name | cinder                                  |
  | service_type | volume                                  |
  | url          | http://controller:8776/v1/%(tenant_id)s |
  +--------------+-----------------------------------------+
  $ openstack endpoint create --region RegionOne \
  volumev2 public http://controller:8776/v2/%\(tenant_id\)s
  +--------------+-----------------------------------------+
  | Field        | Value                                   |
  +--------------+-----------------------------------------+
  | enabled      | True                                    |
  | id           | 513e73819e14460fb904163f41ef3759        |
  | interface    | public                                  |
  | region       | RegionOne                               |
  | region_id    | RegionOne                               |
  | service_id   | eb9fd245bdbc414695952e93f29fe3ac        |
  | service_name | cinderv2                                |
  | service_type | volumev2                                |
  | url          | http://controller:8776/v2/%(tenant_id)s |
  +--------------+-----------------------------------------+
  $ openstack endpoint create --region RegionOne \
  volumev2 internal http://controller:8776/v2/%\(tenant_id\)s
  +--------------+-----------------------------------------+
  | Field        | Value                                   |
  +--------------+-----------------------------------------+
  | enabled      | True                                    |
  | id           | 6436a8a23d014cfdb69c586eff146a32        |
  | interface    | internal                                |
  | region       | RegionOne                               |
  | region_id    | RegionOne                               |
  | service_id   | eb9fd245bdbc414695952e93f29fe3ac        |
  | service_name | cinderv2                                |
  | service_type | volumev2                                |
  | url          | http://controller:8776/v2/%(tenant_id)s |
  +--------------+-----------------------------------------+
  $ openstack endpoint create --region RegionOne \
  volumev2 admin http://controller:8776/v2/%\(tenant_id\)s
  +--------------+-----------------------------------------+
  | Field        | Value                                   |
  +--------------+-----------------------------------------+
  | enabled      | True                                    |
  | id           | e652cf84dd334f359ae9b045a2c91d96        |
  | interface    | admin                                   |
  | region       | RegionOne                               |
  | region_id    | RegionOne                               |
  | service_id   | eb9fd245bdbc414695952e93f29fe3ac        |
  | service_name | cinderv2                                |
  | service_type | volumev2                                |
  | url          | http://controller:8776/v2/%(tenant_id)s |
  +--------------+-----------------------------------------+
  Note
  The Block Storage services require endpoints for each service entity.
  Install and configure components¶
  Install the packages:
  # apt-get install cinder-api cinder-scheduler
  Edit the /etc/cinder/cinder.conf file and complete the following actions:
  In the [database] section, configure database access:
  [database]
  ...
  connection = mysql+pymysql://cinder:CINDER_DBPASS@controller/cinder
  Replace CINDER_DBPASS with the password you chose for the Block Storage database.
  In the [DEFAULT] and [oslo_messaging_rabbit] sections, configure RabbitMQ message queue access:
  [DEFAULT]
  ...
  rpc_backend = rabbit
  [oslo_messaging_rabbit]
  ...
  rabbit_host = controller
  rabbit_userid = openstack
  rabbit_password = RABBIT_PASS
  Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ.
  In the [DEFAULT] and [keystone_authtoken] sections, configure Identity service access:
  [DEFAULT]
  ...
  auth_strategy = keystone
  [keystone_authtoken]
  ...
  auth_uri = http://controller:5000
  auth_url = http://controller:35357
  memcached_servers = controller:11211
  auth_type = password
  project_domain_name = default
  user_domain_name = default
  project_name = service
  username = cinder
  password = CINDER_PASS
  Replace CINDER_PASS with the password you chose for the cinder user in the Identity service.
  Note
  Comment out or remove any other options in the [keystone_authtoken] section.
  In the [DEFAULT] section, configure the my_ip option to use the management interface IP address of the controller node:
  [DEFAULT]
  ...
  my_ip = 10.0.0.11
  In the [oslo_concurrency] section, configure the lock path:
  [oslo_concurrency]
  ...
  lock_path = /var/lib/cinder/tmp
  Populate the Block Storage database:
  # su -s /bin/sh -c "cinder-manage db sync" cinder
  Note
  Ignore any deprecation messages in this output.
  Configure Compute to use Block Storage¶
  Edit the /etc/nova/nova.conf file and add the following to it:
  [cinder]
  os_region_name = RegionOne
  Finalize installation¶
  Restart the Compute API service:
  # service nova-api restart
  Restart the Block Storage services:
  # service cinder-scheduler restart
  # service cinder-api restart
  3.1cinder  存储节点安装
  Before you install and configure the Block Storage service on the storage node, you must prepare the storage device.
  Note
  Perform these steps on the storage node.
  Install the supporting utility packages:
  # apt-get install lvm2
  Note
  Some distributions include LVM by default.
  Create the LVM physical volume /dev/sdb:
  # pvcreate /dev/sdb
  Physical volume "/dev/sdb" successfully created
  Create the LVM volume group cinder-volumes:
  # vgcreate cinder-volumes /dev/sdb
  Volume group "cinder-volumes" successfully created
  The Block Storage service creates logical volumes in this volume group.
  Only instances can access Block Storage volumes. However, the underlying operating system manages the devices associated with the volumes. By default, the LVM volume scanning tool scans the /dev directory for block storage devices that contain volumes. If projects use LVM on their volumes, the scanning tool detects these volumes and attempts to cache them which can cause a variety of problems with both the underlying operating system and project volumes. You must reconfigure LVM to scan only the devices that contain the cinder-volume volume group. Edit the /etc/lvm/lvm.conf file and complete the following actions:
  In the devices section, add a filter that accepts the /dev/sdb device and rejects all other devices:
  devices {
  ...
  filter = [ "a/sdb/", "r/.*/"]
  Each item in the filter array begins with a for accept or r for reject and includes a regular expression for the device name. The array must end with r/.*/ to reject any remaining devices. You can use the vgs -vvvv command to test filters.
  Warning
  If your storage nodes use LVM on the operating system disk, you must also add the associated device to the filter. For example, if the /dev/sda device contains the operating system:
  filter = [ "a/sda/", "a/sdb/", "r/.*/"]
  Similarly, if your compute nodes use LVM on the operating system disk, you must also modify the filter in the /etc/lvm/lvm.conf file on those nodes to include only the operating system disk. For example, if the /dev/sda device contains the operating system:
  filter = [ "a/sda/", "r/.*/"]
  Install and configure components¶
  Install the packages:
  # apt-get install cinder-volume
  Edit the /etc/cinder/cinder.conf file and complete the following actions:
  In the [database] section, configure database access:
  [database]
  ...
  connection = mysql+pymysql://cinder:CINDER_DBPASS@controller/cinder
  Replace CINDER_DBPASS with the password you chose for the Block Storage database.
  In the [DEFAULT] and [oslo_messaging_rabbit] sections, configure RabbitMQ message queue access:
  [DEFAULT]
  ...
  rpc_backend = rabbit
  [oslo_messaging_rabbit]
  ...
  rabbit_host = controller
  rabbit_userid = openstack
  rabbit_password = RABBIT_PASS
  Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ.
  In the [DEFAULT] and [keystone_authtoken] sections, configure Identity service access:
  [DEFAULT]
  ...
  auth_strategy = keystone
  [keystone_authtoken]
  ...
  auth_uri = http://controller:5000
  auth_url = http://controller:35357
  memcached_servers = controller:11211
  auth_type = password
  project_domain_name = default
  user_domain_name = default
  project_name = service
  username = cinder
  password = CINDER_PASS
  Replace CINDER_PASS with the password you chose for the cinder user in the Identity service.
  Note
  Comment out or remove any other options in the [keystone_authtoken] section.
  In the [DEFAULT] section, configure the my_ip option:
  [DEFAULT]
  ...
  my_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
  Replace MANAGEMENT_INTERFACE_IP_ADDRESS with the IP address of the management network interface on your storage node, typically 10.0.0.41 for the first node in the example architecture.
  In the [lvm] section, configure the LVM back end with the LVM driver, cinder-volumes volume group, iSCSI protocol, and appropriate iSCSI service:
  [lvm]
  ...
  volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
  volume_group = cinder-volumes
  iscsi_protocol = iscsi
  iscsi_helper = tgtadm
  In the [DEFAULT] section, enable the LVM back end:
  [DEFAULT]
  ...
  enabled_backends = lvm
  Note
  Back-end names are arbitrary. As an example, this guide uses the name of the driver as the name of the back end.
  In the [DEFAULT] section, configure the location of the Image service API:
  [DEFAULT]
  ...
  glance_api_servers = http://controller:9292
  In the [oslo_concurrency] section, configure the lock path:
  [oslo_concurrency]
  ...
  lock_path = /var/lib/cinder/tmp
  Finalize installation¶
  Restart the Block Storage volume service including its dependencies:
  # service tgt restart
  # service cinder-volume restart
  3.2  cinder验证
  Perform these commands on the controller node.
  Source the admin credentials to gain access to admin-only CLI commands:
  $ . admin-openrc
  List service components to verify successful launch of each process:
  $ cinder service-list
  +------------------+------------+------+---------+-------+----------------------------+-----------------+
  |      Binary      |    Host    | Zone |  Status | State |         Updated_at         | Disabled Reason |
  +------------------+------------+------+---------+-------+----------------------------+-----------------+
  | cinder-scheduler | controller | nova | enabled |   up  | 2014-10-18T01:30:54.000000 |       None      |
  | cinder-volume    | block1@lvm | nova | enabled |   up  | 2014-10-18T01:30:57.000000 |       None      |
  +------------------+------------+------+---------+-------+----------------------------+-----------------+

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-388293-1-1.html 上篇帖子: openStack灾备方案说明 下篇帖子: Openstack:ice-house安装过程
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表