基于Ubuntu Server 12.04 的OpenStack F版搭建步骤(2)

6、设置环境变量
   vi /etc/profile
        export OS_NO_CACHE=1
        export SERVICE_TOKEN=ADMIN
        export OS_TENANT_NAME=admin
        export OS_USERNAME=admin(登录用户名)
        export OS_PASSWORD=pass(登录密码)
        export OS_AUTH_URL=http://IP1:5000/v2.0/
        export SERVICE_ENDPOINT=http://IP1:35357/v2.0/
7、source /etc/profile

8.修改脚本文件:
          vim keystone_basic.sh
                HOST_IP=${HOST_IP:-IP1}
               ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin_pass}
               SERVICE_PASSWORD=${SERVICE_PASSWORD:-service_pass}
          vim keystone_endpoints_basic.sh
                     # Host address
                     HOST_IP=IP1
                    EXT_HOST_IP=IP1
                   # MySQL definitions
                  MYSQL_USER=keystone
                    MYSQL_DATABASE=keystone
                    MYSQL_PASSWORD=keystack_dbpass

9.修改文件执行权限
  chmod +x keystone_basic.sh
  chmod +x keystone_endpoints_basic.sh

10、执行脚本文件:
   ./keystone_basic.sh
  ./keystone_endpoints_basic.sh

11、验证服务   
 apt-get install curl openssl
        curl :35357/v2.0/endpoints -H 'x-auth-token: cloud' | python -m json.tool

12、查看服务列表

keystone user-list
  keystone service-list
   keystone endpoint-list

九、安装并配置Glance服务

1. 安装软件包:
          apt-get install glance
2. 修改配置文件
          vi /etc/glance/glance-api-paste.ini
          [filter:authtoken]
          paste.filter_factory = keystone.middleware.auth_token:filter_factory
          auth_host = IP
          auth_port = 35357
          auth_protocol = http
          admin_tenant_name = service
          admin_user = glance
          admin_password = pass

vi /etc/glance/glance-api.conf
          verbose = True
          sql_connection = mysql://glance:username@IP/glance
          notifier_strategy = noop
          rabbit_host = IP
          rabbit_port = 5672
          rabbit_use_ssl = false
          rabbit_userid = guest
          rabbit_password = guest
          rabbit_virtual_host = /
          [filter:authtoken]
          paste.filter_factory = keystone.middleware.auth_token:filter_factory
          auth_host = IP
          auth_port = 35357
          auth_protocol = http
          admin_tenant_name = service
          admin_user = glance
          admin_password = cloud
          [paste_deploy]
          flavor = keystone 

vi /etc/glance/glance-registry.conf
          verbose = True
          sql_connection = mysql://glance: glance_dbpass@IP1/glance
          [keystone_authtoken]
          auth_host = IP
          auth_port = 35357
          auth_protocol = http
          admin_tenant_name = service
          admin_user = glance
          admin_password = service_pass
          [paste_deploy]
          flavor = keystone

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/123588b7355229f581b4f0a670e3bc32.html