Skip to content

Commit

Permalink
Fix up ks.cfg with mirror url and don't auto install chef
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimberman committed Aug 26, 2010
1 parent e82cab5 commit d666ff0
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 41 deletions.
2 changes: 2 additions & 0 deletions kickstart/README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Opscode/cookbooks:
= ATTRIBUTES:

* kickstart[:rootpw] - set the root password. Use an encrypted string[1].
* kickstart[:virtual_host_name] - set the ServerName for apache2 vhost.
* kickstart[:mirror_url] - set the full URL to the "CentOS" directory w/ the rpms to install.

[1] a Ruby way to encrypt:
http://www.opensourcery.co.za/2009/05/01/quick-nix-shadow-passwords-with-ruby/
Expand Down
1 change: 1 addition & 0 deletions kickstart/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
default[:kickstart][:rootpw] = nil
default[:kickstart][:virtual_host_name] = "build.#{domain}"
default[:kickstart][:mirror_url] = "http://mirrors.kernel.org/centos/5.5/os/x86_64"
72 changes: 36 additions & 36 deletions kickstart/metadata.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
{
"providing": {
},
"attributes": {
},
"replacing": {
},
"dependencies": {
"apache2": [
"name": "kickstart",
"description": "Creates apache2 vhost and serves a kickstart file.",
"long_description": "= DESCRIPTION:\n\nCreates an apache vhost and serves a very basic kickstart file.\n\n= REQUIREMENTS:\n\nRed Hat Enterprise Linux, CentOS, or other platforms that support Kickstart :-).\n\nOpscode/cookbooks:\n\n* apache2\n\n= ATTRIBUTES: \n\n* kickstart[:rootpw] - set the root password. Use an encrypted string[1].\n* kickstart[:virtual_host_name] - set the ServerName for apache2 vhost.\n* kickstart[:mirror_url] - set the full URL to the \"CentOS\" directory w/ the rpms to install.\n\n[1] a Ruby way to encrypt:\nhttp://www.opensourcery.co.za/2009/05/01/quick-nix-shadow-passwords-with-ruby/\n\n= USAGE:\n\nYou'll almost certainly want to edit ks.cfg.erb to suit your environment. As is, the provided template is used as a minimal fast install for creating virtual machines to run CentOS 5. Of particular note, the following should definitely be changed:\n\n* url - mirrors.kernel.org is usually fast for me, but maybe not for you.\n* network - change the hostname.\n* rootpw - this is an attribute, so you can change it by modifying the server. Use the encrypted password!\n\nStorage / disks should probably be customized, as well as firewall rules, SELinux policy, and the package list.\n\nThe %post section will install Chef via Matthew Kent's RPMs, per the Chef Wiki instructions.\n\nTo use the recipe on a system that will be the kickstart server,\n\n include_recipe \"kickstart::server\"\n\n= LICENSE and AUTHOR:\n\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\nCopyright:: 2009, Opscode, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
"maintainer": "Opscode",
"maintainer_email": "cookbooks@opscode.com",
"license": "Apache 2.0",
"platforms": {
"redhat": [

]
},
"groupings": {
},
"recommendations": {
},
"platforms": {
"centos": [
],
"centos": [

],
"redhat": [
]
},
"dependencies": {
"apache2": [

]
},
"license": "Apache 2.0",
"version": "0.3.2",
"maintainer": "Opscode",
"suggestions": {
},
"recipes": {
"kickstart::server": "Sets up kickstart as an apache vhost",
"kickstart": "Empty, use one of the other recipes"
},
"maintainer_email": "cookbooks@opscode.com",
"name": "kickstart",
"conflicting": {
},
"description": "Creates apache2 vhost and serves a kickstart file.",
"long_description": "= DESCRIPTION:\n\nCreates an apache vhost and serves a very basic kickstart file.\n\n= REQUIREMENTS:\n\nRed Hat Enterprise Linux, CentOS, or other platforms that support Kickstart :-).\n\nOpscode/cookbooks:\n\n* apache2\n\n= ATTRIBUTES: \n\n* kickstart[:rootpw] - set the root password. Use an encrypted string[1].\n\n[1] a Ruby way to encrypt:\nhttp://www.opensourcery.co.za/2009/05/01/quick-nix-shadow-passwords-with-ruby/\n\n= USAGE:\n\nYou'll almost certainly want to edit ks.cfg.erb to suit your environment. As is, the provided template is used as a minimal fast install for creating virtual machines to run CentOS 5. Of particular note, the following should definitely be changed:\n\n* url - mirrors.kernel.org is usually fast for me, but maybe not for you.\n* network - change the hostname.\n* rootpw - this is an attribute, so you can change it by modifying the server. Use the encrypted password!\n\nStorage / disks should probably be customized, as well as firewall rules, SELinux policy, and the package list.\n\nThe %post section will install Chef via Matthew Kent's RPMs, per the Chef Wiki instructions.\n\nTo use the recipe on a system that will be the kickstart server,\n\n include_recipe \"kickstart::server\"\n\n= LICENSE and AUTHOR:\n\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\nCopyright:: 2009, Opscode, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
}
]
},
"recommendations": {
},
"suggestions": {
},
"conflicting": {
},
"providing": {
},
"replacing": {
},
"attributes": {
},
"groupings": {
},
"recipes": {
"kickstart": "Empty, use one of the other recipes",
"kickstart::server": "Sets up kickstart as an apache vhost"
},
"version": "0.4.0"
}
2 changes: 1 addition & 1 deletion kickstart/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
license "Apache 2.0"
description "Creates apache2 vhost and serves a kickstart file."
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
version "0.3.2"
version "0.4.0"
depends "apache2"
supports "redhat"
supports "centos"
Expand Down
9 changes: 5 additions & 4 deletions kickstart/templates/default/ks.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
install
text
reboot
url --url http://mirrors.kernel.org/centos/5.3/os/i386
url --url <%= node[:kickstart][:mirror_url] %>
lang en_US.UTF-8
keyboard us
network --device eth0 --bootproto dhcp --hostname centos5test.<%= node[:domain] %>
Expand Down Expand Up @@ -245,6 +245,7 @@ zlib
%pre

%post
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
rpm -Uvh http://download.elff.bravenet.com/5/i386/elff-release-5-3.noarch.rpm
yum install -y rubygem-chef
# Install Chef on new systems by uncommenting these lines.
#rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
#rpm -Uvh http://download.elff.bravenet.com/5/i386/elff-release-5-3.noarch.rpm
#yum install -y rubygem-chef

0 comments on commit d666ff0

Please sign in to comment.