Giter VIP home page Giter VIP logo

pec's Introduction

Pec

Build Status Code Climate Test Coverage

OpenStackにおいて複数サーバの起動一括起動停止や、 DHCPサーバがない状況でのIP自動採番を実現します。 作って壊してが驚くほどかんたんに。

Install

$ gem install pec

Usage

セットアップ・定義ファイル作成

$ pec init
create - /Pec.yaml
create - /user_datas/web_server.yaml.sample

Pec.yamlに基づきホストを作成します。 ホスト名が指定された場合はそのホストのみ作成、削除します。

$ pec up <hostname>

$ pec destroy <hostname>

$ pec status <hostname>

Configure

Pec.yaml

_default_: &def
  tenant: your_tenant
  image: centos-7.1_chef-12.3_puppet-3.7
  flavor: m1.small

pyama-test001:
  <<: *def
  networks:
    eth0:
      bootproto: static
      ip_address: 10.1.1.1/24
      gateway: 10.1.1.254
      dns1: 8.8.8.8
      dns2: 8.8.8.8
    eth1:
      bootproto: dhcp
  security_group:
  - default
  - ssh
  templates:
  - base.yaml
  - webserver.yaml
  user_data:
    hostname: pyama-test001
    fqdn: pyama-test001.ikemen.com
    repo_releasever: 7.1.1503
pyama-test002:
  <<: *def
・・・

Detail
項目名 説明 必須 例示
instance_name インスタンス名 pyama-test001*
tenant テナント名 your_tenant
image イメージ名 centos-7.1_chef-12.3_puppet-3.7
flavor フレーバー名 m1.small
networks ネットワーク定義 - []
security_group セキュリティグループ名 - [default,ssh]
templates user_dataのテンプレート../user_datasに配置 - [base.yaml,webserver.yaml]
user_data cloud-init記法に準拠 - -
  • 先頭が_で開始されるインスタンス名はyaml merge記法用途と認識し、スキップします
Networks
項目名 説明 必須 例示
device_name デバイス名 eth0
bootproto 設定方式 static or dhcp
ip_address IPアドレス(CIDR) 10.1.1.1/24
path NW設定保存パス default:/etc/sysconfig/network-scripts/ifcfg-[device_name]
※ bootproto=staticの場合必須
上記以外の項目は設定ファイルにKEY=value形式で出力されます。

Author

  • pyama86

pec's People

Contributors

pyama86 avatar sugy avatar linyows avatar

Watchers

Hiroshi SHIBATA avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.