zoukankan      html  css  js  c++  java
  • 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-initheat-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

    default_user:

    system_info:
      default_user:
        name: centos
      distro: rhel
      paths:
        cloud_dir: /var/lib/cloud
        templates_dir: /etc/cloud/templates
      ssh_svcname: sshd

    4. 修改/etc/ssh/sshd_config

    PermitRootLogin yes
    PasswordAuthentication yes

    5. 安装heat-cfntools

    # yum install heat-cfntools

    //创建aws软链接,为了和aws兼容
    # cfn-create-aws-symlinks
  • 相关阅读:
    TCP/IP
    logging模块
    HttpClient当HTTP连接的时候出现大量CLOSE_WAIT连接(转)
    三 os模块
    一 time与datetime模块
    (转)HTTPS到底是个啥玩意儿?
    Python
    Codeforces Round #374 (Div. 2)
    Codeforces Round #373 (Div. 2)
    bzoj3527: [Zjoi2014]力
  • 原文地址:https://www.cnblogs.com/gorlf/p/4234087.html
Copyright © 2011-2022 走看看