【AWS】OpsWorksでGitHubへCookbookをpush後にCookbookをダウンロードしてデプロイする手順【自動化】【DevOps】

公開日時:2020年06月13日 / 最終更新日時:2020年06月13日

AWS OpsWorks で GitHub へ Push した Cookbook をダウンロードしてデプロイする手順について解説します。

自動化や DevOps を実現する 1つの方法です。

 

なかなか AWS OpsWorks が使いこなせていませんが、何度も繰り返し実行して少しずつ理解を進めています。

こういう時にクラウド環境だと非常に助かります。

何度も作っては削除しての繰り返しです。

 

 

 

手順の概要

ざっくりとした手順は以下の通りです。

  1. 別 EC2 インスタンスに Chef バージョン12 をインストールする
  2. Cookbook を作る
  3. 作成した Cookbook を GitHub に Push する
  4. OpsWorks でスタックを作る
  5. スタックに作成した Cookbook を Pull して実行する

 

 

 

 

別 EC2 インスタンスに Chef バージョン 12 をインストールする

2020年現在の OpsWorks のバージョンは「Chef 12」「Chef 11」です。

最新の Chef をインストールすると、バージョンが上がりすぎて OpsWorks で実行するとエラーになるのでバージョンを合わせます。

 

Chef は ChefDK よりインストールします。

 

【Chef】【CentOS7】初心者が Chef Solo をインストールして最初の cookbook を実行する手順【初心者向け】

 

 

 

ChefDK 1.5 をダウンロードする

最初に ChefDK 1.5 をダウンロードします。

 

■ChefDK 1.5 のリリースノート

https://docs.chef.io/release_notes_chefdk/#whats-new-in-15

 

ChefDK 1.5 のリリースノートを確認すると、Chef Client 12.21 のバージョンがインストールされることが確認できます。

 

 

 

 

ChefDK のダウンロードページに移動します。

https://downloads.chef.io/

 

ChefDK の「Get it」ボタンをクリックします。

 

 

 

 

 

過去のバージョンより「1.5.0」をクリックします。

 

 

 

 

「CentOS7」なので「RedHat7」「Download」ボタンをクリックします。

 

 

 

 

ダウンロードした chefdk-1.5.0-1.el7.x86_64.rpm を EC2 インスタンスにアップロードします。

 

 

 

アップロードしたファイル(chefdk-1.5.0-1.el7.x86_64.rpm)を yum コマンドでインストールします。

[root@CentOS7 test]# yum install chefdk-1.5.0-1.el7.x86_64.rpm

 

 

 

chef のバージョン確認をします。

[root@CentOS7 cookbooks]# chef -v 
Chef Development Kit Version: 1.5.0 
chef-client version: 12.21.2 ← バージョンが 12 です。 
delivery version: master (17c1b0fed9be4c70f69091a6d21a4cbf0df60a23) 
berks version: 5.6.4 
kitchen version: 1.16.0 
inspec version: 1.25.1 
[root@CentOS7 cookbooks]# 

 

 

 

chef-solo コマンドでもバージョン確認をします。

[root@CentOS7 cookbooks]# chef-solo -v 
Chef: 12.21.2 ← バージョンが 12 です。 
[root@CentOS7 cookbooks]# 

 

以上で、Chef環境が構築できました。

 

 

 

 

Cookbook を作る

Chef 環境が構築できたので、Cookbook を作成しますが、その前に環境を確認します。

 

環境

 

 

/var/chef/cookbooksディレクトリを作成します。

[root@CentOS7 ~]# mkdir -p /var/chef/cookbooks
[root@CentOS7 ~]#

 

 

 

Cookbook を作成する

/var/chefディレクトリに移動します。

[root@CentOS7 ~]# cd /var/chef
[root@CentOS7 chef]# ls
cookbooks

 

 

cookbookを作成します。

[root@CentOS7 chef]# chef generate cookbook cookbooks/hello 
Generating cookbook hello 
[2020-06-07T20:22:43+09:00] INFO: The plugin path /etc/chef/ohai/plugins does not exist. Skipping... 
- Ensuring correct cookbook file content 
- Ensuring delivery configuration 
- Ensuring correct delivery build cookbook content 
 
Your cookbook is ready. Type `cd cookbooks/hello` to enter it. 
 
There are several commands you can run to get started locally developing and testing your cookbook. 
Type `delivery local --help` to see a full list. 
 
Why not start by writing a test? Tests for the default recipe are stored at: 
 
test/smoke/default/default_test.rb 
 
If you'd prefer to dive right in, the default recipe can be found at: 
 
recipes/default.rb 
 
[root@CentOS7 chef]# 

 

 

 

デフォルトのレシピ(recipe)(default.rb)があるディレクトリに移動します。

[root@CentOS7 chef]# cd cookbooks/hello/recipes/ 
[root@CentOS7 recipes]# ls 
default.rb 

 

 

 

レシピ(recipe)を作成します。

[root@CentOS7 recipes]# vi default.rb 

# Cookbook:: hello 
# Recipe:: default 

# Copyright:: 2020, The Authors, All Rights Reserved. 
 
log "Hello World!" ← この1行を追加します。 

 

 

 

 

作成したレシピを chef-solo コマンドで実行する

作成したレシピを chef-solo コマンドで実行します。

