2. 自动化运维系列之Cobbler给Openstack节点安装操作系统。
preface
我们在一篇博文知道了如何搭建Cobbler,那么下面就通过Cobbler来安抓Openstack所有节点吧。
服务器配置信息如下:
| 主机名 | IP | 角色 |
|---|---|---|
| Cobbler.node.com | 192.168.56.10 | cobbler |
| linux-node1.example.com | 192.168.56.11 | keystone+glance等控制节点 |
| linux-node2.example.com | 192.168.56.12 | horizon+nova-computer等计算节点 |
- 内核为3.10.0-514.2.2.el7.x86_64
- 网卡名字设置为了eth0。
- 关闭了selinux,iptables。
- 时间同步ntp.chinacache.com
部署cobbler
部署的话参考上一篇博文:Cobbler的安装
1.Cobbler安装部署完成后,我们需要添加 一个 Openstack仓库:
[root@cobbler kickstarts]# cobbler repo add --name=Openstack-Newton --mirror=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-newton/ --arch=x86_64 --breed=yum
[root@cobbler kickstarts]# cobbler reposync # 同步得有一会,取决于下载速度。
同步完成后,我们在Cobbler-web界面来把Openstack的源添加到profile里面去,这样新安装的操作系统自动Openstack-newton版本的yum源了。如下图所示:

