手动安装liberty版本openstack环境(allinone)---安装glance
2015-11-28 18:13
609 查看
作者:【吴业亮】云计算开发工程师
博客:http://blog.csdn.net/wylfengyujiancheng
1、创建glance数据库
注意将Changeme_123替换为自己的密码
2、创建数据库用户并赋予权限
注意将Changeme_123替换为自己的密码
3、创建glance用户及赋予admin权限
注意将Changeme_123替换为自己的密码
4、创建image服务
5、创建glance的endpoint
博客:http://blog.csdn.net/wylfengyujiancheng
1、创建glance数据库
[code]# mysql -uroot -pChangeme_123 -e "CREATE DATABASE glance;
注意将Changeme_123替换为自己的密码
2、创建数据库用户并赋予权限
[code]# mysql -uroot -pChangeme_123 -e "GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'Changeme_123';" # mysql -uroot -pChangeme_123 -e "GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'Changeme_123';"
注意将Changeme_123替换为自己的密码
3、创建glance用户及赋予admin权限
[code]# source /root/admin-openrc.sh # openstack user create glance --password Changeme_123 # openstack role add --project service --user glance admin
注意将Changeme_123替换为自己的密码
4、创建image服务
[code]# openstack service create --name glance --description "OpenStack Image service" image
5、创建glance的endpoint
[code]# openstack endpoint create --region RegionOne image public http://${HOSTNAME}:9292 # openstack endpoint create --region RegionOne image internal http://${HOSTNAME}:9292 # openstack endpoint create --region RegionOne image admin http://${HOSTNAME}:9292[/code]
6、创建glance相关rpm包[code]# yum install openstack-glance python-glance python-glanceclient -y
7、修改glance配置文件/etc/glance/glance-api.conf[code]# openstack-config --set /etc/glance/glance-api.conf database connection mysql://glance:Changeme_123@${HOSTNAME}/glance # openstack-config --set /etc/glance/glance-api.conf keystone_authtoken auth_uri http://${HOSTNAME}:5000 # openstack-config --set /etc/glance/glance-api.conf keystone_authtoken auth_url http://${HOSTNAME}:35357 # openstack-config --set /etc/glance/glance-api.conf keystone_authtoken auth_plugin password # openstack-config --set /etc/glance/glance-api.conf keystone_authtoken project_domain_id default # openstack-config --set /etc/glance/glance-api.conf keystone_authtoken user_domain_id default # openstack-config --set /etc/glance/glance-api.conf keystone_authtoken username glance # openstack-config --set /etc/glance/glance-api.conf keystone_authtoken password Changeme_123 # openstack-config --set /etc/glance/glance-api.conf keystone_authtoken project_name service # openstack-config --set /etc/glance/glance-api.conf paste_deploy flavor keystone # openstack-config --set /etc/glance/glance-api.conf glance_store default_store file # openstack-config --set /etc/glance/glance-api.conf glance_store filesystem_store_datadir /var/lib/glance/images/ # openstack-config --set /etc/glance/glance-api.conf DEFAULT notification_driver noop # openstack-config --set /etc/glance/glance-api.conf DEFAULT verbose True
8、修改glance配置文件/etc/glance/glance-registry.conf[code]# openstack-config --set /etc/glance/glance-registry.conf database connection mysql://glance:Changeme_123@${HOSTNAME}/glance # openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken auth_uri http://${HOSTNAME}:5000 # openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken auth_url http://${HOSTNAME}:35357 # openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken auth_plugin password # openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken project_domain_id default # openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken user_domain_id default # openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken project_name service # openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken username glance # openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken password Changeme_123 # openstack-config --set /etc/glance/glance-registry.conf paste_deploy flavor keystone # openstack-config --set /etc/glance/glance-registry.conf DEFAULT notification_driver noop # openstack-config --set /etc/glance/glance-registry.conf DEFAULT verbose True
9、同步数据库[code]# su -s /bin/sh -c "glance-manage db_sync" glance
10、启动glance及设置开机启动[code]# systemctl enable openstack-glance-api.service openstack-glance-registry.service # systemctl start openstack-glance-api.service openstack-glance-registry.service
11、将glance版本号写入环境变量中[code]# echo " " >> /root/admin-openrc.sh && \ # echo " " >> /root/demo-openrc.sh # echo "export OS_IMAGE_API_VERSION=2" | tee -a /root/admin-openrc.sh /root/demo-openrc.sh
12、下载镜像[code]# wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img[/code]
13、上传镜像到glance[code]# source /root/admin-openrc.sh # glance image-create --name "cirros-0.3.4-x86_64" --file cirros-0.3.4-x86_64-disk.img \ --disk-format qcow2 --container-format bare --visibility public --progress
14、查看镜像[code]# glance image-list
相关文章推荐
- shell调用python
- The path "/usr/src/linux/include" is not an existing directory.解决方式
- 配置Tomcat的集群系统
- Linux系统硬盘读写测试
- 第十三天-linux正则表达式及重点命令
- Docker 网络基础配置
- 用Block 进行pop和传值
- 手动安装liberty版本openstack环境(allinone)---安装keystone
- 我的Linux配置笔记
- Top K 算法详解
- [ecshop 资料]商品显示 选择属性名称然后标题也加上属性的名称
- NSOperation
- hadoop技术与性能优化----为什么会有hadoop
- apache服务器的效率 可以体现出当今世界的科技一角
- mac ox 10.11 brew安装Nginx+PHP+MySQL+扩展
- linux日常管理-curl工具
- nginx 源码学习笔记(五)——nginx精粹-模块
- nginx 源码学习笔记(四)——nginx精粹-模块
- nginx 源码学习笔记(三)——nginx精粹-模块
- linux下的定时或计时操作(gettimeofday等的用法,秒,微妙,纳秒)(转载)