5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Cisco Nexus を Puppet で設定する1

Last updated at Posted at 2016-01-05

本稿の構成

タイトル 内容 コメント
Cisco Nexus を Puppet で設定する1 Puppet Master のインストール 元ネタ:Installing Puppet: Linux
Cisco Nexus を Puppet で設定する2a Puppet Agent のインストール・Bash編 元ネタ:Puppet Agent Installation & Setup: Cisco Nexus
Cisco Nexus を Puppet で設定する2b Puppet Agent のインストール・guestshell編 未完成
Cisco Nexus を Puppet で設定する3 puppetlabs-ciscopuppet モジュールのインストール 元ネタ:cisco-network-puppet-module: Example Manifest Usage

はじめに

Cisco Nexus3048 を Puppet で設定する環境を構築した際のメモです

使用バージョンの決定

  • Nexus3048

Puppet Agent を利用可能な Nexus3000 シリーズのバージョンは 7.0(3)I2(1) 以上が必要。この条件を満たし、かつ 2016/4/25 時点で最新の安定バージョン 7.0(3)I2(2a) を本稿では使用する。

  • Puppet

こちら によると、Nexus へインストールする Puppet Agent は 2016/4/25 時点で Puppet version 4.0 または Puppet Enterprise 2015.2 に対応する。

PuppetServer2.1 のリリースノートに以下の記述を発見:
As with Puppet 4.0, Puppet Server 2.0 is now distributed via the new Puppet Collection repositories. Puppet Server 2.0 is part of Puppet Collection 1.

Puppet4.0 のコンポーネントである PuppetServer 2.0 は PuppetCollection1 にてインストールできる模様。今回は CentOS6.x を使用するのでインストールファイルはこちらからダウンロード可能。pc1 には 0.9.2, 1.0.0-1, 1.0.0-2 の三種類が存在するが今回は puppetlabs-release-pc1-1.0.0-1.el6.noarch.rpm を、PuppetServer は日付の近い puppetserver-2.1.2-1.el6.noarch.rpm を使用することにした。

以下 Puppet をこちらの記述に従ってインストールする

Puppet のインストール

Puppet インストール手順

[root@localhost ~]# rpm -Uvh https://yum.puppetlabs.com/el/6x/PC1/x86_64/puppetlabs-release-pc1-1.0.0-1.el6.noarch.rpm
[root@localhost ~]# yum install puppetserver-2.1.2

Puppet Server を起動

# service puppetserver start
Starting puppetserver:                                     [  OK  ]

PATH を通す:

# export PATH=/opt/puppetlabs/bin:$PATH

Firewall の設定を確認する:

# iptables -L --line-numbers

サンプルログ:

# iptables -L --line-numbers
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination

...

9    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http
10   ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:irdmi

...

Puppet Agent から通信を許可するよう設定を変更する。TCP 8140 を通せばよい。9行目と10行目の間に挿入するのであれば:

# iptables -I INPUT 10 -p tcp --dport 8140 -j ACCEPT

修正が反映されたか確認して保存:

# iptables -L --line-numbers
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination

...

9    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http
10   ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:8140
11   ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:irdmi

...

# service iptables save
# cat /etc/sysconfig/iptables

Puppet Server 2.2 の設定

設定方法はこちら

設定を表示:

puppet config print

Nexus3048 側の作業は 続き:Cisco Nexus を Puppet で設定する2

5
5
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?