OpenStack版本升级之Keystone

下载新版本并备份相关文件及数据

前面已经比较过Keystone在E版和F版中的一些差异,现在该是升级的时候了。原Keystone的Essex版本是在CentOS6.2下通过源代码安装的,后面在epel的rpm安装包找了个init脚本,使得Keystone能通过service管理并在开机时自动运行,因此这里仍然通过源代码进行升级。以防万一,首先要备份相关旧版的文件、数据,要备份的文件主要包括/usr/bin下的三个文件,/etc/keystone下的所有配置文件以及数据库keystone,命令如下所示:

[root@stackcc update_keystone]# wget https://launchpad.net/keystone/folsom/2012.2/+download/keystone-2012.2.tar.gz
[root@stackcc update_keystone]# mkdir -p backup/bin
[root@stackcc update_keystone]# cp /usr/bin/keystone* backup/bin/
[root@stackcc update_keystone]# mkdir backup/etc
[root@stackcc update_keystone]# cp /etc/keystone/* backup/etc/
[root@stackcc update_keystone]# mysqldump -ukeystone -p keystone > backup/keystone.sql

停止Keystone服务并安装F版Keystone

[root@stackcc update_keystone]# service keystone stop
[root@stackcc update_keystone]# tar -zxf keystone-2012.2.tar.gz 
[root@stackcc update_keystone]# cd keystone-2012.2
[root@stackcc keystone-2012.2]# python setup.py install > keystone.info

配置F版Keystone

主要修改了admin_token、log选项、sql选项、token和ec2选项,如下所示:

[root@stackcc keystone-2012.2]# rm -fr /etc/keystone/*
[root@stackcc keystone-2012.2]# cp etc/* /etc/keystone/
[root@stackcc keystone-2012.2]# ll /etc/keystone/
total 20
-rw-r--r-- 1 root root 1539 Nov  4 19:42 default_catalog.templates
-rw-r--r-- 1 root root 5753 Nov  4 19:42 keystone.conf.sample
-rw-r--r-- 1 root root  758 Nov  4 19:42 logging.conf.sample
-rw-r--r-- 1 root root   59 Nov  4 19:42 policy.json
[root@stackcc keystone-2012.2]# mv /etc/keystone/keystone.conf.sample /etc/keystone/keystone.conf
[root@stackcc keystone-2012.2]# mv /etc/keystone/logging.conf.sample /etc/keystone/logging.conf
[root@stackcc keystone-2012.2]# cat /etc/keystone/keystone.conf 
[DEFAULT]
# A "shared secret" between keystone and other openstack services
admin_token = 7d97448231c0a2bac8a3

# The IP address of the network interface to listen on
# bind_host = 0.0.0.0

# The port number which the public service listens on
# public_port = 5000

# The port number which the public admin listens on
# admin_port = 35357

# The port number which the OpenStack Compute service listens on
# compute_port = 8774

# === Logging Options ===
# Print debugging output
# verbose = False

# Print more verbose output
# (includes plaintext request logging, potentially including passwords)
# debug = False

# Name of log file to output to. If not set, logging will g
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值