[root@CentOS7 recipes]# chef-solo -o hello 
[2020-06-07T20:24:42+09:00] WARN: ***************************************** 
[2020-06-07T20:24:42+09:00] WARN: Did not find config file: /etc/chef/solo.rb, using command line options. 
[2020-06-07T20:24:42+09:00] WARN: ***************************************** 
[2020-06-07T20:24:42+09:00] WARN: ***************************************** 
[2020-06-07T20:24:42+09:00] WARN: Did not find config file: /etc/chef/client.rb, using command line options. 
[2020-06-07T20:24:42+09:00] WARN: ***************************************** 
[2020-06-07T20:24:42+09:00] INFO: Forking chef instance to converge... 
Starting Chef Client, version 12.21.2 
[2020-06-07T20:24:43+09:00] INFO: *** Chef 12.21.2 *** 
[2020-06-07T20:24:43+09:00] INFO: Platform: x86_64-linux 
[2020-06-07T20:24:43+09:00] INFO: Chef-client pid: 6284 
[2020-06-07T20:24:43+09:00] INFO: The plugin path /etc/chef/ohai/plugins does not exist. Skipping... 
[2020-06-07T20:24:45+09:00] WARN: Run List override has been provided. 
[2020-06-07T20:24:45+09:00] WARN: Original Run List: [] 
[2020-06-07T20:24:45+09:00] WARN: Overridden Run List: [recipe[hello]] 
[2020-06-07T20:24:45+09:00] INFO: Run List is [recipe[hello]] 
[2020-06-07T20:24:45+09:00] INFO: Run List expands to [hello] 
[2020-06-07T20:24:45+09:00] INFO: Starting Chef Run for CentOS7 
[2020-06-07T20:24:45+09:00] INFO: Running start handlers 
[2020-06-07T20:24:45+09:00] INFO: Start handlers complete. 
[2020-06-07T20:24:45+09:00] INFO: HTTP Request Returned 404 Not Found: Object not found: 
resolving cookbooks for run list: ["hello"] 
[2020-06-07T20:24:45+09:00] INFO: Loading cookbooks [hello@0.1.0] 
[2020-06-07T20:24:45+09:00] INFO: Skipping removal of obsoleted cookbooks from the cache 
Synchronizing Cookbooks: 
[2020-06-07T20:24:45+09:00] INFO: Storing updated cookbooks/hello/metadata.rb in the cache. 
[2020-06-07T20:24:45+09:00] INFO: Storing updated cookbooks/hello/recipes/default.rb in the cache. 
[2020-06-07T20:24:45+09:00] INFO: Storing updated cookbooks/hello/Berksfile in the cache. 
[2020-06-07T20:24:45+09:00] INFO: Storing updated cookbooks/hello/chefignore in the cache. 
[2020-06-07T20:24:45+09:00] INFO: Storing updated cookbooks/hello/.kitchen.yml in the cache. 
[2020-06-07T20:24:45+09:00] INFO: Storing updated cookbooks/hello/.gitignore in the cache. 
  - hello (0.1.0) 
Installing Cookbook Gems: 
Compiling Cookbooks... 
[2020-06-07T20:24:45+09:00] INFO: HTTP Request Returned 404 Not Found: Object not found: 
Converging 1 resources 
Recipe: hello::default 
  * log[Hello World!] action write[2020-06-07T20:24:45+09:00] INFO: Processing log[Hello World!] action write (hello::default line 7) 
[2020-06-07T20:24:45+09:00] INFO: Hello World! ← Hello World! のログが出力されています。 
 
 
[2020-06-07T20:24:45+09:00] WARN: Skipping final node save because override_runlist was given 
[2020-06-07T20:24:45+09:00] INFO: Chef Run complete in 0.057830797 seconds 
[2020-06-07T20:24:45+09:00] INFO: Skipping removal of unused files from the cache 
 
Running handlers: 
[2020-06-07T20:24:45+09:00] INFO: Running report handlers 
Running handlers complete 
[2020-06-07T20:24:45+09:00] INFO: Report handlers complete 
Chef Client finished, 1/1 resources updated in 02 seconds 
[root@CentOS7 recipes]# 

 

 

 

 

chef で bind-utils パッケージをインストールする

次に chef で bind-utils パッケージをインストールしてみます。

 

bind-utils 名の Cookbook を作成します。

[root@CentOS7 chef]# chef generate cookbook cookbooks/bind-utils 
Hyphens are discouraged in cookbook names as they may cause problems with custom resources. See https://docs.chef.io/ctl_chef.html#chef-generate-cookbook for more information. 
Generating cookbook bind-utils 
[2020-06-07T20:29:16+09:00] INFO: The plugin path /etc/chef/ohai/plugins does not exist. Skipping... 
- Ensuring correct cookbook file content 
- Ensuring delivery configuration 
- Ensuring correct delivery build cookbook content 
 
Your cookbook is ready. Type `cd cookbooks/bind-utils` to enter it. 
 
There are several commands you can run to get started locally developing and testing your cookbook. 
Type `delivery local --help` to see a full list. 
 
Why not start by writing a test? Tests for the default recipe are stored at: 
 
test/smoke/default/default_test.rb 
 
If you'd prefer to dive right in, the default recipe can be found at: 
 
recipes/default.rb 
 
[root@CentOS7 chef]# 

 

 

 

レシピを編集します。

[root@CentOS7 chef]# cd cookbooks/bind-utils/recipes/ 
[root@CentOS7 recipes]# vi default.rb 

# Cookbook:: bind-utils 
# Recipe:: default 

# Copyright:: 2020, The Authors, All Rights Reserved. 
 