2.kickstart配置文件里面添加一行命令:
[root@cobbler kickstarts]# vim CentOS-7.1-x86_64_cobbler.cfg
%post
rpm -ihv https://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm # 添加一个epel源
wget -SO /etc/yum.repos.d/Centos-7.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all && yum -y install koan # 安装koan
%end
3.定制系统:
首先针对linux-node2节点:
[root@cobbler kickstarts]#cobbler system add --name=linux-node2 --mac=00:50:56:3E:61:CF \
--profile=CentOS-7.0-x86_64 \
--ip-address=192.168.56.12 --subnet=255.255.255.0 \
--gateway=192.168.56.2 --interface=eth0 \
--static=1 --hostname=linux-node2.example.com \
--name-servers="192.168.56.2" \
--kickstart=/var/lib/cobbler/kickstarts/CentOS-7.1-x86_64_cobbler.cfg
再次针对linux-node1节点
cobbler system add --name=linux-node1 --mac=00:50:56:25:62:A4 \
--profile=CentOS-7.0-x86_64 \
--ip-address=192.168.56.11 --subnet=255.255.255.0 \
--gateway=192.168.56.2 --interface=eth0 \
--static=1 --hostname=linux-node1.example.com \
--name-servers="192.168.56.2" \
--kickstart=/var/lib/cobbler/kickstarts/CentOS-7.1-x86_64_cobbler.cfg
如果是使用的vm虚拟机,请先关闭vmware虚拟机的DHCP功能,如果是在生产环境下,那么请临时关闭路由器或者三层交换机的dhcp功能,由Cobbler来提供dhcp功能。
启动Openstack节点服务器
我们启动Openstack节点服务器,一开机就进入到自动安装系统的界面。待系统安装完后,我们就可以看到主机名、ip、网关、防火墙之类的都是按照我们的配置文件走的。
我们看下yum源:
[root@linux-node2 ~]# cat /etc/yum.repos.d/cobbler-config.repo
# error: could not read repo source: /var/www/cobbler/ks_mirror/config/CentOS-7.0-x86_64-0.repo
[Openstack-Newton]
name=Openstack-Newton
baseurl=http://192.168.56.10/cobbler/repo_mirror/Openstack-Newton
enabled=1
priority=99
gpgcheck=0
已经安装上了Newton版本的Openstack的yum源了,所以我们在部署Openstack的节点的时候不需要执行yum -y install centos-release-openstack-newton。
直接执行yum install Openstack组件就可以了。
由于是使用Cobbler的yum源,所以安装Openstack的组件的时候,内网传输相当快了。
2. 自动化运维系列之Cobbler给Openstack节点安装操作系统。的更多相关文章
- 【转载】自动化运维系列之Cobbler给Openstack节点安装操作系统
preface 我们在一篇博文知道了如何搭建Cobbler,那么下面就通过Cobbler来安抓Openstack所有节点吧. 服务器配置信息如下: 主机名 IP 角色 Cobbler.node.com ...
- 1. 自动化运维系列之Cobbler自动装机
preface 我们之前批量安装操作系统的时候都是采用pxe来安装,pxe也是通过网络安装操作系统的,但是PXE依赖于DHCP,HTTP/TFTP,kicstart等支持.安装流程如下所示: 对于上面 ...
- saltstack自动化运维系列11基于etcd的saltstack的自动化扩容
saltstack自动化运维系列11基于etcd的saltstack的自动化扩容 自动化运维-基于etcd加saltstack的自动化扩容# tar -xf etcd-v2.2.1-linux-amd ...
- saltstack自动化运维系列⑩SaltStack二次开发初探
saltstack自动化运维系列⑩SaltStack二次开发初探 1.当salt运行在公网或者网络环境较差的条件下,需要配置timeout时间vim /etc/salt/master timeout: ...
- saltstack自动化运维系列⑧SaltStack实践配置管理安装nginx-1.10.3
saltstack自动化运维系列⑧SaltStack实践配置管理安装nginx-1.10.3 安装nginx-1.10.3.tar.gz # mkdir -p /srv/salt/prod/pkg / ...
- saltstack自动化运维系列⑦SaltStack实践配置管理安装zabbix
saltstack自动化运维系列⑥SaltStack实践配置管理安装zabbix 1.添加管理zabbix的sls文件# vim /srv/salt/base/init/zabbix_agent.sl ...
- saltstack自动化运维系列⑥SaltStack实践安装配置HAproxy的Keepalived
saltstack自动化运维系列⑥SaltStack实践安装配置HAproxy的Keepalived 安装配置Keepalived 1.编写功能模块 #创建keepalived目录# mkdir -p ...
- saltstack自动化运维系列⑥SaltStack实践安装配置HAproxy
saltstack自动化运维系列⑥SaltStack实践安装配置HAproxy 下载haproxy1.6.2.tar.gz下载地址:http://www.haproxy.org/download/1. ...
- SQL SERVER自动化运维系列
SQL SERVER自动化运维系列 转自:https://www.cnblogs.com/zhijianliutang/p/5001142.html 本系列为SQL SERVER自动化运维的一些操作技 ...
随机推荐
- android studio connot resolve
使用AS的时候,肯定会遇到这个问题. 我使用清除缓存都不能解决,不过无意中发现代码变了. final Button select = (Button) findViewById(android.R.i ...
- 怎样用Google APIs和Google的应用系统进行集成(2)----Google APIs的全部的RESTFul服务一览
上篇文章,我提到了,Google APIs暴露了86种不同种类和版本号的API.我们能够通过在浏览器里面输入https://www.googleapis.com/discovery/v1/apis这个 ...
- C# 执行bat批处理文件
private void RunBat(string batPath) { Process pro = new Process(); FileInfo file = new FileInfo(batP ...
- Spark Shuffle 中 JVM 内存使用及配置内幕详情
本课主题 JVM 內存使用架构剖析 Spark 1.6.x 和 Spark 2.x 的 JVM 剖析 Spark 1.6.x 以前 on Yarn 计算内存使用案例 Spark Unified M ...
- Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io .nativeio.NativeIO$Windows.createDirectoryWithMode0(Ljava/lang/String;I)V
首先,遇到这个问题的一个原因是windows环境中没有配置hadoophome.配置之后加入winutils工具 第二个原因,pom中执行的hadoop的版本与window环境中的hadoop的版本不 ...
- C#中Attribute和Property
XAML是XML派生而来的语言,所以很多XML中的概念在XAML中是通用的. 为了表示同类标签中的某个标签与众不同,可以给它的特征(Attribute)赋值,为特征值赋值的语法如下: 非空标签:< ...
- bluetooth在linux应用开发
linux内Bluetooth的协议栈为BlueZ,http://www.bluez.org/.在4.46上,BlueZ实现了对A2DP Sink的支持,而之前的版本只支持A2DP Source.
- Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not accessible due to restriction on required library
异常: Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not access ...
- 自适应瀑布型布局(手机,PC全兼容)
有个瀑布型的布局需求,于是找了下,网上大部分用jquery控件,界面太复杂,看起来很笨重,我需求比较简单,于是只能自己写 其实原理就是用cs 去控制,那么我们只需要把对应的界面去规划就行了,比如,我一 ...
- 小米路由器刷Xiaomi Mi WiFi Mini openwrt
Current Stable Release - OpenWrt 18.06.1,released on August, 18th 2018. there is also PandoraBox fir ...