From bf4240cca6a5eba30e444744aaadf23e2b0e4124 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Thu, 5 Apr 2012 22:27:32 -0400 Subject: Fixed opscode repo in chef recipe Also added some comments and captured the output --- doc/examples/cloud-config-chef.txt | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/examples/cloud-config-chef.txt b/doc/examples/cloud-config-chef.txt index e9372144..6d50441b 100644 --- a/doc/examples/cloud-config-chef.txt +++ b/doc/examples/cloud-config-chef.txt @@ -1,12 +1,21 @@ #cloud-config # -# This is an example file to automatically setup chef and run a list of recipes -# when the instance boots for the first time. +# This is an example file to automatically install chef-client and run a +# list of recipes when the instance boots for the first time. # Make sure that this file is valid yaml before starting instances. # It should be passed as user-data when starting the instance. +# +# This example assumes the instance is 12.04 (precise) + + +# The default is to install from packages. +# In this example, we show how to specify the opscode repository for +# installing from packages, but we install chef from gems because +# cloud-init doesn't install opscode's GPG key so packages fail to install -# The default is to install from packages. If you want the latest packages from Opscode, be sure to add their repo: -apt_mirror: http://apt.opscode.com/ + +apt_sources: + - source: "deb http://apt.opscode.com/ precise-0.10 main" chef: @@ -42,3 +51,8 @@ chef: prefork: maxclients: 100 keepalive: "off" + + +# Capture all subprocess output into a logfile +# Useful for troubleshooting cloud-init issues +output: {all: '| tee -a /var/log/cloud-init-output.log'} -- cgit v1.2.3 From 144a68bf215fad11325e958242b0cda85497e9d5 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Sat, 7 Apr 2012 17:45:19 -0400 Subject: Added GPG key --- doc/examples/cloud-config-chef.txt | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/examples/cloud-config-chef.txt b/doc/examples/cloud-config-chef.txt index 6d50441b..1a5f8b86 100644 --- a/doc/examples/cloud-config-chef.txt +++ b/doc/examples/cloud-config-chef.txt @@ -9,18 +9,46 @@ # The default is to install from packages. -# In this example, we show how to specify the opscode repository for -# installing from packages, but we install chef from gems because -# cloud-init doesn't install opscode's GPG key so packages fail to install - +# Key from http://apt.opscode.com/packages@opscode.com.gpg.key apt_sources: - source: "deb http://apt.opscode.com/ precise-0.10 main" + key: | + -----BEGIN PGP PUBLIC KEY BLOCK----- + Version: GnuPG v1.4.9 (GNU/Linux) + + mQGiBEppC7QRBADfsOkZU6KZK+YmKw4wev5mjKJEkVGlus+NxW8wItX5sGa6kdUu + twAyj7Yr92rF+ICFEP3gGU6+lGo0Nve7KxkN/1W7/m3G4zuk+ccIKmjp8KS3qn99 + dxy64vcji9jIllVa+XXOGIp0G8GEaj7mbkixL/bMeGfdMlv8Gf2XPpp9vwCgn/GC + JKacfnw7MpLKUHOYSlb//JsEAJqao3ViNfav83jJKEkD8cf59Y8xKia5OpZqTK5W + ShVnNWS3U5IVQk10ZDH97Qn/YrK387H4CyhLE9mxPXs/ul18ioiaars/q2MEKU2I + XKfV21eMLO9LYd6Ny/Kqj8o5WQK2J6+NAhSwvthZcIEphcFignIuobP+B5wNFQpe + DbKfA/0WvN2OwFeWRcmmd3Hz7nHTpcnSF+4QX6yHRF/5BgxkG6IqBIACQbzPn6Hm + sMtm/SVf11izmDqSsQptCrOZILfLX/mE+YOl+CwWSHhl+YsFts1WOuh1EhQD26aO + Z84HuHV5HFRWjDLw9LriltBVQcXbpfSrRP5bdr7Wh8vhqJTPjrQnT3BzY29kZSBQ + YWNrYWdlcyA8cGFja2FnZXNAb3BzY29kZS5jb20+iGAEExECACAFAkppC7QCGwMG + CwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRApQKupg++Caj8sAKCOXmdG36gWji/K + +o+XtBfvdMnFYQCfTCEWxRy2BnzLoBBFCjDSK6sJqCu5Ag0ESmkLtBAIAIO2SwlR + lU5i6gTOp42RHWW7/pmW78CwUqJnYqnXROrt3h9F9xrsGkH0Fh1FRtsnncgzIhvh + DLQnRHnkXm0ws0jV0PF74ttoUT6BLAUsFi2SPP1zYNJ9H9fhhK/pjijtAcQwdgxu + wwNJ5xCEscBZCjhSRXm0d30bK1o49Cow8ZIbHtnXVP41c9QWOzX/LaGZsKQZnaMx + EzDk8dyyctR2f03vRSVyTFGgdpUcpbr9eTFVgikCa6ODEBv+0BnCH6yGTXwBid9g + w0o1e/2DviKUWCC+AlAUOubLmOIGFBuI4UR+rux9affbHcLIOTiKQXv79lW3P7W8 + AAfniSQKfPWXrrcAAwUH/2XBqD4Uxhbs25HDUUiM/m6Gnlj6EsStg8n0nMggLhuN + QmPfoNByMPUqvA7sULyfr6xCYzbzRNxABHSpf85FzGQ29RF4xsA4vOOU8RDIYQ9X + Q8NqqR6pydprRFqWe47hsAN7BoYuhWqTtOLSBmnAnzTR5pURoqcquWYiiEavZixJ + 3ZRAq/HMGioJEtMFrvsZjGXuzef7f0ytfR1zYeLVWnL9Bd32CueBlI7dhYwkFe+V + Ep5jWOCj02C1wHcwt+uIRDJV6TdtbIiBYAdOMPk15+VBdweBXwMuYXr76+A7VeDL + zIhi7tKFo6WiwjKZq0dzctsJJjtIfr4K4vbiD9Ojg1iISQQYEQIACQUCSmkLtAIb + DAAKCRApQKupg++CauISAJ9CxYPOKhOxalBnVTLeNUkAHGg2gACeIsbobtaD4ZHG + 0GLl8EkfA8uhluM= + =zKAm + -----END PGP PUBLIC KEY BLOCK----- chef: # Valid values are 'gems' and 'packages' - install_type: "gems" + install_type: "packages" # Chef settings server_url: "https://chef.yourorg.com:4000" -- cgit v1.2.3 From 7ca1b16205932849fdaeb93ec1b7a3e58862e049 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Sat, 7 Apr 2012 18:16:26 -0400 Subject: Added an example for using Chef with oneiric --- doc/examples/cloud-config-chef-oneiric.txt | 92 ++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 doc/examples/cloud-config-chef-oneiric.txt (limited to 'doc') diff --git a/doc/examples/cloud-config-chef-oneiric.txt b/doc/examples/cloud-config-chef-oneiric.txt new file mode 100644 index 00000000..c0174e53 --- /dev/null +++ b/doc/examples/cloud-config-chef-oneiric.txt @@ -0,0 +1,92 @@ +#cloud-config +# +# This is an example file to automatically install chef-client and run a +# list of recipes when the instance boots for the first time. +# Make sure that this file is valid yaml before starting instances. +# It should be passed as user-data when starting the instance. +# +# This example assumes the instance is 11.10 (oneiric) + + +# The default is to install from packages. + +# Key from http://apt.opscode.com/packages@opscode.com.gpg.key +apt_sources: + - source: "deb http://apt.opscode.com/ oneiric-0.10 main" + key: | + -----BEGIN PGP PUBLIC KEY BLOCK----- + Version: GnuPG v1.4.9 (GNU/Linux) + + mQGiBEppC7QRBADfsOkZU6KZK+YmKw4wev5mjKJEkVGlus+NxW8wItX5sGa6kdUu + twAyj7Yr92rF+ICFEP3gGU6+lGo0Nve7KxkN/1W7/m3G4zuk+ccIKmjp8KS3qn99 + dxy64vcji9jIllVa+XXOGIp0G8GEaj7mbkixL/bMeGfdMlv8Gf2XPpp9vwCgn/GC + JKacfnw7MpLKUHOYSlb//JsEAJqao3ViNfav83jJKEkD8cf59Y8xKia5OpZqTK5W + ShVnNWS3U5IVQk10ZDH97Qn/YrK387H4CyhLE9mxPXs/ul18ioiaars/q2MEKU2I + XKfV21eMLO9LYd6Ny/Kqj8o5WQK2J6+NAhSwvthZcIEphcFignIuobP+B5wNFQpe + DbKfA/0WvN2OwFeWRcmmd3Hz7nHTpcnSF+4QX6yHRF/5BgxkG6IqBIACQbzPn6Hm + sMtm/SVf11izmDqSsQptCrOZILfLX/mE+YOl+CwWSHhl+YsFts1WOuh1EhQD26aO + Z84HuHV5HFRWjDLw9LriltBVQcXbpfSrRP5bdr7Wh8vhqJTPjrQnT3BzY29kZSBQ + YWNrYWdlcyA8cGFja2FnZXNAb3BzY29kZS5jb20+iGAEExECACAFAkppC7QCGwMG + CwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRApQKupg++Caj8sAKCOXmdG36gWji/K + +o+XtBfvdMnFYQCfTCEWxRy2BnzLoBBFCjDSK6sJqCu5Ag0ESmkLtBAIAIO2SwlR + lU5i6gTOp42RHWW7/pmW78CwUqJnYqnXROrt3h9F9xrsGkH0Fh1FRtsnncgzIhvh + DLQnRHnkXm0ws0jV0PF74ttoUT6BLAUsFi2SPP1zYNJ9H9fhhK/pjijtAcQwdgxu + wwNJ5xCEscBZCjhSRXm0d30bK1o49Cow8ZIbHtnXVP41c9QWOzX/LaGZsKQZnaMx + EzDk8dyyctR2f03vRSVyTFGgdpUcpbr9eTFVgikCa6ODEBv+0BnCH6yGTXwBid9g + w0o1e/2DviKUWCC+AlAUOubLmOIGFBuI4UR+rux9affbHcLIOTiKQXv79lW3P7W8 + AAfniSQKfPWXrrcAAwUH/2XBqD4Uxhbs25HDUUiM/m6Gnlj6EsStg8n0nMggLhuN + QmPfoNByMPUqvA7sULyfr6xCYzbzRNxABHSpf85FzGQ29RF4xsA4vOOU8RDIYQ9X + Q8NqqR6pydprRFqWe47hsAN7BoYuhWqTtOLSBmnAnzTR5pURoqcquWYiiEavZixJ + 3ZRAq/HMGioJEtMFrvsZjGXuzef7f0ytfR1zYeLVWnL9Bd32CueBlI7dhYwkFe+V + Ep5jWOCj02C1wHcwt+uIRDJV6TdtbIiBYAdOMPk15+VBdweBXwMuYXr76+A7VeDL + zIhi7tKFo6WiwjKZq0dzctsJJjtIfr4K4vbiD9Ojg1iISQQYEQIACQUCSmkLtAIb + DAAKCRApQKupg++CauISAJ9CxYPOKhOxalBnVTLeNUkAHGg2gACeIsbobtaD4ZHG + 0GLl8EkfA8uhluM= + =zKAm + -----END PGP PUBLIC KEY BLOCK----- + +chef: + + # Will fail on oneiric if install_type is "gems" + # see: https://bugs.launchpad.net/cloud-init/+bug/960576 + install_type: "packages" + + # Chef settings + server_url: "https://chef.yourorg.com:4000" + + # Node Name + # Defaults to the instance-id if not present + node_name: "your-node-name" + + # Environment + # Defaults to '_default' if not present + environment: "production" + + # Default validation name is chef-validator + validation_name: "yourorg-validator" + + # value of validation_cert is not used if validation_key defined, + # but variable needs to be defined + # See: https://bugs.launchpad.net/cloud-init/+bug/960547 + validation_cert: "unused" + validation_key: | + -----BEGIN RSA PRIVATE KEY----- + YOUR-ORGS-VALIDATION-KEY-HERE + -----END RSA PRIVATE KEY----- + + # A run list for a first boot json + run_list: + - "recipe[apache2]" + - "role[db]" + + # Specify a list of initial attributes used by the cookbooks + initial_attributes: + apache: + prefork: + maxclients: 100 + keepalive: "off" + + +# Capture all subprocess output into a logfile +# Useful for troubleshooting cloud-init issues +output: {all: '| tee -a /var/log/cloud-init-output.log'} -- cgit v1.2.3 From 3a1ff52e61f6d01377e08063c10b3a4ccf27e829 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Mon, 9 Apr 2012 10:41:48 -0400 Subject: replace bug links with LP: # syntax, use '$RELEASE' for apt source cloud-init expands $RELEASE in a source so it can easily be used. --- doc/examples/cloud-config-chef-oneiric.txt | 8 +++----- doc/examples/cloud-config-chef.txt | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/examples/cloud-config-chef-oneiric.txt b/doc/examples/cloud-config-chef-oneiric.txt index c0174e53..2e5f4b16 100644 --- a/doc/examples/cloud-config-chef-oneiric.txt +++ b/doc/examples/cloud-config-chef-oneiric.txt @@ -12,7 +12,7 @@ # Key from http://apt.opscode.com/packages@opscode.com.gpg.key apt_sources: - - source: "deb http://apt.opscode.com/ oneiric-0.10 main" + - source: "deb http://apt.opscode.com/ $RELEASE-0.10 main" key: | -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.9 (GNU/Linux) @@ -47,8 +47,7 @@ apt_sources: chef: - # Will fail on oneiric if install_type is "gems" - # see: https://bugs.launchpad.net/cloud-init/+bug/960576 + # 11.10 will fail if install_type is "gems" (LP: #960576) install_type: "packages" # Chef settings @@ -66,8 +65,7 @@ chef: validation_name: "yourorg-validator" # value of validation_cert is not used if validation_key defined, - # but variable needs to be defined - # See: https://bugs.launchpad.net/cloud-init/+bug/960547 + # but variable needs to be defined (LP: #960547) validation_cert: "unused" validation_key: | -----BEGIN RSA PRIVATE KEY----- diff --git a/doc/examples/cloud-config-chef.txt b/doc/examples/cloud-config-chef.txt index 1a5f8b86..f87472ec 100644 --- a/doc/examples/cloud-config-chef.txt +++ b/doc/examples/cloud-config-chef.txt @@ -12,7 +12,7 @@ # Key from http://apt.opscode.com/packages@opscode.com.gpg.key apt_sources: - - source: "deb http://apt.opscode.com/ precise-0.10 main" + - source: "deb http://apt.opscode.com/ $RELEASE-0.10 main" key: | -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.9 (GNU/Linux) -- cgit v1.2.3