安装OpenStack Identity服务
时间: 2023-10-14 16:05:43 浏览: 76
OpenStack安装
安装OpenStack Identity服务需要遵循以下步骤:
1. 安装依赖库:
```
sudo apt-get install python-pip python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg-dev libyaml-dev libsqlite3-dev
```
2. 安装Keystone:
```
sudo pip install keystone
```
3. 配置Keystone:
```
sudo cp /etc/keystone/keystone.conf.sample /etc/keystone/keystone.conf
```
4. 编辑Keystone配置文件:
```
sudo nano /etc/keystone/keystone.conf
```
找到[database]部分,配置数据库连接信息:
```
[database]
connection = mysql+pymysql://keystone:KEYSTONE_DBPASS@controller/keystone
```
5. 初始化Keystone数据库:
```
sudo su -s /bin/sh -c "keystone-manage db_sync" keystone
```
6. 生成Fernet key:
```
sudo keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
sudo keystone-manage credential_setup --keystone-user keystone --keystone-group keystone
```
7. 启动Keystone服务:
```
sudo systemctl enable --now apache2.service
sudo systemctl enable --now memcached.service
```
8. 创建服务实体:
```
sudo keystone-manage bootstrap --bootstrap-password ADMIN_PASS \
--bootstrap-admin-url http://controller:35357/v3/ \
--bootstrap-internal-url http://controller:35357/v3/ \
--bootstrap-public-url http://controller:5000/v3/ \
--bootstrap-region-id RegionOne
```
其中,ADMIN_PASS为管理员密码。
9. 验证Keystone服务:
```
sudo openstack --os-auth-url http://controller:35357/v3 \
--os-project-domain-name Default --os-user-domain-name Default \
--os-project-name admin --os-username admin token issue
```
如果返回一个有效的令牌,则说明Keystone服务已经成功安装并运行。
阅读全文