http://wiki.opscode.com/display/chef/Quick+Start
「Hosted Chef
We're using Hosted Chef so we can get started right away without setting up a Chef Server. If you want to set up your own server instead, head over to the Installation page.」
にある、Hosted Chefの登録は済んでいる状態です。
- sshで前に作ったec2のamazon linuxにログインします。
- getting started 「install ruby」
ruby --versionでrubyが既にインストール済みなので、このステップはスキップ
- 「Set Up Opscode User and Organization」
手順通りに以下をダウンロード
・private key ... nobu.pem。chef\hostedchef\privateKeys以下に保存。
前に一度organizationは作成したので、ここでは再度validation keyとknife configを取得したい。
取得場所がドキュメントになかったがここから見つけられた。
https://manage.opscode.com/organizations
・validation key ... nobu_validator.pem
・knife config ... knife.rb
- 「Install RubyGems 1.3.7+」
gem -v を実行し、rubygemsがインストールされていないことを確認。
手順通り以下を実行。全てうまくいく。
cd /tmp
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar zxf rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo ruby setup.rb --no-format-executable
-「Install Chef」
手順通りにsudo gem install chefを実行すると、以下のエラーとなる。
****************************************************************
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$ sudo gem install chef
Building native extensions. This could take a while...
ERROR: Error installing chef:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/yajl-ruby-0.8.2 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/yajl-ruby-0.8.2/ext/yajl/gem_make.out
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$
****************************************************************
足りないものをインストールしていきます。随時一個ずつ入れながらgem install chefを実行すると
次に足りないものがわかっていきますが、ここでは一気に書きます。
******************** ruby.hのインストール ***************************************
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$ sudo gem install chef
Building native extensions. This could take a while...
ERROR: Error installing chef:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/yajl-ruby-0.8.2 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/yajl-ruby-0.8.2/ext/yajl/gem_make.out
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$ sudo yum install ruby-devel
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
amzn-main | 2.1 kB 00:00
amzn-updates | 2.1 kB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ruby-devel.i686 0:1.8.7.330-1.5.amzn1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
ruby-devel i686 1.8.7.330-1.5.amzn1 amzn-main 314 k
Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 314 k
Installed size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
ruby-devel-1.8.7.330-1.5.amzn1.i686.rpm | 314 kB 00:00
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 21c0f39f: NOKEY
amzn-main/gpgkey | 1.9 kB 00:00 ...
Importing GPG key 0x21C0F39F "Amazon Linux AMI (Beta) <linux-security@amazon.com>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-beta
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : ruby-devel-1.8.7.330-1.5.amzn1.i686 1/1
Installed:
ruby-devel.i686 0:1.8.7.330-1.5.amzn1
Complete!
以下で確認
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$ls /usr/lib/ruby/1.8/i386-linux/ruby.h
****************************************************************
*********************** makeのインストール **************************************
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$ sudo yum install make
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package make.i686 1:3.81-19.6.amzn1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
make i686 1:3.81-19.6.amzn1 amzn-main 471 k
Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 471 k
Installed size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
make-3.81-19.6.amzn1.i686.rpm | 471 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 1:make-3.81-19.6.amzn1.i686 1/1
Installed:
make.i686 1:3.81-19.6.amzn1
Complete!
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$
以下確認
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$ which make
/usr/bin/make
************************ gcc インストール ****************************************
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$ sudo yum install gcc
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.i686 0:4.4.4-13.33.amzn1 set to be updated
--> Processing Dependency: cpp = 4.4.4-13.33.amzn1 for package: gcc-4.4.4-13.33.amzn1.i686
--> Processing Dependency: libgomp = 4.4.4-13.33.amzn1 for package: gcc-4.4.4-13.33.amzn1.i686
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.4-13.33.amzn1.i686
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.4.4-13.33.amzn1.i686
--> Processing Dependency: libgomp.so.1 for package: gcc-4.4.4-13.33.amzn1.i686
--> Running transaction check
---> Package cloog-ppl.i686 0:0.15.7-1.2.5.amzn1 set to be updated
--> Processing Dependency: libppl.so.7 for package: cloog-ppl-0.15.7-1.2.5.amzn1.i686
--> Processing Dependency: libppl_c.so.2 for package: cloog-ppl-0.15.7-1.2.5.amzn1.i686
---> Package cpp.i686 0:4.4.4-13.33.amzn1 set to be updated
--> Processing Dependency: libmpfr.so.1 for package: cpp-4.4.4-13.33.amzn1.i686
---> Package glibc-devel.i686 0:2.12-1.7.26.amzn1 set to be updated
--> Processing Dependency: glibc = 2.12-1.7.26.amzn1 for package: glibc-devel-2.12-1.7.26.amzn1.i686
--> Processing Dependency: glibc-headers = 2.12-1.7.26.amzn1 for package: glibc-devel-2.12-1.7.26.amzn1.i686
--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.7.26.amzn1.i686
---> Package libgomp.i686 0:4.4.4-13.33.amzn1 set to be updated
--> Running transaction check
--> Processing Dependency: glibc = 2.12-1.7.25.amzn1 for package: glibc-common-2.12-1.7.25.amzn1.i686
---> Package glibc.i686 0:2.12-1.7.26.amzn1 set to be updated
---> Package glibc-headers.i686 0:2.12-1.7.26.amzn1 set to be updated
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.7.26.amzn1.i686
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.7.26.amzn1.i686
---> Package mpfr.i686 0:2.4.1-6.6.amzn1 set to be updated
---> Package ppl.i686 0:0.10.2-11.5.amzn1 set to be updated
--> Running transaction check
---> Package glibc-common.i686 0:2.12-1.7.26.amzn1 set to be updated
---> Package kernel-headers.i686 0:2.6.35.11-83.9.amzn1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
gcc i686 4.4.4-13.33.amzn1 amzn-main 8.8 M
Installing for dependencies:
cloog-ppl i686 0.15.7-1.2.5.amzn1 amzn-main 95 k
cpp i686 4.4.4-13.33.amzn1 amzn-main 3.6 M
glibc-devel i686 2.12-1.7.26.amzn1 amzn-updates 889 k
glibc-headers i686 2.12-1.7.26.amzn1 amzn-updates 518 k
kernel-headers i686 2.6.35.11-83.9.amzn1 amzn-main 773 k
libgomp i686 4.4.4-13.33.amzn1 amzn-main 71 k
mpfr i686 2.4.1-6.6.amzn1 amzn-main 161 k
ppl i686 0.10.2-11.5.amzn1 amzn-main 1.6 M
Updating for dependencies:
glibc i686 2.12-1.7.26.amzn1 amzn-updates 5.5 M
glibc-common i686 2.12-1.7.26.amzn1 amzn-updates 26 M
Transaction Summary
================================================================================
Install 9 Package(s)
Upgrade 2 Package(s)
Total download size: 48 M
Is this ok [y/N]: y
Downloading Packages:
(1/11): cloog-ppl-0.15.7-1.2.5.amzn1.i686.rpm | 95 kB 00:00
(2/11): cpp-4.4.4-13.33.amzn1.i686.rpm | 3.6 MB 00:00
(3/11): gcc-4.4.4-13.33.amzn1.i686.rpm | 8.8 MB 00:00
(4/11): glibc-2.12-1.7.26.amzn1.i686.rpm | 5.5 MB 00:00
(5/11): glibc-common-2.12-1.7.26.amzn1.i686.rpm | 26 MB 00:00
(6/11): glibc-devel-2.12-1.7.26.amzn1.i686.rpm | 889 kB 00:00
(7/11): glibc-headers-2.12-1.7.26.amzn1.i686.rpm | 518 kB 00:00
(8/11): kernel-headers-2.6.35.11-83.9.amzn1.i686.rpm | 773 kB 00:00
(9/11): libgomp-4.4.4-13.33.amzn1.i686.rpm | 71 kB 00:00
(10/11): mpfr-2.4.1-6.6.amzn1.i686.rpm | 161 kB 00:00
(11/11): ppl-0.10.2-11.5.amzn1.i686.rpm | 1.6 MB 00:00
--------------------------------------------------------------------------------
Total 17 MB/s | 48 MB 00:02
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : kernel-headers-2.6.35.11-83.9.amzn1.i686 1/13
Updating : glibc-2.12-1.7.26.amzn1.i686 2/13
Updating : glibc-common-2.12-1.7.26.amzn1.i686 3/13
Installing : mpfr-2.4.1-6.6.amzn1.i686 4/13
Installing : cpp-4.4.4-13.33.amzn1.i686 5/13
Installing : ppl-0.10.2-11.5.amzn1.i686 6/13
Installing : cloog-ppl-0.15.7-1.2.5.amzn1.i686 7/13
Installing : libgomp-4.4.4-13.33.amzn1.i686 8/13
Installing : glibc-headers-2.12-1.7.26.amzn1.i686 9/13
Installing : glibc-devel-2.12-1.7.26.amzn1.i686 10/13
Installing : gcc-4.4.4-13.33.amzn1.i686 11/13
Cleanup : glibc-2.12-1.7.25.amzn1.i686 12/13
Cleanup : glibc-common-2.12-1.7.25.amzn1.i686 13/13
Installed:
gcc.i686 0:4.4.4-13.33.amzn1
Dependency Installed:
cloog-ppl.i686 0:0.15.7-1.2.5.amzn1
cpp.i686 0:4.4.4-13.33.amzn1
glibc-devel.i686 0:2.12-1.7.26.amzn1
glibc-headers.i686 0:2.12-1.7.26.amzn1
kernel-headers.i686 0:2.6.35.11-83.9.amzn1
libgomp.i686 0:4.4.4-13.33.amzn1
mpfr.i686 0:2.4.1-6.6.amzn1
ppl.i686 0:0.10.2-11.5.amzn1
Dependency Updated:
glibc.i686 0:2.12-1.7.26.amzn1 glibc-common.i686 0:2.12-1.7.26.amzn1
Complete!
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$
************************ rdoc インストール ************************************
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$ sudo yum install rdoc
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
amzn-main | 2.1 kB 00:00
amzn-updates | 2.1 kB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ruby-rdoc.noarch 0:1.8.7.330-1.5.amzn1 set to be updated
--> Processing Dependency: ruby-irb = 1.8.7.330-1.5.amzn1 for package: ruby-rdoc-1.8.7.330-1.5.amzn1.noarch
--> Running transaction check
---> Package ruby-irb.noarch 0:1.8.7.330-1.5.amzn1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
ruby-rdoc noarch 1.8.7.330-1.5.amzn1 amzn-main 378 k
Installing for dependencies:
ruby-irb noarch 1.8.7.330-1.5.amzn1 amzn-main 305 k
Transaction Summary
================================================================================
Install 2 Package(s)
Upgrade 0 Package(s)
Total download size: 683 k
Installed size: 2.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): ruby-irb-1.8.7.330-1.5.amzn1.noarch.rpm | 305 kB 00:00
(2/2): ruby-rdoc-1.8.7.330-1.5.amzn1.noarch.rpm | 378 kB 00:00
--------------------------------------------------------------------------------
Total 3.9 MB/s | 683 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : ruby-irb-1.8.7.330-1.5.amzn1.noarch 1/2
Installing : ruby-rdoc-1.8.7.330-1.5.amzn1.noarch 2/2
Installed:
ruby-rdoc.noarch 0:1.8.7.330-1.5.amzn1
Dependency Installed:
ruby-irb.noarch 0:1.8.7.330-1.5.amzn1
Complete!
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$
************************ri インストール ****************************************
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$ sudo yum install ri
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ruby-ri.i686 0:1.8.7.330-1.5.amzn1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
ruby-ri i686 1.8.7.330-1.5.amzn1 amzn-main 2.2 M
Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 2.2 M
Installed size: 4.9 M
Is this ok [y/N]: y
Downloading Packages:
ruby-ri-1.8.7.330-1.5.amzn1.i686.rpm | 2.2 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : ruby-ri-1.8.7.330-1.5.amzn1.i686 1/1
Installed:
ruby-ri.i686 0:1.8.7.330-1.5.amzn1
Complete!
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$
************************ git-coreインストール ********************************
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$ sudo yum install git-core
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package git.i686 0:1.7.2.5-1.16.amzn1 set to be updated
--> Processing Dependency: perl-Git = 1.7.2.5-1.16.amzn1 for package: git-1.7.2.5-1.16.amzn1.i686
--> Processing Dependency: perl(Error) for package: git-1.7.2.5-1.16.amzn1.i686
--> Processing Dependency: perl(Git) for package: git-1.7.2.5-1.16.amzn1.i686
--> Running transaction check
---> Package perl-Error.noarch 1:0.17015-4.6.amzn1 set to be updated
---> Package perl-Git.i686 0:1.7.2.5-1.16.amzn1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
git i686 1.7.2.5-1.16.amzn1 amzn-main 4.3 M
Installing for dependencies:
perl-Error noarch 1:0.17015-4.6.amzn1 amzn-main 27 k
perl-Git i686 1.7.2.5-1.16.amzn1 amzn-main 16 k
Transaction Summary
================================================================================
Install 3 Package(s)
Upgrade 0 Package(s)
Total download size: 4.4 M
Installed size: 12 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): git-1.7.2.5-1.16.amzn1.i686.rpm | 4.3 MB 00:00
(2/3): perl-Error-0.17015-4.6.amzn1.noarch.rpm | 27 kB 00:00
(3/3): perl-Git-1.7.2.5-1.16.amzn1.i686.rpm | 16 kB 00:00
--------------------------------------------------------------------------------
Total 3.1 MB/s | 4.4 MB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 1:perl-Error-0.17015-4.6.amzn1.noarch 1/3
Installing : git-1.7.2.5-1.16.amzn1.i686 2/3
Installing : perl-Git-1.7.2.5-1.16.amzn1.i686 3/3
Installed:
git.i686 0:1.7.2.5-1.16.amzn1
Dependency Installed:
perl-Error.noarch 1:0.17015-4.6.amzn1 perl-Git.i686 0:1.7.2.5-1.16.amzn1
Complete!
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$
************************ chefインストール *************************************
[ec2-user@ip-10-150-174-103 rubygems-1.3.7]$ sudo gem install chef
Building native extensions. This could take a while...
Building native extensions. This could take a while...
Successfully installed yajl-ruby-0.8.2
Successfully installed systemu-2.2.0
Successfully installed ohai-0.6.4
Successfully installed mime-types-1.16
Successfully installed rest-client-1.6.3
Successfully installed bunny-0.6.0
Successfully installed json-1.5.2
Successfully installed polyglot-0.3.1
Successfully installed treetop-1.4.9
Successfully installed net-ssh-2.1.4
Successfully installed net-ssh-gateway-1.1.0
Successfully installed net-ssh-multi-1.0.1
Successfully installed erubis-2.7.0
Successfully installed moneta-0.6.0
Successfully installed highline-1.6.2
Successfully installed uuidtools-2.1.2
Successfully installed chef-0.10.2
17 gems installed
Installing ri documentation for yajl-ruby-0.8.2...
Installing ri documentation for systemu-2.2.0...
Installing ri documentation for ohai-0.6.4...
Installing ri documentation for mime-types-1.16...
Installing ri documentation for rest-client-1.6.3...
Installing ri documentation for bunny-0.6.0...
Installing ri documentation for json-1.5.2...
Installing ri documentation for polyglot-0.3.1...
Installing ri documentation for treetop-1.4.9...
Installing ri documentation for net-ssh-2.1.4...
Installing ri documentation for net-ssh-gateway-1.1.0...
Installing ri documentation for net-ssh-multi-1.0.1...
Installing ri documentation for erubis-2.7.0...
Installing ri documentation for moneta-0.6.0...
Installing ri documentation for highline-1.6.2...
Installing ri documentation for uuidtools-2.1.2...
Installing ri documentation for chef-0.10.2...
Installing RDoc documentation for yajl-ruby-0.8.2...
Installing RDoc documentation for systemu-2.2.0...
Installing RDoc documentation for ohai-0.6.4...
Installing RDoc documentation for mime-types-1.16...
Installing RDoc documentation for rest-client-1.6.3...
Installing RDoc documentation for bunny-0.6.0...
Installing RDoc documentation for json-1.5.2...
Installing RDoc documentation for polyglot-0.3.1...
Installing RDoc documentation for treetop-1.4.9...
Installing RDoc documentation for net-ssh-2.1.4...
Installing RDoc documentation for net-ssh-gateway-1.1.0...
Installing RDoc documentation for net-ssh-multi-1.0.1...
Installing RDoc documentation for erubis-2.7.0...
Installing RDoc documentation for moneta-0.6.0...
Installing RDoc documentation for highline-1.6.2...
Installing RDoc documentation for uuidtools-2.1.2...
Installing RDoc documentation for chef-0.10.2...
*************************************************************
- Install Git on the local workstation
手順通り
git --version
[ec2-user@ip-10-150-174-103 ~]$ git --version
git version 1.7.2.5
cd ~
git clone git://github.com/opscode/chef-repo.git
[ec2-user@ip-10-150-174-103 ~]$ git clone git://github.com/opscode/chef-repo.git
Cloning into chef-repo...
remote: Counting objects: 199, done.
remote: Compressing objects: 100% (119/119), done.
remote: Total 199 (delta 72), reused 161 (delta 47)
Receiving objects: 100% (199/199), 30.16 KiB, done.
Resolving deltas: 100% (72/72), done.
- Create .chef directory
手順通り
mkdir -p ~/chef-repo/.chef
********************************* EC2 の AMIとしてバンドル *****
個人情報をインストールする前に、ここでAMIとしてバンドルして、再利用できるようにします。
参考
http://docs.amazonwebservices.com/AmazonEC2/dg/2006-06-26/creating-an-ami.html
やったこと
private keyとcertification(これは追加ダウンロード)をec2の/tmpにコピー
ec2ツールが既に入っているか確認
[ec2-user@ip-10-150-174-103 ~]$ rpm -qa | grep ec2
aws-apitools-ec2-1.3.62308-1.2.amzn1.noarch
aws-amitools-ec2-1.3.57676-1.1.amzn1.noarch
ec2-utils-0.2-1.3.amzn1.noarch
[ec2-user@ip-10-150-174-103 ~]$
[ec2-user@ip-10-150-174-103 tmp]$ sudo bash
[root@ip-10-150-174-103 tmp]#
[root@ip-10-150-174-103 tmp]# whoami
root
[root@ip-10-150-174-103 tmp]#
[root@ip-10-150-174-103 tmp]#
[root@ip-10-150-174-103 tmp]# ec2-bundle-vol -k nobubu3.pem -c cert-2EGHKMCHA2DIKWZPOEOAP5XXGGR44PU.pem -u xxxxxxxxx (account numberが入る)
Please specify a value for arch [i386]:
Copying / into the image file /tmp/image...
Excluding:
/sys
/
/proc
/proc/sys/fs/binfmt_misc
/dev/pts
/dev
/media
/mnt
/proc
/sys
/tmp/image
/mnt/img-mnt
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00246579 s, 425 MB/s
mke2fs 1.41.12 (17-May-2010)
warning: Unable to get device geometry for /tmp/image
Bundling image file...
Splitting /tmp/image.tar.gz.enc...
Created image.part.00
Created image.part.01
Created image.part.02
Created image.part.03
Created image.part.04
Created image.part.05
Created image.part.06
Created image.part.07
Created image.part.08
Created image.part.09
Created image.part.10
Created image.part.11
Created image.part.12
Created image.part.13
Created image.part.14
Created image.part.15
Created image.part.16
Created image.part.17
Created image.part.18
Created image.part.19
Created image.part.20
Created image.part.21
Created image.part.22
Created image.part.23
Created image.part.24
Created image.part.25
Created image.part.26
Created image.part.27
Created image.part.28
Created image.part.29
Created image.part.30
Created image.part.31
Created image.part.32
Created image.part.33
Created image.part.34
Generating digests for each part...
Digests generated.
Unable to read instance meta-data for ancestor-ami-ids
Unable to read instance meta-data for ramdisk-id
Unable to read instance meta-data for product-codes
Creating bundle manifest...
ec2-bundle-vol complete.
[root@ip-10-150-174-103 tmp]#
[root@ip-10-150-174-103 tmp]#
[ec2-user@ip-10-150-174-103 tmp]$ ec2-upload-bundle -b [backet-name] -m image.manifest.xml -a [アクセスキーID] -s [シークレットキーID]
Uploading bundled image parts to the S3 bucket [backet-name] ...
Uploaded image.part.00
Uploaded image.part.01
Uploaded image.part.02
Uploaded image.part.03
Uploaded image.part.04
Uploaded image.part.05
Uploaded image.part.06
Uploaded image.part.07
Uploaded image.part.08
Uploaded image.part.09
Uploaded image.part.10
Uploaded image.part.11
Uploaded image.part.12
Uploaded image.part.13
Uploaded image.part.14
Uploaded image.part.15
Uploaded image.part.16
Uploaded image.part.17
Uploaded image.part.18
Uploaded image.part.19
Uploaded image.part.20
Uploaded image.part.21
Uploaded image.part.22
Uploaded image.part.23
Uploaded image.part.24
Uploaded image.part.25
Uploaded image.part.26
Uploaded image.part.27
Uploaded image.part.28
Uploaded image.part.29
Uploaded image.part.30
Uploaded image.part.31
Uploaded image.part.32
Uploaded image.part.33
Uploaded image.part.34
Uploading manifest ...
Uploaded manifest.
Bundle upload completed.
[ec2-user@ip-10-150-174-103 tmp]$
[root@ip-10-150-174-103 tmp]# ec2-register --private-key pk-TIK3GBFWEVRLR4VJT4IASSRH24AWKHH.pem --cert cert-TIK3GBFWEVRLR4VJT4IASSRH24AWKHH.pem 1-1-16-1019/image.manifest.xml --region ap-northeast-1
IMAGE ami-34e85d35
[root@ip-10-150-174-103 tmp]#
ec2インスタンスとして起動できるようになったが、しかし、
root-deviceがinstance-storeで、EBS利用でないため、macroインスタンス起動できない。
次回はEBSのAMIを作成したい。が、先にchefを続けよう。
***** centos用s3toolsをインストール ****
これはgetting startedに載っていなくて、出所忘れたのだがインストールする
[root@ip-10-150-174-103 tmp]# cd /etc/yum
yum/ yum.conf yum.repos.d/
[root@ip-10-150-174-103 tmp]# cd /etc/yum.repos.d/
[root@ip-10-150-174-103 yum.repos.d]# dir
amzn-main.repo amzn-updates.repo
[root@ip-10-150-174-103 yum.repos.d]# sudo wget http://s3tools.org/repo/CentOS_5/s3tools.repo
--2011-07-16 09:05:37-- http://s3tools.org/repo/CentOS_5/s3tools.repo
Resolving s3tools.org... 93.89.80.122, 2a01:348:0:6:5d59:50c3:0:b0b1
Connecting to s3tools.org|93.89.80.122|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 301 [application/octet-stream]
Saving to: “s3tools.repoâ€
100%[======================================>] 301 --.-K/s in 0s
2011-07-16 09:05:38 (40.8 MB/s) - “s3tools.repoâ€
[root@ip-10-150-174-103 yum.repos.d]#
-「Create .chef directory」
.chefは上のほうで作成済み。
手順通り3つのファイルを.chef以下にコピーした。
-「Connect to Hosted Chef」
手順通り。接続できたのを核にした。
[ec2-user@ip-10-150-174-103 .chef]$ cd ~/chef-repo/
[ec2-user@ip-10-150-174-103 chef-repo]$ ls
certificates config data_bags Rakefile roles
chefignore cookbooks environments README.md
[ec2-user@ip-10-150-174-103 chef-repo]$ knife client list
ip-10-146-7-97.ap-northeast-1.compute.internal
nobu-validator
以上でchefのワークステーションとしてのセットアップは完了
0 件のコメント:
コメントを投稿