码迷,mamicode.com
首页 > 其他好文 > 详细

制作P版openstack本地源

时间:2018-02-25 19:04:04      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:evel   under   saving   使用   log   mod   pre   main   虚拟   

Openstack本地源可以在不能联网的机器上快速的部署测试环境

所以今天在此分享制作Pike版本本地源的方法


 

1、环境准备

安装Linux系统的虚拟机或物理机1台,需要能够连接Internet。

2、配置Yum的缓存

vi /etc/yum.conf 
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=1     #修改为1
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.
centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release

3、将需要安装的组件写入到脚本(可以根据测试需求增加需要安装的组件)执行安装,时间取决于网速。

  其他组件详见官网:https://docs.openstack.org/pike/install/

#!/bin/sh

yum -y install rabbitmq-server
yum install -y openstack-keystone httpd mod_wsgi memcached python-memcached
yum install apr apr-util -y
yum install -y openstack-glance python-glance
yum install -y openstack-nova-api openstack-nova-conductor   openstack-nova-console openstack-nova-novncproxy   openstack-nova-scheduler openstack-nova-placement-api
yum install -y openstack-utils
yum install -y openstack-neutron openstack-neutron-ml2  openstack-neutron-linuxbridge python-neutronclient ebtables ipset
yum install openstack-dashboard -y
yum install openstack-cinder -y
yum install nfs-utils -y
########################################
yum install -y openstack-nova-compute
yum install -y python-openstackclient openstack-selinux
yum install -y openstack-neutron-linuxbridge ebtables ipset
yum install -y lvm2
yum install nfs-utils rpcbind -y
yum install -y openstack-cinder targetcli python-keystone lvm2
yum  -y install  createrepo

4、创建目录

mkdir /opt/openstack-pike

5、查找yum缓存的rpm包并拷贝到/opt/openstack-pike

 find /var/cache/yum/x86_64/ -name *.rpm -exec cp -a {} /opt/openstack-pike/ \;

6、生成本地yum源

createrepo /opt/openstack-pike/
Spawning worker 0 with 586 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete

7、将/opt/openstack-pike打包拷贝到需要安装的机器上配置本地源即可使用

tar -cvf openstack-pike.tar.gz /opt/openstack-pike

 

 

  初到新人  欢迎评论交流  分享心得

制作P版openstack本地源

标签:evel   under   saving   使用   log   mod   pre   main   虚拟   

原文地址:https://www.cnblogs.com/LJYY/p/8469835.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!