erlchina 发表于 2015-4-12 16:36:16

OpenStack JEOS 镜像

  JEOS:Just Enough Operating System 维基百科地址:http://en.wikipedia.org/wiki/Just_enough_operating_system
  OpenStack官方文档有介绍Building JEOS images for use with Heat
  对于Heat来说,JEOS就是安装有cloud-init和heat-cfntools的镜像,这样才能使用Heat全部的功能。
  官方给出的方法是用disk-image-create工具,但我比较喜欢在系统里自行安装,然后做成镜像。
  cloud-init和heat-cfntools都能执行Heat模板里面用户自定义的脚本
  根据字面意思,cloud-init比较通用,比如设置hostname、注入公钥、执行脚本等等;heat-cfntools是封装的更加high level,和heat搭配比较方便。
  
  安装步骤很简单,都有现成的包。对于CentOS 6.x 来说,有以下几步:
  1.安装epel源



# yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
  2.安装cloud-init



# yum install cloud-init
  3.修改cloud-init配置/etc/cloud/cloud.cfg
  默认有一个centos用户,不允许ssh root登陆并且不允许密码登陆



users:
- default
disable_root: 1
ssh_pwauth:   0

  修改为



disable_root: 0
ssh_pwauth:   1

  4. 安装heat-cfntools



# yum install heat-cfntools
//创建aws软链接,为了和aws兼容
# cfn-create-aws-symlinks
  
页: [1]
查看完整版本: OpenStack JEOS 镜像