制作P版openstack本地源

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

 

 

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

转载于:https://www.cnblogs.com/LJYY/p/8469835.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值