package "bind-utils" do ← 以下、追加します。 
  action :install 
end 

 

 

 

chef-solo コマンドを実行します。

[root@CentOS7 recipes]# chef-solo -o bind-utils 
[2020-06-07T20:31:55+09:00] WARN: ***************************************** 
[2020-06-07T20:31:55+09:00] WARN: Did not find config file: /etc/chef/solo.rb, using command line options. 
[2020-06-07T20:31:55+09:00] WARN: ***************************************** 
[2020-06-07T20:31:55+09:00] WARN: ***************************************** 
[2020-06-07T20:31:55+09:00] WARN: Did not find config file: /etc/chef/client.rb, using command line options. 
[2020-06-07T20:31:55+09:00] WARN: ***************************************** 
[2020-06-07T20:31:55+09:00] INFO: Forking chef instance to converge... 
Starting Chef Client, version 12.21.2 
[2020-06-07T20:31:55+09:00] INFO: *** Chef 12.21.2 *** 
[2020-06-07T20:31:55+09:00] INFO: Platform: x86_64-linux 
[2020-06-07T20:31:55+09:00] INFO: Chef-client pid: 6670 
[2020-06-07T20:31:55+09:00] INFO: The plugin path /etc/chef/ohai/plugins does not exist. Skipping... 
[2020-06-07T20:31:57+09:00] WARN: Run List override has been provided. 
[2020-06-07T20:31:57+09:00] WARN: Original Run List: [] 
[2020-06-07T20:31:57+09:00] WARN: Overridden Run List: [recipe[bind-utils]] 
[2020-06-07T20:31:57+09:00] INFO: Run List is [recipe[bind-utils]] 
[2020-06-07T20:31:57+09:00] INFO: Run List expands to [bind-utils] 
[2020-06-07T20:31:57+09:00] INFO: Starting Chef Run for CentOS7 
[2020-06-07T20:31:57+09:00] INFO: Running start handlers 
[2020-06-07T20:31:57+09:00] INFO: Start handlers complete. 
[2020-06-07T20:31:57+09:00] INFO: HTTP Request Returned 404 Not Found: Object not found: 
resolving cookbooks for run list: ["bind-utils"] 
[2020-06-07T20:31:57+09:00] INFO: Loading cookbooks [bind-utils@0.1.0] 
[2020-06-07T20:31:57+09:00] INFO: Skipping removal of obsoleted cookbooks from the cache 
Synchronizing Cookbooks: 
[2020-06-07T20:31:57+09:00] INFO: Storing updated cookbooks/bind-utils/metadata.rb in the cache. 
[2020-06-07T20:31:57+09:00] INFO: Storing updated cookbooks/bind-utils/Berksfile in the cache. 
[2020-06-07T20:31:57+09:00] INFO: Storing updated cookbooks/bind-utils/chefignore in the cache. 
[2020-06-07T20:31:57+09:00] INFO: Storing updated cookbooks/bind-utils/.kitchen.yml in the cache. 
[2020-06-07T20:31:57+09:00] INFO: Storing updated cookbooks/bind-utils/.gitignore in the cache. 
  - bind-utils (0.1.0) 
Installing Cookbook Gems: 
Compiling Cookbooks... 
[2020-06-07T20:31:57+09:00] INFO: HTTP Request Returned 404 Not Found: Object not found: 
Converging 1 resources 
Recipe: bind-utils::default 
  * yum_package[bind-utils] action install[2020-06-07T20:31:57+09:00] INFO: Processing yum_package[bind-utils] action install (bind-utils::default line 7) 
[2020-06-07T20:32:06+09:00] INFO: yum_package[bind-utils] installing bind-utils-9.11.4-16.P2.el7_8.6 from updates repository 
[2020-06-07T20:32:10+09:00] INFO: yum_package[bind-utils] installed bind-utils at 9.11.4-16.P2.el7_8.6 
 
    - install version 9.11.4-16.P2.el7_8.6 of package bind-utils 
[2020-06-07T20:32:10+09:00] WARN: Skipping final node save because override_runlist was given 
[2020-06-07T20:32:10+09:00] INFO: Chef Run complete in 12.937875698 seconds 
[2020-06-07T20:32:10+09:00] INFO: Skipping removal of unused files from the cache 
 
Running handlers: 
[2020-06-07T20:32:10+09:00] INFO: Running report handlers 
Running handlers complete 
[2020-06-07T20:32:10+09:00] INFO: Report handlers complete 
Chef Client finished, 1/1 resources updated in 15 seconds 
[root@CentOS7 recipes]# 

 

 

動作確認をします。

nslookup コマンドが実行できることを確認します。

[root@CentOS7 recipes]# nslookup google.co.jp ← nslookup コマンドを実行します。 
Server:         172.31.0.2 
Address:        172.31.0.2#53 
 
Non-authoritative answer: 
Name:   google.co.jp 
Address: 172.217.175.227 
Name:   google.co.jp 
Address: 2404:6800:4004:80e::2003 
 
[root@CentOS7 recipes]# 

 

 

 

 

 

作成した Cookbook を GitHub に Push する

作成した Cookbook を GitHub に Push します。

その理由としては、AWS OpsWorks で GitHub からリポジトリを Pull して Cookbook を実行するためとなります。

 

GitHub にアカウント登録する

GitHub(読み方はギットハブ)にアカウントを登録します。

 

GitHub

https://github.co.jp/

 

新規の場合は、「GitHubに登録する」ボタンをクリックします。

 

 

 

