安装barbican服务

一、创建数据库

mysql -uroot -p
CREATE DATABASE barbican;
GRANT ALL PRIVILEGES ON barbican.* TO 'barbican'@'localhost'  IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON barbican.* TO 'barbican'@'%'   IDENTIFIED BY '123456';
exit;

二、创建用户 角色

source octavia-openrc
openstack user create --domain default --password 123456 barbican
openstack role add --project service --user barbican admin
openstack role create creator
openstack role add --project service --user barbican creator
openstack service create --name barbican --description "Key Manager" key-manager

三、创建endpoint

openstack endpoint create --region RegionOne key-manager public http://controller1:9311
openstack endpoint create --region RegionOne key-manager internal http://controller1:9311
openstack endpoint create --region RegionOne key-manager admin http://controller1:9311

四、安装组件

yum -y install openstack-barbican-api

五、修改配置文件

#/etc/barbican/barbican.conf

[DEFAULT]
sql_connection = mysql+pymysql://barbican:123456@controller1/barbican
transport_url = rabbit://openstack:123456@controller1
[keystone_authtoken]
auth_uri = http://controller1:5000/v3
auth_url = http://controller1:5000/v3
memcached_servers = controller1:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = barbican
password = 123456

六、编辑/etc/barbican/barbican-api-paste.ini

[pipeline:barbican_api]
pipeline = cors authtoken context apiapp
su -s /bin/sh -c "barbican-manage db upgrade" barbican

七、创建/etc/httpd/conf.d/wsgi-barbican.conf

Listen 9311

    #ServerName server101.e3cloud.com
 
    ## Logging
    = 2.4>
      ErrorLogFormat "%{cu}t %M"
    
    ErrorLog /var/log/httpd/barbican_wsgi_main_error_ssl.log
    LogLevel debug
    ServerSignature Off
    CustomLog /var/log/httpd/barbican_wsgi_main_access_ssl.log combined
 
    WSGIApplicationGroup %{GLOBAL}
    WSGIDaemonProcess barbican-api display-name=barbican-api group=barbican processes=2 threads=8 user=barbican
    WSGIProcessGroup barbican-api
    WSGIScriptAlias / /usr/lib/python2.7/site-packages/barbican/api/app.wsgi
    WSGIPassAuthorization On
 
    
        = 2.4>
            Require all granted
        
        
            Order allow,deny
            Allow from all
        
    

八、重启服务

systemctl enable httpd.service
systemctl restart httpd.service

 

你可能感兴趣的:(OpenStack)