WordPress環境構築におけるMySQLの設定とChef上達のポイントサーバー管理者のためのChef超入門(終)(2/3 ページ)

» 2015年09月10日 05時00分 公開
[大喜多利哉@IT]

リモートノードを作成してレシピを実行

 新規にリモートノードを作成して、レシピを実行してみましょう(ここではリモートノードの名称を「node01.ec2.tokyo」としています)。

 インターネット上から接続できることを確認するために、検証用リモートノードには「さくらのクラウド」を利用しました。

$ sudo bundle exec knife zero bootstrap node01.ec2.tokyo -x <ユーザー名> -P <パスワード> --sudo
$ sudo knife node run_list add node01.ec2.tokyo 'recipe[yum-epel]'
$ sudo knife node run_list add node01.ec2.tokyo 'recipe[yum-remi]'
$ sudo knife node run_list add node01.ec2.tokyo 'recipe[wordpress01]'
$ sudo bundle exec knife zero chef_client 'name:node01.ec2.tokyo' -x <ユーザー名> -P <パスワード> ?-sudo

 このコマンドを実行した結果が、下記「実行結果その1」「実行結果その2」です(長いですが、そのまま記載してあります)。

$ sudo bundle exec knife zero bootstrap node01.ec2.tokyo -x ookita -P ******** --sudo
Connecting to node01.ec2.tokyo
node01.ec2.tokyo Installing Chef Client...
node01.ec2.tokyo --2015-07-29 01:01:59--  https://www.opscode.com/chef/install.sh
node01.ec2.tokyo Resolving www.opscode.com... 184.106.28.91
node01.ec2.tokyo Connecting to www.opscode.com|184.106.28.91|:443... connected.
node01.ec2.tokyo HTTP request sent, awaiting response... 200 OK
node01.ec2.tokyo Length: 18736 (18K) [application/x-sh]
node01.ec2.tokyo Saving to: `STDOUT'
node01.ec2.tokyo
100%[======================================>] 18,736      --.-K/s   in 0.002s
node01.ec2.tokyo
node01.ec2.tokyo 2015-07-29 01:02:00 (10.9 MB/s) - written to stdout [18736/18736]
node01.ec2.tokyo
node01.ec2.tokyo Downloading Chef 12 for el...
node01.ec2.tokyo downloading https://www.opscode.com/chef/metadata?v=12&prerelease=false&nightlies=false&p=el&pv=6&m=x86_64
node01.ec2.tokyo   to file /tmp/install.sh.1227/metadata.txt
node01.ec2.tokyo trying wget...
node01.ec2.tokyo url    https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chef-12.4.1-1.el6.x86_64.rpm
node01.ec2.tokyo md5    f09a9ae589bb9040232c600b008ef812
node01.ec2.tokyo sha256 95150a4b3c3b2313bd206876e09e2fcf742f2fa4611951d52c79225becb32928
node01.ec2.tokyo downloaded metadata file looks valid...
node01.ec2.tokyo downloading https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chef-12.4.1-1.el6.x86_64.rpm
node01.ec2.tokyo   to file /tmp/install.sh.1227/chef-12.4.1-1.el6.x86_64.rpm
node01.ec2.tokyo trying wget...
node01.ec2.tokyo Comparing checksum with sha256sum...
node01.ec2.tokyo Installing Chef 12
node01.ec2.tokyo installing with rpm...
node01.ec2.tokyo warning: /tmp/install.sh.1227/chef-12.4.1-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
node01.ec2.tokyo Preparing...                                                   ########################################### [100%]
node01.ec2.tokyo    1:chef                                                      ########################################### [100%]
node01.ec2.tokyo Thank you for installing Chef!
node01.ec2.tokyo Starting first Chef Client run...
node01.ec2.tokyo Starting Chef Client, version 12.4.1
node01.ec2.tokyo Creating a new client identity for node01.ec2.tokyo using the validator key.
node01.ec2.tokyo resolving cookbooks for run list: []
node01.ec2.tokyo Synchronizing Cookbooks:
node01.ec2.tokyo Compiling Cookbooks...
node01.ec2.tokyo [2015-07-29T01:02:17+09:00] WARN: Node node01.ec2.tokyo has an empty run list.
node01.ec2.tokyo Converging 0 resources
node01.ec2.tokyo
node01.ec2.tokyo Running handlers:
node01.ec2.tokyo Running handlers complete
node01.ec2.tokyo Chef Client finished, 0/0 resources updated in 1.862831572 seconds
[ookita@chefzero01 chef-repo]$ sudo knife node run_list add node01.ec2.tokyo 'recipe[yum-epel]'
node01.ec2.tokyo:
  run_list: recipe[yum-epel]
[ookita@chefzero01 chef-repo]$ sudo knife node run_list add node01.ec2.tokyo 'recipe[yum-remi]'
node01.ec2.tokyo:
  run_list:
    recipe[yum-epel]
    recipe[yum-remi]
[ookita@chefzero01 chef-repo]$ sudo knife node run_list add node01.ec2.tokyo 'recipe[wordpress01]'
node01.ec2.tokyo:
  run_list:
    recipe[yum-epel]
    recipe[yum-remi]
    recipe[wordpress01]
実行結果その1
[ookita@chefzero01 chef-repo]$ sudo bundle exec knife zero chef_client 'name:ne01.ec2.tokyo' -x ookita -P ******** --sudo
node01.ec2.tokyo Starting Chef Client, version 12.4.1
node01.ec2.tokyo resolving cookbooks for run list: ["yum-epel", "yum-remi", "wordpress01"]
node01.ec2.tokyo Synchronizing Cookbooks:
node01.ec2.tokyo   - yum-epel
node01.ec2.tokyo   - yum-remi
node01.ec2.tokyo   - wordpress01
node01.ec2.tokyo   - yum
node01.ec2.tokyo Compiling Cookbooks...
node01.ec2.tokyo Converging 15 resources
node01.ec2.tokyo Recipe: yum-epel::default
node01.ec2.tokyo   * yum_repository[epel] action create
node01.ec2.tokyo     * template[/etc/yum.repos.d/epel.repo] action create
node01.ec2.tokyo       - update content in file /etc/yum.repos.d/epel.repo from cd4915 to b89733
node01.ec2.tokyo       --- /etc/yum.repos.d/epel.repo   2012-11-05 12:52:17.000000000 +0900
node01.ec2.tokyo       +++ /tmp/chef-rendered-template20150729-1823-ya68yl      2015-07-29 01:05:46.029244788 +0900
node01.ec2.tokyo       @@ -1,27 +1,12 @@
node01.ec2.tokyo       +# This file was generated by Chef
node01.ec2.tokyo       +# Do NOT modify this file by hand.
node01.ec2.tokyo       +
node01.ec2.tokyo        [epel]
node01.ec2.tokyo        name=Extra Packages for Enterprise Linux 6 - $basearch
node01.ec2.tokyo       -#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
node01.ec2.tokyo       -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
node01.ec2.tokyo       -failovermethod=priority
node01.ec2.tokyo        enabled=1
node01.ec2.tokyo       -gpgcheck=1
node01.ec2.tokyo       -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
node01.ec2.tokyo       -
node01.ec2.tokyo       -[epel-debuginfo]
node01.ec2.tokyo       -name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
node01.ec2.tokyo       -#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
node01.ec2.tokyo       -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
node01.ec2.tokyo        failovermethod=priority
node01.ec2.tokyo       -enabled=0
node01.ec2.tokyo       -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
node01.ec2.tokyo        gpgcheck=1
node01.ec2.tokyo       -
node01.ec2.tokyo       -[epel-source]
node01.ec2.tokyo       -name=Extra Packages for Enterprise Linux 6 - $basearch - Source
node01.ec2.tokyo       -#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
node01.ec2.tokyo       -mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
node01.ec2.tokyo       -failovermethod=priority
node01.ec2.tokyo       -enabled=0
node01.ec2.tokyo       -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
node01.ec2.tokyo       -gpgcheck=1
node01.ec2.tokyo       +gpgkey=http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
node01.ec2.tokyo       +mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch
node01.ec2.tokyo       +sslverify=true
node01.ec2.tokyo     * execute[yum clean epel] action run
node01.ec2.tokyo       - execute yum clean all --disablerepo=* --enablerepo=epel
node01.ec2.tokyo     * execute[yum-makecache-epel] action run
node01.ec2.tokyo       - execute yum -q makecache --disablerepo=* --enablerepo=epel
node01.ec2.tokyo     * ruby_block[yum-cache-reload-epel] action create
node01.ec2.tokyo       - execute the ruby block yum-cache-reload-epel
node01.ec2.tokyo     * execute[yum clean epel] action nothing (skipped due to action :nothing)
node01.ec2.tokyo     * execute[yum-makecache-epel] action nothing (skipped due to action :nothing)
node01.ec2.tokyo     * ruby_block[yum-cache-reload-epel] action nothing (skipped due to action :nothing)
node01.ec2.tokyo
node01.ec2.tokyo Recipe: yum-remi::default
node01.ec2.tokyo   * yum_repository[remi] action create
node01.ec2.tokyo     * template[/etc/yum.repos.d/remi.repo] action create
node01.ec2.tokyo       - update content in file /etc/yum.repos.d/remi.repo from 216ad8 to f4fce9
node01.ec2.tokyo       --- /etc/yum.repos.d/remi.repo   2014-03-01 19:47:19.000000000 +0900
node01.ec2.tokyo       +++ /tmp/chef-rendered-template20150729-1823-16r2x50     2015-07-29 01:05:55.109297773 +0900
node01.ec2.tokyo       @@ -1,64 +1,12 @@
node01.ec2.tokyo       +# This file was generated by Chef
node01.ec2.tokyo       +# Do NOT modify this file by hand.
node01.ec2.tokyo       +
node01.ec2.tokyo        [remi]
node01.ec2.tokyo        name=Les RPM de remi pour Enterprise Linux 6 - $basearch
node01.ec2.tokyo       -#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/
node01.ec2.tokyo       -mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror
node01.ec2.tokyo       -enabled=0
node01.ec2.tokyo       +enabled=1
node01.ec2.tokyo       +failovermethod=roundrobin
node01.ec2.tokyo        gpgcheck=1
node01.ec2.tokyo       -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
node01.ec2.tokyo       -
node01.ec2.tokyo       -[remi-php55]
node01.ec2.tokyo       -name=Les RPM de remi de PHP 5.5 pour Enterprise Linux 6 - $basearch
node01.ec2.tokyo       -#baseurl=http://rpms.famillecollet.com/enterprise/6/php55/$basearch/
node01.ec2.tokyo       -mirrorlist=http://rpms.famillecollet.com/enterprise/6/php55/mirror
node01.ec2.tokyo       -# WARNING: If you enable this repository, you must also enable "remi"
node01.ec2.tokyo       -enabled=0
node01.ec2.tokyo       -gpgcheck=1
node01.ec2.tokyo       -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
node01.ec2.tokyo       -
node01.ec2.tokyo       -[remi-php56]
node01.ec2.tokyo       -name=Les RPM de remi de PHP 5.6 pour Enterprise Linux 6 - $basearch
node01.ec2.tokyo       -#baseurl=http://rpms.famillecollet.com/enterprise/6/php56/$basearch/
node01.ec2.tokyo       -mirrorlist=http://rpms.famillecollet.com/enterprise/6/php56/mirror
node01.ec2.tokyo       -# WARNING: If you enable this repository, you must also enable "remi"
node01.ec2.tokyo       -enabled=0
node01.ec2.tokyo       -gpgcheck=1
node01.ec2.tokyo       -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
node01.ec2.tokyo       -
node01.ec2.tokyo       -[remi-test]
node01.ec2.tokyo       -name=Les RPM de remi en test pour Enterprise Linux 6 - $basearch
node01.ec2.tokyo       -#baseurl=http://rpms.famillecollet.com/enterprise/6/test/$basearch/
node01.ec2.tokyo       -mirrorlist=http://rpms.famillecollet.com/enterprise/6/test/mirror
node01.ec2.tokyo       -# WARNING: If you enable this repository, you must also enable "remi"
node01.ec2.tokyo       -enabled=0
node01.ec2.tokyo       -gpgcheck=1
node01.ec2.tokyo       -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
node01.ec2.tokyo       -
node01.ec2.tokyo       -[remi-debuginfo]
node01.ec2.tokyo       -name=Les RPM de remi pour Enterprise Linux 6 - $basearch - debuginfo
node01.ec2.tokyo       -baseurl=http://rpms.famillecollet.com/enterprise/6/debug-remi/$basearch/
node01.ec2.tokyo       -enabled=0
node01.ec2.tokyo       -gpgcheck=1
node01.ec2.tokyo       -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
node01.ec2.tokyo       -
node01.ec2.tokyo       -[remi-php55-debuginfo]
node01.ec2.tokyo       -name=Les RPM de remi de PHP 5.5 pour Enterprise Linux 6 - $basearch - debuginfo
node01.ec2.tokyo       -baseurl=http://rpms.famillecollet.com/enterprise/6/debug-php55/$basearch/
node01.ec2.tokyo       -enabled=0
node01.ec2.tokyo       -gpgcheck=1
node01.ec2.tokyo       -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
node01.ec2.tokyo       -
node01.ec2.tokyo       -[remi-php56-debuginfo]
node01.ec2.tokyo       -name=Les RPM de remi de PHP 5.6 pour Enterprise Linux 6 - $basearch - debuginfo
node01.ec2.tokyo       -baseurl=http://rpms.famillecollet.com/enterprise/6/debug-php56/$basearch/
node01.ec2.tokyo       -enabled=0
node01.ec2.tokyo       -gpgcheck=1
node01.ec2.tokyo       -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
node01.ec2.tokyo       -
node01.ec2.tokyo       -[remi-test-debuginfo]
node01.ec2.tokyo       -name=Les RPM de remi en test pour Enterprise Linux 6 - $basearch - debuginfo
node01.ec2.tokyo       -baseurl=http://rpms.famillecollet.com/enterprise/6/debug-test/$basearch/
node01.ec2.tokyo       -enabled=0
node01.ec2.tokyo       -gpgcheck=1
node01.ec2.tokyo       -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
node01.ec2.tokyo       -
node01.ec2.tokyo       +gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi
node01.ec2.tokyo       +mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror
node01.ec2.tokyo       +sslverify=true
node01.ec2.tokyo     * execute[yum clean remi] action run
node01.ec2.tokyo       - execute yum clean all --disablerepo=* --enablerepo=remi
node01.ec2.tokyo     * execute[yum-makecache-remi] action run
node01.ec2.tokyo       - execute yum -q makecache --disablerepo=* --enablerepo=remi
node01.ec2.tokyo     * ruby_block[yum-cache-reload-remi] action create
node01.ec2.tokyo       - execute the ruby block yum-cache-reload-remi
node01.ec2.tokyo     * execute[yum clean remi] action nothing (skipped due to action :nothing)
node01.ec2.tokyo     * execute[yum-makecache-remi] action nothing (skipped due to action :nothing)
node01.ec2.tokyo     * ruby_block[yum-cache-reload-remi] action nothing (skipped due to action :nothing)
node01.ec2.tokyo
node01.ec2.tokyo   * yum_repository[remi-php55] action create
node01.ec2.tokyo     * template[/etc/yum.repos.d/remi-php55.repo] action create
node01.ec2.tokyo       - create new file /etc/yum.repos.d/remi-php55.repo
node01.ec2.tokyo       - update content in file /etc/yum.repos.d/remi-php55.repo from none to e78aa0
node01.ec2.tokyo       --- /etc/yum.repos.d/remi-php55.repo     2015-07-29 01:06:03.035342663 +0900
node01.ec2.tokyo       +++ /tmp/chef-rendered-template20150729-1823-5ludd0      2015-07-29 01:06:03.035342663 +0900
node01.ec2.tokyo       @@ -1 +1,12 @@
node01.ec2.tokyo       +# This file was generated by Chef
node01.ec2.tokyo       +# Do NOT modify this file by hand.
node01.ec2.tokyo       +
node01.ec2.tokyo       +[remi-php55]
node01.ec2.tokyo       +name=Les RPM de remi de PHP 5.5 pour Enterprise Linux 6 - $basearch
node01.ec2.tokyo       +enabled=0
node01.ec2.tokyo       +failovermethod=roundrobin
node01.ec2.tokyo       +gpgcheck=1
node01.ec2.tokyo       +gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi
node01.ec2.tokyo       +mirrorlist=http://rpms.famillecollet.com/enterprise/6/php55/mirror
node01.ec2.tokyo       +sslverify=true
node01.ec2.tokyo       - change mode from '' to '0644'
node01.ec2.tokyo     * execute[yum clean remi-php55] action run
node01.ec2.tokyo       - execute yum clean all --disablerepo=* --enablerepo=remi-php55
node01.ec2.tokyo     * execute[yum-makecache-remi-php55] action run (skipped due to only_if)
node01.ec2.tokyo     * ruby_block[yum-cache-reload-remi-php55] action create
node01.ec2.tokyo       - execute the ruby block yum-cache-reload-remi-php55
node01.ec2.tokyo     * execute[yum clean remi-php55] action nothing (skipped due to action :nothing)
node01.ec2.tokyo     * execute[yum-makecache-remi-php55] action nothing (skipped due to action :nothing)
node01.ec2.tokyo     * ruby_block[yum-cache-reload-remi-php55] action nothing (skipped due to action :nothing)
node01.ec2.tokyo
node01.ec2.tokyo   * yum_repository[remi-php56] action create
node01.ec2.tokyo     * template[/etc/yum.repos.d/remi-php56.repo] action create
node01.ec2.tokyo       - create new file /etc/yum.repos.d/remi-php56.repo
node01.ec2.tokyo       - update content in file /etc/yum.repos.d/remi-php56.repo from none to 1598d8
node01.ec2.tokyo       --- /etc/yum.repos.d/remi-php56.repo     2015-07-29 01:06:03.276344007 +0900
node01.ec2.tokyo       +++ /tmp/chef-rendered-template20150729-1823-m1ky9m      2015-07-29 01:06:03.276344007 +0900
node01.ec2.tokyo       @@ -1 +1,12 @@
node01.ec2.tokyo       +# This file was generated by Chef
node01.ec2.tokyo       +# Do NOT modify this file by hand.
node01.ec2.tokyo       +
node01.ec2.tokyo       +[remi-php56]
node01.ec2.tokyo       +name=Les RPM de remi de PHP 5.6 pour Enterprise Linux 6 - $basearch
node01.ec2.tokyo       +enabled=0
node01.ec2.tokyo       +failovermethod=roundrobin
node01.ec2.tokyo       +gpgcheck=1
node01.ec2.tokyo       +gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi
node01.ec2.tokyo       +mirrorlist=http://rpms.famillecollet.com/enterprise/6/php56/mirror
node01.ec2.tokyo       +sslverify=true
node01.ec2.tokyo       - change mode from '' to '0644'
node01.ec2.tokyo     * execute[yum clean remi-php56] action run
node01.ec2.tokyo       - execute yum clean all --disablerepo=* --enablerepo=remi-php56
node01.ec2.tokyo     * execute[yum-makecache-remi-php56] action run (skipped due to only_if)
node01.ec2.tokyo     * ruby_block[yum-cache-reload-remi-php56] action create
node01.ec2.tokyo       - execute the ruby block yum-cache-reload-remi-php56
node01.ec2.tokyo     * execute[yum clean remi-php56] action nothing (skipped due to action :nothing)
node01.ec2.tokyo     * execute[yum-makecache-remi-php56] action nothing (skipped due to action :nothing)
node01.ec2.tokyo     * ruby_block[yum-cache-reload-remi-php56] action nothing (skipped due to action :nothing)
node01.ec2.tokyo
node01.ec2.tokyo   * yum_repository[remi-test] action create
node01.ec2.tokyo     * template[/etc/yum.repos.d/remi-test.repo] action create
node01.ec2.tokyo       - create new file /etc/yum.repos.d/remi-test.repo
node01.ec2.tokyo       - update content in file /etc/yum.repos.d/remi-test.repo from none to c4730e
node01.ec2.tokyo       --- /etc/yum.repos.d/remi-test.repo      2015-07-29 01:06:03.527345406 +0900
node01.ec2.tokyo       +++ /tmp/chef-rendered-template20150729-1823-1tek1l2     2015-07-29 01:06:03.527345406 +0900
node01.ec2.tokyo       @@ -1 +1,12 @@
node01.ec2.tokyo       +# This file was generated by Chef
node01.ec2.tokyo       +# Do NOT modify this file by hand.
node01.ec2.tokyo       +
node01.ec2.tokyo       +[remi-test]
node01.ec2.tokyo       +name=Les RPM de remi en test pour Enterprise Linux 6 - $basearch
node01.ec2.tokyo       +enabled=0
node01.ec2.tokyo       +failovermethod=roundrobin
node01.ec2.tokyo       +gpgcheck=1
node01.ec2.tokyo       +gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi
node01.ec2.tokyo       +mirrorlist=http://rpms.famillecollet.com/enterprise/6/test/mirror
node01.ec2.tokyo       +sslverify=true
node01.ec2.tokyo       - change mode from '' to '0644'
node01.ec2.tokyo     * execute[yum clean remi-test] action run
node01.ec2.tokyo       - execute yum clean all --disablerepo=* --enablerepo=remi-test
node01.ec2.tokyo     * execute[yum-makecache-remi-test] action run (skipped due to only_if)
node01.ec2.tokyo     * ruby_block[yum-cache-reload-remi-test] action create
node01.ec2.tokyo       - execute the ruby block yum-cache-reload-remi-test
node01.ec2.tokyo     * execute[yum clean remi-test] action nothing (skipped due to action :nothing)
node01.ec2.tokyo     * execute[yum-makecache-remi-test] action nothing (skipped due to action :nothing)
node01.ec2.tokyo     * ruby_block[yum-cache-reload-remi-test] action nothing (skipped due to action :nothing)
node01.ec2.tokyo
node01.ec2.tokyo Recipe: wordpress01::default
node01.ec2.tokyo   * yum_package[httpd, httpd-devel, mysql, mysql-server, mysql-devel, php, php-mysql] action install
node01.ec2.tokyo     - install version 2.2.15-39.el6.centos of package httpd
node01.ec2.tokyo     - install version 2.2.15-39.el6.centos of package httpd-devel
node01.ec2.tokyo     - install version 5.5.45-1.el6.remi of package mysql
node01.ec2.tokyo     - install version 5.5.45-1.el6.remi of package mysql-server
node01.ec2.tokyo     - install version 5.5.45-1.el6.remi of package mysql-devel
node01.ec2.tokyo     - install version 5.4.43-1.el6.remi of package php
node01.ec2.tokyo     - install version 5.4.43-1.el6.remi of package php-mysql
node01.ec2.tokyo   * directory[/var/www/ec2.tokyo] action create
node01.ec2.tokyo     - create new directory /var/www/ec2.tokyo
node01.ec2.tokyo     - change mode from '' to '0755'
node01.ec2.tokyo     - change owner from '' to 'apache'
node01.ec2.tokyo     - change group from '' to 'apache'
node01.ec2.tokyo   * remote_file[/tmp/wordpress-4.2.2-ja.tar.gz] action create
node01.ec2.tokyo     - create new file /tmp/wordpress-4.2.2-ja.tar.gz
node01.ec2.tokyo     - update content in file /tmp/wordpress-4.2.2-ja.tar.gz from none to 7e34ba
node01.ec2.tokyo     (new content is binary, diff output suppressed)
node01.ec2.tokyo   * script[install_wordpress] action run
node01.ec2.tokyo     - execute "bash"  "/tmp/chef-script20150729-1823-1e8ijr8"
node01.ec2.tokyo   * template[httpdconf] action create
node01.ec2.tokyo     - update content in file /etc/httpd/conf/httpd.conf from beb8a6 to 1831ef
node01.ec2.tokyo     --- /etc/httpd/conf/httpd.conf     2014-08-15 15:57:48.000000000 +0900
node01.ec2.tokyo     +++ /tmp/chef-rendered-template20150729-1823-1ohtjgv       2015-07-29 01:06:48.226576214 +0900
node01.ec2.tokyo     @@ -987,7 +987,7 @@
node01.ec2.tokyo      #
node01.ec2.tokyo      # Use name-based virtual hosting.
node01.ec2.tokyo      #
node01.ec2.tokyo     -#NameVirtualHost *:80
node01.ec2.tokyo     +NameVirtualHost *:80
node01.ec2.tokyo      #
node01.ec2.tokyo      # NOTE: NameVirtualHost cannot be used without a port specifier
node01.ec2.tokyo      # (e.g. :80) if mod_ssl is being used, due to the nature of the
node01.ec2.tokyo     @@ -1007,4 +1007,20 @@
node01.ec2.tokyo      #    ErrorLog logs/dummy-host.example.com-error_log
node01.ec2.tokyo      #    CustomLog logs/dummy-host.example.com-access_log common
node01.ec2.tokyo      #</VirtualHost>
node01.ec2.tokyo     +
node01.ec2.tokyo     +<VirtualHost *:80>
node01.ec2.tokyo     +    ServerAdmin enginnering@ec2.tokyo
node01.ec2.tokyo     +    DocumentRoot /var/www/ec2.tokyo/wordpress
node01.ec2.tokyo     +    ServerName ec2.tokyo
node01.ec2.tokyo     +    ErrorLog logs/ec2.tokyo-error_log
node01.ec2.tokyo     +    CustomLog logs/ec2.tokyo-access_log common
node01.ec2.tokyo     +</VirtualHost>
node01.ec2.tokyo     +
node01.ec2.tokyo     +<Directory /var/www/ec2.tokyo>
node01.ec2.tokyo     +   AllowOverride All
node01.ec2.tokyo     +#   AuthUserFile /var/www/.htpasswd
node01.ec2.tokyo     +#   AuthName "Basic Auth"
node01.ec2.tokyo     +#   AuthType Basic
node01.ec2.tokyo     +#   Require valid-user
node01.ec2.tokyo     +</Directory>
node01.ec2.tokyo   * directory[/var/www/ec2.tokyo/wordpress] action create
node01.ec2.tokyo     - change owner from 'nobody' to 'apache'
node01.ec2.tokyo     - change group from '65534' to 'apache'
node01.ec2.tokyo   * service[httpd] action start
node01.ec2.tokyo     - start service service[httpd]
node01.ec2.tokyo   * service[mysqld] action start
node01.ec2.tokyo     - start service service[mysqld]
node01.ec2.tokyo   * template[sql-for-wordpress] action create
node01.ec2.tokyo     - create new file /tmp/wordpress.sql
node01.ec2.tokyo     - update content in file /tmp/wordpress.sql from none to 04c6d9
node01.ec2.tokyo     --- /tmp/wordpress.sql     2015-07-29 01:06:51.024589512 +0900
node01.ec2.tokyo     +++ /tmp/chef-rendered-template20150729-1823-12jsv10       2015-07-29 01:06:51.024589512 +0900
node01.ec2.tokyo     @@ -1 +1,4 @@
node01.ec2.tokyo     +CREATE DATABASE wordpress;
node01.ec2.tokyo     +GRANT ALL PRIVILEGES ON *.* TO wordpress@"%" IDENTIFIED BY 'wordpress' WITH GRANT OPTION;
node01.ec2.tokyo     +FLUSH PRIVILEGES;
node01.ec2.tokyo     - change mode from '' to '0644'
node01.ec2.tokyo   * execute[mysql-create-user] action run
node01.ec2.tokyo     - execute mysql -u root ?p ******** < /tmp/wordpress.sql
node01.ec2.tokyo
node01.ec2.tokyo Running handlers:
node01.ec2.tokyo Running handlers complete
node01.ec2.tokyo Chef Client finished, 32/32 resources updated in 69.697403405 seconds
実行結果その2

Copyright © ITmedia, Inc. All Rights Reserved.

スポンサーからのお知らせPR

注目のテーマ

AI for エンジニアリング
「サプライチェーン攻撃」対策
1P情シスのための脆弱性管理/対策の現実解
OSSのサプライチェーン管理、取るべきアクションとは
Microsoft & Windows最前線2024
システム開発ノウハウ 【発注ナビ】PR
あなたにおすすめの記事PR

RSSについて

アイティメディアIDについて

メールマガジン登録

@ITのメールマガジンは、 もちろん、すべて無料です。ぜひメールマガジンをご購読ください。