Translate

2013年7月5日金曜日

Puppetを使ったOpenShift Origin のインストールについてのドキュメントをを翻訳してみる

OpenShift Originを企業内で使用するには
結局ブローカとノードを分離したインストールを実施しておかないといけなくなる。
なのでその作業に必要そうなドキュメントを翻訳してみた。
原本は、以下のリンクである。

(OpenShift Origin GitHub)Installing OpenShift Origin using Puppet



翻訳文章を参考にされる方は、
at your own riskでお願いします。


----

Puppetを使ったOpenShift Origin のインストール

このガイドは、基本のパペットスクリプトを設定してRPMからOpenShiftをインストールするためのウォークスルーを提供する。


OpenShift Origin RPMは以下のリポジトリ上で利用可能である:

・自分でソースからビルドしたOpenShift Origin RPMの入ったローカルリポジトリ
・Openshift Origin nightly ミラーリポジトリ - Fedora 19 リポジトリ
 - RHEL 6.4 リポジトリ
注意:OpenShift Origin ブローカ/ノードを適切に設定するために、DNS登録されたホスト名および静的IPアドレスが設定されたホストが必要となる。

Puppetのインストール


注意:RHELシステムへpuppetをインストールするためにEPELリポジトリをインクルードする必要がある。

ここにある最新のepel-releaseパッケージをインストールする。

 yum install -y --nogpgcheck ${url_of_the_latest_epel-release_rpm}

以下のコマンドを実行してpuppetとfacterをインストールする。

 yum install -y puppet facter tar

openshift puppetモジュールをインストールする:

 puppet module install openshift/openshift_origin



BIND TSIG キーの生成


BINDパッケージをインストールする。


 yum install -y bind

TSIG キーを生成する。

 #クラウドドメインとして example.com を使う場合
 /usr/sbin/dnssec-keygen -a HMAC-MD5 -b 512 -n USER -r /dev/urandom -K /var/named example.com
 cat /var/named/Kexample.com.*.key  | awk '{print $8}'

TSIGキーは、CNk+wjszKi9da9nL/1gkMY7H+GuUng== といった様な文字列である。次のステップで使用する。


/etc/hosts へのエントリの追加(オプション)


もしあなたのマシンのホスト名からパブリックIPアドレスを(DNSで)引くことができないのであれば、以下の作業を行うこと:

1. /etc/hosts へ、ホスト名からパブリックIPアドレスへのマッピングエントリを追加する。例:

 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
 ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
 10.211.55.3 thishost.thisdomain.com

2. /etc/hostnameを更新する。例:

 echo "thishost.thisdomain.com" > /etc/hostname
 hostname thishost.thisdomain.com


オールインワンホストの設定

この設定では、ホスト上で、ブローカ、ノード、アクティブMQ、mongodb、バインドサービスが動作する。

以下の内容を含むファイルconfigure_origin.ppを作成する:

 class { 'openshift_origin' :
  #The DNS resolvable hostname of this host
  node_fqdn                  => "thishost.thisdomain.com",
 
  #The domain under which application should be created. Eg: -.example.com
  cloud_domain               => 'example.com',
 
  #Upstream DNS server.
  dns_servers                => ['8.8.8.8'],
 
  enable_network_services    => true,
  configure_firewall         => true,
  configure_ntp              => true,
 
  #Configure the required services
  configure_activemq         => true,
  configure_mongodb          => true,
  configure_named            => true,
  configure_avahi            => false,
  configure_broker           => true,
  configure_node             => true,
 
  #Enable development mode for more verbose logs
  development_mode           => true,
 
  #Update the nameserver on this host to point at Bind server
  update_network_dns_servers => true,
 
  #Use the nsupdate broker plugin to register application
  broker_dns_plugin          => 'nsupdate',
 
  #If installing from a local build, specify the path for Origin RPMs
  #install_repo               => 'file:///root/origin-rpms',
 
  #If using BIND, let the broker know what TSIG key to use
  named_tsig_priv_key         => ''
 }

puppetスクリプトを実行する:

 puppet apply --verbose configure_origin.pp


ブローカ/ノードを分離したホストで動かす設定

ブローカホスト


この設定では、ホスト上で、ブローカ、アクティブMQ、mongodb、バインドサービスが動作する。

以下の内容を含むファイルconfigure_origin.ppを作成する:

 class { 'openshift_origin' :
  #The DNS resolvable hostname of this host
  node_fqdn                  => "thishost.thisdomain.com",
 
  #The domain under which application should be created. Eg: -.example.com
  cloud_domain               => 'example.com',
 
  #Set to `'nightlies'` to pull from latest nightly build
  #Or pass path of your locally built source `'file:///root/origin-rpms'`
  install_repo               => 'nightlies',
 
  #Upstream DNS server.
  dns_servers                => ['8.8.8.8'],
 
  enable_network_services    => true,
  configure_firewall         => true,
  configure_ntp              => true,
 
  #Configure the required services
  configure_activemq         => true,
  configure_mongodb          => true,
  configure_named            => true,
  configure_avahi            => false,
  configure_broker           => true,
 
  #Don't configure the node
  configure_node             => false,
 
  #Enable development mode for more verbose logs
  development_mode           => true,
 
  #Update the nameserver on this host to point at Bind server
  update_network_dns_servers => true,
 
  #Use the nsupdate broker plugin to register application
  broker_dns_plugin          => 'nsupdate',
 
  #If installing from a local build, specify the path for Origin RPMs
  #install_repo               => 'file:///root/origin-rpms',
 
  #If using BIND, let the broker know what TSIG key to use
  named_tsig_priv_key         => ''
 }

puppetスクリプトを実行する:

 puppet apply --verbose configure_origin.pp

ノードホスト

この設定では、ホスト上でノードのみが動作する。

以下の内容を含むファイルconfigure_origin.ppを作成する:

 class { 'openshift_origin' :
  #The DNS resolvable hostname of this host
  node_fqdn                  => "thishost.thisdomain.com",
 
  #The domain under which application should be created. Eg: -.example.com
  cloud_domain               => 'example.com',
 
  #Set to `'nightlies'` to pull from latest nightly build
  #Or pass path of your locally built source `'file:///root/origin-rpms'`
  install_repo               => 'nightlies',
 
  #Upstream DNS server.
  dns_servers                => ['8.8.8.8'],
 
  enable_network_services    => true,
  configure_firewall         => true,
  configure_ntp              => true,
 
  #Don't configure the broker services
  configure_activemq         => false,
  configure_mongodb          => false,
  configure_named            => false,
  configure_avahi            => false,
  configure_broker           => false,
 
  #Configure the node
  configure_node             => true,
  named_ipaddress            => ,
  mongodb_fqdn               => ,
  mq_fqdn                    => ,
  broker_fqdn                => ,
 
  #Enable development mode for more verbose logs
  development_mode           => true,
 
  #Update the nameserver on this host to point at Bind server
  update_network_dns_servers => true,
 
  #Use the nsupdate broker plugin to register application
  broker_dns_plugin          => 'nsupdate',
 
  #If installing from a local build, specify the path for Origin RPMs
  #install_repo               => 'file:///root/origin-rpms',
 }

puppetスクリプトを実行する:

 puppet apply --verbose configure_origin.pp

0 件のコメント:

既存アプリケーションをK8s上でコンテナ化して動かす場合の設計注意事項メモ

既存アプリをK8sなどのコンテナにして動かすには、どこを注意すればいいか..ちょっと調べたときの注意事項をメモにした。   1. The Twelve Factors (日本語訳からの転記) コードベース   バージョン管理されている1つのコードベースと複数のデプロイ 依存関係 ...