zoukankan      html  css  js  c++  java
  • (2) openstack--keystone

    yun1

    OpenStack packages

    yum install python-openstackclient -y  
    yum install openstack-selinux

    SQL database

    yum install mariadb mariadb-server python2-PyMySQL
    vim /etc/my.cnf.d/openstack.cnf
    [mysqld]
    bind-address = 192.168.254.131
    default-storage-engine = innodb
    innodb_file_per_table = on
    max_connections = 4096 
    collation-server = utf8_general_ci
    character-set-server = utf8

    systemctl enable mariadb.service
    systemctl start mariadb.service

    mysql_secure_installation 初始化数据库(必做)设密码等

    Message queue

    yum install rabbitmq-server

    systemctl enable rabbitmq-server.service
     systemctl start rabbitmq-server.service
    rabbitmqctl add_user openstack admin
    rabbitmqctl set_permissions openstack ".*" ".*" ".*" 给权限
    Setting permissions for user "openstack" in vhost "/" 添加openstack为管理员

    Memcached

    yum install memcached python-memcached
    vim /etc/sysconfig/memcached
    OPTIONS="-l 127.0.0.1,::1,yun1" 改一行
    systemctl enable memcached.service
    systemctl start memcached.service

    Identity service

    Install and configure

    mysql -u root -p
    MariaDB [(none)]> CREATE DATABASE keystone;
    MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' 
    IDENTIFIED BY 'KEYSTONE_DBPASS';
    MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' 
    IDENTIFIED BY 'KEYSTONE_DBPASS';
    yum install openstack-keystone httpd mod_wsgi

    cp keystone.conf keystone.bak 备份一个
    /etc/keystone/keystone.conf
    [DEFAULT]
     
    [assignment]
     
    [auth]
     
    [cache]
     
    [catalog]
     
    [cors]
     
    [cors.subdomain]
     
    [credential]
     
    [database]
     
    [domain_config]
     
    [endpoint_filter]
     
    [endpoint_policy]
     
    [eventlet_server]
     
    [federation]
     
    [fernet_tokens]
     
    [healthcheck]
     
    [identity]
     
    [identity_mapping]
     
    [kvs]
     
    [ldap]
     
    [matchmaker_redis]
     
    [memcache]
     
    [oauth1]
     
    [oslo_messaging_amqp]
     
    [oslo_messaging_kafka]
     
    [oslo_messaging_notifications]
     
    [oslo_messaging_rabbit]
     
    [oslo_messaging_zmq]
     
    [oslo_middleware]
     
    [oslo_policy]
     
    [paste_deploy]
     
    [policy]
     
    [profiler]
     
    [resource]
     
    [revoke]
     
    [role]
     
    [saml]
     
    [security_compliance]
     
    [shadow_users]
     
    [signing]
     
    [token]
    provider = fernet
     
    [tokenless_auth]
     
    [trust]
    su -s /bin/sh -c "keystone-manage db_sync" keystone  导入数据 导入后进入 keystone库 看是否有tables
    keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone 设置用户 keytone管理组keytone
    #keystone-manage credential_setup --keystone-user keystone --keystone-group keystone 认证
    keystone-manage bootstrap --bootstrap-password admin 
      --bootstrap-admin-url http://yun1:35357/v3/ 
      --bootstrap-internal-url http://yun1:5000/v3/ 
      --bootstrap-public-url http://yun1:5000/v3/ 
      --bootstrap-region-id RegionOne

    Configure the Apache HTTP server

    vim /etc/httpd/conf/httpd.conf

    ServerName yun1
    ln -s /usr/share/keystone/wsgi-keystone.conf /etc/httpd/conf.d/ 建立链接
    systemctl enable httpd.service
    # systemctl start httpd.service
    vim openrc
    export OS_USERNAME=admin
    export OS_PASSWORD=admin
    export OS_PROJECT_NAME=admin
    export OS_USER_DOMAIN_NAME=Default
    export OS_PROJECT_DOMAIN_NAME=Default
    export OS_AUTH_URL=http://yun1:35357/v3
    export OS_IDENTITY_API_VERSION=3
    source openrc 宣告环境变量
    就可以用openstack命令
     
     
     
     







    一入挨踢深似海,奈何已是梦中人。
  • 相关阅读:
    《超级迷宫》需求规格说明
    超级迷宫冲刺个人计划安排
    审评(HelloWorld团队)
    C语言中的++与*
    a、b交换
    微服务架构浅析及实践心得
    Servlet版本冲突引起的Error
    并发编程:一个100%会发生死锁的程序
    单元测试与Mockito
    Java基础:HashMap假死锁问题的测试、分析和总结
  • 原文地址:https://www.cnblogs.com/azu883/p/11768203.html
Copyright © 2011-2022 走看看