Install Using Deb PackageOn Ubuntu lucid, maverick, or Debian lenny release, you can install gecode deb package from the Opscode APT repository.
Add the Opscode APT RepositoryCreate /etc/apt/sources.list.d/opscode.list. /etc/apt/sources.list.d/opscode.list
If you would like to be able to download source packages, add an additional identical line, but change deb to deb-src line. You can copy and paste these examples to create the necessary sources.list entry: Ubuntu for Chef 0.9.x Ubuntu for Chef 0.10.x Debian users will likely need to run 'apt-get install sudo wget lsb-release' as root before pasting the examples. Add the GPG Key and Update IndexBefore you install the packages, make sure you add the Opscode GPG key to apt.
Now, we update apt-get with the newly added Opscode repository: Installing the opscode-keyring package will keep the key up-to-date: Upgrade Existing PackagesTo ensure you are using the latest versions of libraries that chef depends on, you may wish to update your existing packages: Install deb packageBuild and Install from SourceUpgrade Chef ServerFor RubyGems installation: For a Debian/Ubuntu installation: Upgrade Chef Solr and Install Chef ExpanderChef 0.10 includes an upgraded version of Solr and uses a different schema with Solr, so you will need to upgrade Solr and then rebuild the index. Before doing anything, make sure to back up your Solr Data directory. By default the data directory is located at /var/chef/solr/data, though it may be located elsewhere if you've installed from packages or customized the installation. You can backup your Solr data by stopping Solr and making a copy of the data directory and its contents. Upgrade SolrFor a Debian/Ubuntu installation:
Once your data is backed up, run chef-solr-installer to upgrade your Chef Solr installation. Answer "yes" when prompted for confirmation. The process should look like this: yourshell> chef-solr-installer Configuration setting solr_heap_size is unknown and will be ignored Chef Solr is already installed in /var/chef/solr Do you want to overwrite the current install? All existing Solr data will be lost. [y/n] y Removing the existing Chef Solr installation rm -rf /var/chef/solr rm -rf /var/chef/solr-jetty rm -rf /var/chef/solr/data Creating Solr Home Directory mkdir -p /var/chef/solr entering /var/chef/solr tar zxvf /Users/ddeleo/opscode/chef/chef-solr/solr/solr-home.tar.gz Creating Solr Data Directory mkdir -p /var/chef/solr/data Unpacking Solr Jetty mkdir -p /var/chef/solr-jetty entering /var/chef/solr-jetty tar zxvf /Users/ddeleo/opscode/chef/chef-solr/solr/solr-jetty.tar.gz Successfully installed Chef Solr. You can restore your search index using `knife index rebuild` Replace Chef Solr Indexer with Chef ExpanderIn Chef 0.10+, chef-solr-indexer is replaced by Chef Expander. Complete documentation for Chef Expander is provided on the Chef Indexer architecture page.. To start Chef Expander using your existing solr.rb configuration: shell> chef-expander -n 1 If you wish to use a configuration file other than /etc/chef/solr.rb, pass the config file with -c: shell> chef-expander -n 1 -c /etc/custom-location/config-file.rb Make Chef Expander a runit ServiceIf you manage the Chef-Server with chef-solo, you can use the update your cookbook that manages the server to add Chef Expander as a runit service. For example: In the recipe you use through chef-solo to manage your server Add templates sv-chef-expander-run.erb Add template sv-chef-expander-log-run.erb Make sure you remove chef-server-indexer from your recipe before running chef-solo. Remove Chef-Solr-Indexer ServiceDelete chef-solr-indexer in /etc/sv, /etc/service/ and /etc/init.d. Start the ServicesThis is handled by the deb packaging for you. Upgrade ClientsUpgrading the clients can now be done. Simply install the new gem or package and restart the chef-client service. Debian packaging; the service will be stopped and started for you. Rebuild Your IndexOnce Solr has been upgraded and you have chef-expander and all other chef-server services running, you can rebuild your index by running knife index rebuild from whatever machine you normally run knife from.
|
Labels:
None
5 Comments
comments.show.hideApr 29, 2011
Sergio Rubio
chef-expander-cluster is no longer there apparently. May I replace it with chef-expander -n1 to launch it?
Running chef-expander-0.10.0.rc1
Apr 29, 2011
Daniel DeLeo
Yes, we changed the names to be less confusing and missed a few spots when we updated the documentation. Now chef-expander is the recommended way to run it, and chef-expander-vnode is there for very advanced use cases.
May 04, 2011
Ron Dahlgren
Additionally, the --pre flag passed to 'gem install chef chef-server' is also unnecessary now
May 19, 2011
Jinn Ko
Impatient as I was I wanted to upgrade before the Ubuntu deb's were released. So I wiped the deb install and did the ruby gem install.
Once the chef-solo bootstrap was complete I started up all the services and tried things out. Didn't work. Couldn't do the
Additionally rabbitmq started filling up the disk quickly.
The solution was to simply update the rabbitmq password:
Jul 13, 2011
Al George
Before i did my upgrade I put an iptables rule in place to stop connections. We have recipes that depend on search and they would have failed while the index was being rebuilt. It also allowed the index to rebuild faster as it wasn't competing with the clients for cpu time.
Blocks connections (You may need to adjust your interface to match)
iptables -A INPUT -p tcp -i eth0 --dport 4000 -j DROP
Re-enables connections
iptables -D INPUT -p tcp -i eth0 --dport 4000 -j DROP
I also found I needed to restart couchdb and the rabbitmq-server for it to work. Not sure if that is normal but it was my experience, ymmv