アカウントを登録後、もしくはすでに GitHub のアカウントを持っている場合は「サインイン」をクリックします。

 

 

 

 

アカウント名もしくはメールアドレスとパスワードを入力して「Sign in」ボタンをクリックします。

 

 

 

 

ログインしたら、右上のアカウントアイコンをクリックして「Your repositories」をクリックします。

 

 

 

 

 

「New」ボタンをクリックします。

 

 

 

 

 

下図のように設定して「Create repository」ボタンをクリックします。

 

 

 

 

 

 

レポジトリが作成されていることを確認します。

 

 

 

GitHub に Cookbook を Push する

GitHub のレポジトリを作成したら、そのレポジトリに Cookbook を Push します。

 

git コマンドをインストールします。

[root@CentOS7 ~]# yum install git

 

 

 

git コマンドのバージョンを確認します。

[root@CentOS7 chef]# git --version 
git version 1.8.3.1 
[root@CentOS7 chef]#

 

 

 

 

ユーザー登録をします。

[root@CentOS7 ~]# git config --global user.email "xxxxx@gmail.com"

 

 

 

 

/var/chef/cookbooks ディレクトリに移動してリポジトリを新規作成します。

[root@CentOS7 cookbooks]# pwd 
/var/chef/cookbooks 
[root@CentOS7 cookbooks]# git init 
Initialized empty Git repository in /var/chef/cookbooks/.git/ 
[root@CentOS7 cookbooks]# 

 

 

 

カレントディレクトリをインデックスに追加します。

[root@CentOS7 cookbooks]# git add . 

 

 

 

 

最初のコミットをします。

[root@CentOS7 cookbooks]# git commit -m "first commit" 
[master (root-commit) cc61c5d] first commit 
 53 files changed, 1227 insertions(+) 
 create mode 100644 bind-utils/.delivery/project.toml 
 create mode 100644 bind-utils/.gitignore 
 create mode 100644 bind-utils/CHANGELOG.md 
 create mode 100644 bind-utils/LICENSE 
 create mode 100644 bind-utils/Policyfile.rb 
 create mode 100644 bind-utils/README.md 
 create mode 100644 bind-utils/chefignore 
 create mode 100644 bind-utils/kitchen.yml 
 create mode 100644 bind-utils/metadata.rb 
 create mode 100644 bind-utils/recipes/default.rb 
 create mode 100644 bind-utils/spec/spec_helper.rb 
 create mode 100644 bind-utils/spec/unit/recipes/default_spec.rb 
 create mode 100644 bind-utils/test/integration/default/default_test.rb 
 create mode 100644 hello/.delivery/project.toml 
 create mode 100644 hello/.gitignore 
 create mode 100644 hello/.kitchen.yml 
 create mode 100644 hello/Berksfile 
 create mode 100644 hello/CHANGELOG.md 
 create mode 100644 hello/LICENSE 
 create mode 100644 hello/Policyfile.rb 
 create mode 100644 hello/README.md 
 create mode 100644 hello/chefignore 
 create mode 100644 hello/kitchen.yml 
 create mode 100644 hello/metadata.rb 
 create mode 100644 hello/recipes/default.rb 
 create mode 100644 hello/spec/spec_helper.rb 
 create mode 100644 hello/spec/unit/recipes/default_spec.rb 
 create mode 100644 hello/test/integration/default/default_test.rb 
 create mode 100644 hello/test/smoke/default/default_test.rb 
[root@CentOS7 cookbooks]# 

 

 

 

GitHub にリポジトリを登録します。

[root@CentOS7 cookbooks]# git remote add origin https://github.com/xxxx/test1.git
[root@CentOS7 cookbooks]#

 

 

 

GitHub に Cookbook を Push します。

[root@CentOS7 cookbooks]# git push -u origin master 
Username for 'https://github.com': xxxxx ← GitHub のアカウント名を入力します。 
Password for 'https://xxxxx@github.com': ← パスワードを入力します。 
Counting objects: 76, done. 
Delta compression using up to 2 threads. 
Compressing objects: 100% (49/49), done. 
Writing objects: 100% (76/76), 9.41 KiB | 0 bytes/s, done. 
Total 76 (delta 16), reused 0 (delta 0) 
remote: Resolving deltas: 100% (16/16), done. 
To https://github.com/xxxxx/Test1.git 
 * [new branch]      master -> master 
Branch master set up to track remote branch master from origin. 
[root@CentOS7 cookbooks]# 

 

 

 

 

 

AWS OpsWorks でスタックを作る

AWS 管理画面より OpsWorks に移動します。

 

 

 

 

左側ペインより「Stacks」を選択します。

 

 

 

 

 

最初にスタック(Stack)を作成します。「Add your first stack」ボタンをクリックします。

 

 

 

 

「Add stack」画面で以下のように設定します。

更に下へスクロールします。

 

 

 

更に下図のように設定します。

設定が終わったら「Add stack」ボタンをクリックします。

 

 

 

 

 

 

 

しばらく経つとスタックの作成が完了するのでレイヤーを追加します。

「Add a layer」をクリックします。

 

 

 

 

 

Add layer 画面で「OpsWorks」タブを選択し以下のように設定します。

設定が終わったら「Add layer」ボタンをクリックします。

 

 

 

 

続けて「Add instance」をクリックします。

 

 

 

 

インスタンスの設定画面で以下のように設定します。

設定が終わったら「Add instance」ボタンをクリックします。

 

 

 

 

