Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

1. Build a Solr powered Kalabox

A. Updating an existing Kalastack to include Solr

If you previously tried to build the box, just halt the box:

$ vagrant halt

Uncomment "include solr" in manifests/site.pp

  # initialize bonus shit
  include solr
  include drush
  include phpmyadmin
  include webgrind

build the box with the new, local definition:

$ export KALABOX_DEV=TRUE
$ vagrant up
$ unset KALABOX_DEV

 

B. Building for the first time

Kalastack requires Vagrant 1.2.2 and VirtualBox 4.28 to be run correctly. Before you begin please download both.

Once you have downloaded and installed both Vagrant and Virtual box, you can build out the complete stack:

$ cd ~/kalastack
$ git clone git://github.com/kalamuna/kalastack.git ./
$ vagrant box add kalabox http://files.vagrantup.com/precise64.box
(or download and expand the latest 2.x tarball from https://github.com/kalamuna/kalastack/tags)
$ vagrant plugin install vagrant-hostsupdater
$ vagrant plugin install vagrant-vbguest
$ vagrant up

 

Uncomment "include solr" in manifests/site.pp

  # initialize bonus shit
  include solr
  include drush
  include phpmyadmin
  include webgrind

 

build the box with local puppet definitions

$ export KALABOX_DEV=TRUE
$ vagrant up
$ unset KALABOX_DEV


2. Test

To ssh into your server, from within ~/kalastack, issue:

$ vagrant ssh


You should now be able to hit the solr admin page at http://solr.kala:8983/solr/admin/ if your /etc/hosts file is set up to point 1.3.3.7 to solr.kala solr.

To get up and running on Pantheon integration, visit this github documentation.

 

 

3. Point drupal to your local solr search environment

Kalabox provides us with a local solr instance. This is awesome. You'll initially need to set up your site to connect to this instance instead of Pantheon's.
To use our local configuration, you may need to disable the connection to Patheon's solr instance for each solr-enabled site, though kalastack 2.x should turn this off for you when you pull the DB down.

$ drush -y dis pantheon_api

Now, we must set the server to use our localhost and enable it at /admin/config/search/search_api/

We find the index ID of the solr index (4 here, but the number may differ for you)

$ drush search-api-status
   Id  Index              % Complete  Indexed  Total
   4   my custom index    0%          0        1597

now we re-index the site, specifying the solr index ID (4), and the number of items to index (2000)

$ drush search-api-index 4 2000


and verify our index status for completeness

$ drush search-api-status
   Id  Index              % Complete  Indexed  Total
   4   my custom index    100%         1597     1597

 


Resources

  • No labels