「start」をクリックしてインスタンスを起動します。

 

 

 

しばらくして「Status」「online」になることを確認します。

 

 

 

 

スタックに作成した Cookbook を Pull して実行する

ステータスが「online」になったら「Stack」に移動します。

 

 

 

 

 

「Run Command」ボタンをクリックします。

 

 

 

「Run Command」画面で以下のように設定します。

設定が終わったら「Update Custom Cookbooks」ボタンをクリックします。

 

 

 

 

「Running command update_custom_cookbooks」画面でステータスが「successful」になったことを確認し「show」をクリックします。

 

 

 

 

 

ログを確認します。

Instance: tl11     
Stack: TestStack01     
Layer:      
TestLayer01     
Type: update_custom_cookbooks     
Created at: 2020-06-07 07:22:48 UTC Download log file     
1    [2020-06-07T07:23:03+00:00] INFO: AWS OpsWorks instance 7617c965-d94c-4bc5-9c67-fc6717a134d9, Agent version 4039-20200430042739, Command: update_custom_cookbooks with id 6dd35faf-f165-4934-b7ad-42de1867deb3 
2    [2020-06-07T07:23:04+00:00] INFO: Started chef-zero at chefzero://localhost:8889 with repository at /opt/aws/opsworks/current 
3    One version per cookbook 
4    data_bags at /var/lib/aws/opsworks/data.internal/data_bags 
5    nodes at / 
6     
7    [2020-06-07T07:23:04+00:00] INFO: Forking chef instance to converge... 
8    [2020-06-07T07:23:04+00:00] INFO: *** Chef 12.13.37 *** 
9    [2020-06-07T07:23:04+00:00] INFO: Platform: x86_64-linux 
10    [2020-06-07T07:23:04+00:00] INFO: Chef-client pid: 2748 
11    [2020-06-07T07:23:04+00:00] WARN: The plugin path /opt/aws/opsworks/current/plugins does not exist. Skipping... 
12    [2020-06-07T07:23:05+00:00] WARN: Run List override has been provided. 
13    [2020-06-07T07:23:05+00:00] WARN: Original Run List: [] 
14    [2020-06-07T07:23:05+00:00] WARN: Overridden Run List: [recipe[aws_opsworks_agent]] 
15    [2020-06-07T07:23:05+00:00] INFO: Run List is [recipe[aws_opsworks_agent]] 
16    [2020-06-07T07:23:05+00:00] INFO: Run List expands to [aws_opsworks_agent] 
17    [2020-06-07T07:23:05+00:00] INFO: Starting Chef Run for tl11.localdomain 
18    [2020-06-07T07:23:05+00:00] INFO: Running start handlers 
19    [2020-06-07T07:23:05+00:00] INFO: Start handlers complete. 
20    [2020-06-07T07:23:05+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found:  
21    [2020-06-07T07:23:06+00:00] INFO: Loading cookbooks [aws_opsworks_agent@0.1.0, aws_opsworks_helpers@0.1.0, aws_opsworks_agent_version@1.0.0, aws_opsworks_ebs@2.0.0, aws_opsworks_users@1.0.0, aws_opsworks_system@0.1.0, aws_opsworks_custom_cookbooks@1.0.0, aws_opsworks_custom_run@0.1.0, aws_opsworks_ecs@1.0.0, aws_opsworks_cloudwatchlogs@1.0.0, s3_file@2.6.6] 
22    [2020-06-07T07:23:06+00:00] INFO: Skipping removal of obsoleted cookbooks from the cache 
23    [2020-06-07T07:23:06+00:00] INFO: Cleaning up 0 from /var/lib/aws/opsworks/chef/ 
24    [2020-06-07T07:23:06+00:00] INFO: Processing directory[default /var/chef/cookbooks] action delete (aws_opsworks_custom_cookbooks::default line 8) 
25    [2020-06-07T07:23:06+00:00] INFO: directory[default /var/chef/cookbooks] deleted /var/chef/cookbooks recursively 
26    [2020-06-07T07:23:06+00:00] INFO: Processing directory[/var/chef] action create (aws_opsworks_custom_cookbooks::checkout line 4) 
27    [2020-06-07T07:23:06+00:00] INFO: Processing yum_package[git] action install (aws_opsworks_custom_cookbooks::checkout_git line 3) 
28    [2020-06-07T07:23:07+00:00] INFO: Processing git[Download Custom Cookbooks] action checkout (aws_opsworks_custom_cookbooks::checkout_git line 32) 
29    [2020-06-07T07:23:08+00:00] INFO: git[Download Custom Cookbooks] cloning repo https://github.com/xxxx/test1.git to /var/chef/cookbooks 
30    [2020-06-07T07:23:09+00:00] INFO: git[Download Custom Cookbooks] checked out branch: HEAD onto: deploy reference: cc61c5de38339ce8caa56680d0114ef4a16d8c22 
31    [2020-06-07T07:23:09+00:00] INFO: git[Download Custom Cookbooks] sending run action to execute[Update custom cookbook Git submodules] (immediate) 
32    [2020-06-07T07:23:09+00:00] INFO: Processing execute[Update custom cookbook Git submodules] action run (aws_opsworks_custom_cookbooks::checkout_git line 56) 
33    [2020-06-07T07:23:09+00:00] INFO: execute[Update custom cookbook Git submodules] ran successfully 
34    [2020-06-07T07:23:09+00:00] INFO: Processing execute[Update custom cookbook Git submodules] action nothing (aws_opsworks_custom_cookbooks::checkout_git line 56) 
35    [2020-06-07T07:23:09+00:00] INFO: Processing ruby_block[Move single cookbook contents into appropriate subdirectory] action run (aws_opsworks_custom_cookbooks::checkout line 20) 
36    [2020-06-07T07:23:09+00:00] INFO: Processing execute[ensure correct permissions of custom cookbooks] action run (aws_opsworks_custom_cookbooks::checkout line 37) 
37    [2020-06-07T07:23:09+00:00] INFO: execute[ensure correct permissions of custom cookbooks] ran successfully 
38    [2020-06-07T07:23:09+00:00] INFO: Processing template[/etc/hosts] action create (aws_opsworks_system::hosts line 1) 
39    [2020-06-07T07:23:09+00:00] INFO: Processing template[/etc/motd.opsworks-static] action create (aws_opsworks_system::motd line 1) 
40    [2020-06-07T07:23:09+00:00] INFO: Processing remote_file[/var/lib/aws/opsworks/cache.internal/chef-12.18.31-1.el7.x86_64.rpm] action create (aws_opsworks_system::chef line 17) 
41    [2020-06-07T07:23:10+00:00] INFO: Processing yum_package[chef-client] action upgrade (aws_opsworks_system::chef line 24) 
42    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/etc/chef/ohai/hints] action create (aws_opsworks_system::chef line 32) 
43    [2020-06-07T07:23:14+00:00] INFO: Processing file[/etc/chef/ohai/hints/ec2.json] action touch (aws_opsworks_system::chef line 37) 
44    [2020-06-07T07:23:14+00:00] INFO: file[/etc/chef/ohai/hints/ec2.json] updated atime and mtime to 2020-06-07 07:23:14 +0000 
45    [2020-06-07T07:23:14+00:00] INFO: Processing ruby_block[patch ohai platform] action run (aws_opsworks_system::chef line 43) 
46    [2020-06-07T07:23:14+00:00] INFO: ruby_block[patch ohai platform] called 
47    [2020-06-07T07:23:14+00:00] INFO: Processing log[Cleaning up 0 from /var/chef/runs/] action write (aws_opsworks_system::cleanup line 35) 
48    [2020-06-07T07:23:14+00:00] INFO: Cleaning up 0 from /var/chef/runs/ 
49    [2020-06-07T07:23:14+00:00] INFO: Processing aws_opsworks_custom_run[6dd35faf-f165-4934-b7ad-42de1867deb3] action prepare (aws_opsworks_custom_run::default line 3) 
50    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/var/chef] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 75) 
51    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/var/chef/runs] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 82) 
52    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 87) 
53    [2020-06-07T07:23:14+00:00] INFO: directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3] created directory /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3 
54    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 92) 
55    [2020-06-07T07:23:14+00:00] INFO: directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags] created directory /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags 
56    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/nodes] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 97) 
57    [2020-06-07T07:23:14+00:00] INFO: directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/nodes] created directory /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/nodes 
58    [2020-06-07T07:23:14+00:00] INFO: Processing template[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/client.rb] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 106) 
59    [2020-06-07T07:23:14+00:00] INFO: template[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/client.rb] created file /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/client.rb 
60    [2020-06-07T07:23:14+00:00] INFO: template[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/client.rb] updated file contents /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/client.rb 
61    [2020-06-07T07:23:14+00:00] INFO: Processing file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/attribs.json] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 114) 
62    [2020-06-07T07:23:14+00:00] INFO: file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/attribs.json] created file /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/attribs.json 
63    [2020-06-07T07:23:14+00:00] INFO: file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/attribs.json] updated file contents /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/attribs.json 
64    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_app] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124) 
65    [2020-06-07T07:23:14+00:00] INFO: directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_app] created directory /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_app 
66    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_instance] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124) 
67    [2020-06-07T07:23:14+00:00] INFO: directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_instance] created directory /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_instance 
68    [2020-06-07T07:23:14+00:00] INFO: Processing file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_instance/tl11.json] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 208) 
69    [2020-06-07T07:23:14+00:00] INFO: file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_instance/tl11.json] created file /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_instance/tl11.json 
70    [2020-06-07T07:23:14+00:00] INFO: file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_instance/tl11.json] updated file contents /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_instance/tl11.json 
71    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_layer] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124) 
72    [2020-06-07T07:23:14+00:00] INFO: directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_layer] created directory /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_layer 
73    [2020-06-07T07:23:14+00:00] INFO: Processing file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_layer/tl1.json] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 208) 
74    [2020-06-07T07:23:14+00:00] INFO: file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_layer/tl1.json] created file /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_layer/tl1.json 
75    [2020-06-07T07:23:14+00:00] INFO: file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_layer/tl1.json] updated file contents /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_layer/tl1.json 
76    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_stack] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124) 
77    [2020-06-07T07:23:14+00:00] INFO: directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_stack] created directory /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_stack 
78    [2020-06-07T07:23:14+00:00] INFO: Processing file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_stack/662d14dc-a696-4fdb-8944-3d68cb19b50c.json] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 208) 
79    [2020-06-07T07:23:14+00:00] INFO: file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_stack/662d14dc-a696-4fdb-8944-3d68cb19b50c.json] created file /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_stack/662d14dc-a696-4fdb-8944-3d68cb19b50c.json 
80    [2020-06-07T07:23:14+00:00] INFO: file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_stack/662d14dc-a696-4fdb-8944-3d68cb19b50c.json] updated file contents /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_stack/662d14dc-a696-4fdb-8944-3d68cb19b50c.json 
81    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_command] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124) 
82    [2020-06-07T07:23:14+00:00] INFO: directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_command] created directory /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_command 
83    [2020-06-07T07:23:14+00:00] INFO: Processing file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_command/6dd35faf-f165-4934-b7ad-42de1867deb3.json] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 208) 
84    [2020-06-07T07:23:14+00:00] INFO: file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_command/6dd35faf-f165-4934-b7ad-42de1867deb3.json] created file /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_command/6dd35faf-f165-4934-b7ad-42de1867deb3.json 
85    [2020-06-07T07:23:14+00:00] INFO: file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_command/6dd35faf-f165-4934-b7ad-42de1867deb3.json] updated file contents /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_command/6dd35faf-f165-4934-b7ad-42de1867deb3.json 
86    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_user] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124) 
87    [2020-06-07T07:23:14+00:00] INFO: directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_user] created directory /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_user 
88    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_elastic_load_balancer] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124) 
89    [2020-06-07T07:23:14+00:00] INFO: directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_elastic_load_balancer] created directory /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_elastic_load_balancer 
90    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_rds_db_instance] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124) 
91    [2020-06-07T07:23:14+00:00] INFO: directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_rds_db_instance] created directory /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_rds_db_instance 
92    [2020-06-07T07:23:14+00:00] INFO: Processing directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_ecs_cluster] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 124) 
93    [2020-06-07T07:23:14+00:00] INFO: directory[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_ecs_cluster] created directory /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags/aws_opsworks_ecs_cluster 
94    [2020-06-07T07:23:14+00:00] INFO: Processing file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/nodes/tl11.localdomain.json] action create (/var/lib/aws/opsworks/cache.internal/cookbooks/aws_opsworks_custom_run/providers/default.rb line 178) 
95    [2020-06-07T07:23:14+00:00] INFO: file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/nodes/tl11.localdomain.json] created file /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/nodes/tl11.localdomain.json 
96    [2020-06-07T07:23:14+00:00] INFO: file[/var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/nodes/tl11.localdomain.json] updated file contents /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/nodes/tl11.localdomain.json 
97    [2020-06-07T07:23:14+00:00] WARN: Skipping final node save because override_runlist was given 
98    [2020-06-07T07:23:14+00:00] INFO: Chef Run complete in 8.875570674 seconds 
99    [2020-06-07T07:23:14+00:00] INFO: Skipping removal of unused files from the cache 
100    [2020-06-07T07:23:14+00:00] INFO: Running report handlers 
101    [2020-06-07T07:23:14+00:00] INFO: Report handlers complete 
102     
103    [2020-06-07T07:23:15+00:00] INFO: Started chef-zero at chefzero://localhost:8889 with repository at /var/chef 
104    One version per cookbook 
105    data_bags at /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/data_bags 
106    nodes at /var/chef/runs/6dd35faf-f165-4934-b7ad-42de1867deb3/nodes 
107     
108    [2020-06-07T07:23:15+00:00] INFO: Forking chef instance to converge... 
109    [2020-06-07T07:23:15+00:00] INFO: *** Chef 12.18.31 *** 
110    [2020-06-07T07:23:15+00:00] INFO: Platform: x86_64-linux 
111    [2020-06-07T07:23:15+00:00] INFO: Chef-client pid: 3101 
112    [2020-06-07T07:23:17+00:00] INFO: Setting the run_list to [] from CLI options 
113    [2020-06-07T07:23:17+00:00] INFO: Run List is [] 
114    [2020-06-07T07:23:17+00:00] INFO: Run List expands to [] 
115    [2020-06-07T07:23:17+00:00] INFO: Starting Chef Run for tl11 
116    [2020-06-07T07:23:17+00:00] INFO: Running start handlers 
117    [2020-06-07T07:23:17+00:00] INFO: Start handlers complete. 
118    [2020-06-07T07:23:17+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found:  
119    [2020-06-07T07:23:17+00:00] INFO: Loading cookbooks [] 
120    [2020-06-07T07:23:17+00:00] WARN: Node tl11.localdomain has an empty run list. 
121    [2020-06-07T07:23:17+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: chefzero://localhost:8889/nodes/tl11 
122    [2020-06-07T07:23:17+00:00] INFO: Chef Run complete in 0.05625041 seconds 
123    [2020-06-07T07:23:17+00:00] INFO: Running report handlers 
124    [2020-06-07T07:23:17+00:00] INFO: Report handlers complete 

 

 

 

 

 

Cookbook 名が hello のレシピを実行する

次に特定のレシピを実行します。

再度「Stack」をクリックします。

 

 

 

 

 

「Run Command」ボタンをクリックします。

 

 

 

 

「Run Command」画面で以下のように設定します。

設定が終わったら「Execute Recipes」ボタンをクリックします。

 

 

 

 

 

 

 

「Status」「successful」になったら「show」をクリックします。

 

 

 

ログの内容を確認します。

 

 

 

 

 

Cookbook 名が bind-utils のレシピを実行する

今度は別の Cookbook(bind-utils)のレシピを試してみます。

 

「Repeat」ボタンをクリックします。

 

 

 

 

「Run Command」画面で以下のように設定します。

設定が終わったら「Execute Recipes」ボタンをクリックします。

 

 

 

 

 

レシピの実行が完了したら「show」をクリックします。

 

 

 

ログの内容を確認します。

 

 

 

 

 

[2020-06-07T12:26:05+00:00] INFO: Started chef-zero at chefzero://localhost:8889 with repository at /var/chef 
One version per cookbook 
data_bags at /var/chef/runs/c642222a-c3ac-4d08-a1df-4228dc7a1a4e/data_bags 
nodes at /var/chef/runs/c642222a-c3ac-4d08-a1df-4228dc7a1a4e/nodes 
 
[2020-06-07T12:26:05+00:00] INFO: Forking chef instance to converge... 
[2020-06-07T12:26:05+00:00] INFO: *** Chef 12.18.31 *** 
[2020-06-07T12:26:05+00:00] INFO: Platform: x86_64-linux 
[2020-06-07T12:26:05+00:00] INFO: Chef-client pid: 4542 
[2020-06-07T12:26:06+00:00] INFO: Setting the run_list to ["recipe[bind-utils::default]"] from CLI options 
[2020-06-07T12:26:06+00:00] INFO: Run List is [recipe[bind-utils::default]] 
[2020-06-07T12:26:06+00:00] INFO: Run List expands to [bind-utils::default] 
[2020-06-07T12:26:06+00:00] INFO: Starting Chef Run for tl11 
[2020-06-07T12:26:06+00:00] INFO: Running start handlers 
[2020-06-07T12:26:06+00:00] INFO: Start handlers complete. 
[2020-06-07T12:26:06+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found:  
[2020-06-07T12:26:06+00:00] INFO: Loading cookbooks [bind-utils@0.1.0] 
[2020-06-07T12:26:07+00:00] INFO: Storing updated cookbooks/bind-utils/recipes/default.rb in the cache. 
[2020-06-07T12:26:07+00:00] INFO: Storing updated cookbooks/bind-utils/metadata.rb in the cache. 
[2020-06-07T12:26:07+00:00] INFO: Storing updated cookbooks/bind-utils/.gitignore in the cache. 
[2020-06-07T12:26:07+00:00] INFO: Storing updated cookbooks/bind-utils/.kitchen.yml in the cache. 
[2020-06-07T12:26:07+00:00] INFO: Storing updated cookbooks/bind-utils/Berksfile in the cache. 
[2020-06-07T12:26:07+00:00] INFO: Storing updated cookbooks/bind-utils/CHANGELOG.md in the cache. 
[2020-06-07T12:26:07+00:00] INFO: Storing updated cookbooks/bind-utils/LICENSE in the cache. 
[2020-06-07T12:26:07+00:00] INFO: Storing updated cookbooks/bind-utils/Policyfile.rb in the cache. 
[2020-06-07T12:26:07+00:00] INFO: Storing updated cookbooks/bind-utils/README.md in the cache. 
[2020-06-07T12:26:07+00:00] INFO: Storing updated cookbooks/bind-utils/chefignore in the cache. 
[2020-06-07T12:26:07+00:00] INFO: Storing updated cookbooks/bind-utils/kitchen.yml in the cache. 
[2020-06-07T12:26:07+00:00] INFO: Processing yum_package[bind-utils] action install (bind-utils::default line 7) 
[2020-06-07T12:26:08+00:00] INFO: yum_package[bind-utils] installing bind-utils-9.11.4-16.P2.el7_8.6 from updates repository 
[2020-06-07T12:26:10+00:00] INFO: yum_package[bind-utils] installed bind-utils at 9.11.4-16.P2.el7_8.6 
[2020-06-07T12:26:10+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: chefzero://localhost:8889/nodes/tl11 
[2020-06-07T12:26:10+00:00] INFO: Chef Run complete in 3.401298042 seconds 
[2020-06-07T12:26:10+00:00] INFO: Running report handlers 
[2020-06-07T12:26:10+00:00] INFO: Report handlers complete 

 

 

 

 

確認

実際に nslookup がインストールされたのか確認します。

 This instance is managed with AWS OpsWorks. 
 
   ######  OpsWorks Summary  ###### 
   Operating System: centos 7.8.2003 
   OpsWorks Instance: tl11 
   OpsWorks Instance ID: 69b249f9-b4f0-4eb1-8c6a-e68273de8cbc 
   OpsWorks Layers: TestLayer01 
   OpsWorks Stack: TestStack01 
   EC2 Region: ap-northeast-1 
   EC2 Availability Zone: ap-northeast-1a 
   EC2 Instance ID: i-0xxxxxxxxxxx 
   Public IP: xx.xx.xx.xx
   Private IP: 172.31.33.112 
   VPC ID: vpc-0xxxxxxxxxxxxxx 
   Subnet ID: subnet-0xxxxxxxxxxxxx 
 
 Visit http://aws.amazon.com/opsworks for more information. 
[centos@tl11 ~]$ 
[centos@tl11 ~]$ 
[centos@tl11 ~]$ nslookup google.co.jp 
Server:         172.31.0.2 
Address:        172.31.0.2#53 
 
Non-authoritative answer: 
Name:   google.co.jp 
Address: 216.58.197.163 
Name:   google.co.jp 
Address: 2404:6800:4004:819::2003 
 
[centos@tl11 ~]$ 

 

 

 

 

 

 

 

 

Posted by 100%レンタルサーバーを使いこなすサイト管理人

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

AlphaOmega Captcha Medica  –  What Do You See?
     
 

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

Secured By miniOrange