Giter VIP home page Giter VIP logo

opsworks_solrcloud's Introduction

Solr cloud cookbook for AWS OpsWorks

Author: AOE <[email protected]>
Author: Timo Schmidt
Author: Nikolay Diaur
Author: Michael Klapper
Description:Cookbook to install solrcloud on an aws opsworks stack
Build status:buildStatusIcon

Foreword

This cookbook can be used to install SolrCloud on an aws OpsWorks stack.

It uses the solrcloud cookbooks to install solr in a cloud mode with an external zookeeper service. By now we install zookeeper on each node and use exhibitor to discover the zookeeper instances with our chef cookbook

What do i need to configure?

You need to:

  1. Create a new stack with the name "solrcloud"

    • Enable "Manage Berkshelf" (to enable the evaluation of Berksfile)
    • Use Berkshelf version 3.1.3
    • Add custom stack json configuration:
{
    "opsworks_solrcloud":
    {
        "zkconfigsets":
        {
            "source": "s3",
            "s3":
            {
                "bucket": "#configset_bucket#",
                "remote_path": "#configset_tarball##",
                "aws_access_key_id": "#access_key_id#",
                "aws_secret_access_key": "#access_secret#"
            }
        }
    },
    "solrcloud":
    {
        "zkconfigsets":
        {
            "#configsetname#":
            {
                "action": "create"
            }
        },
        "collections":
        {
            "#collectionname#":
            {
                "collection_config_name": "#configsetname#"
                "name": "#collectionname#"
            }
        }
    }
}

With the configuration above you will get a tarball from an s3 bucket, that needs to contain the solr configuration for each configset. The "zkconfigsets" and "collections" configuration is used by the solrcloud cookbook to upload the configuration to zookeeper.

Example:

{
    "opsworks_solrcloud":
    {
        "zkconfigsets":
        {
            "source": "s3",
            "s3":
            {
                "bucket": "myreleasebucket",
                "remote_path": "/solr/config.tar.hz",
                "aws_access_key_id": "key",
                "aws_secret_access_key": "accesskey"
            }
        }
    },
    "solrcloud":
    {
        "zkconfigsets":
        {
            "exampleconfig":
            {
                "action": "create"
            }
        },
        "collections":
        {
            "example":
            {
                "collection_config_name": "exampleconfig"
            }
        }
    }
}

The tar.gz file that can be used with this setup needs to have the following structure:

"exampleconfig" (contains the solr configuration for the example collection)
"conf"
solrconfig.xml ...
  1. Create a custom layer with the name "solrcloud"
    • Include the git repository as custom chef recipes
    • Map the custom recipes to the events:
      • Setup: opsworks_solrcloud::setup
      • Configure: opsworks_solrcloud::configure
      • Deploy: opsworks_solrcloud::deploy
      • Undeploy: opsworks_solrcloud::undeploy

Notes

By now we use the first node in the cluster as exhibitor endpoint to retrieve all active zookeeper nodes. It might make sence to run zookeeper and exhibitor on another stack and support this in this cookbook.

How can i access the solr server and zookeeper?

You can use:

http://anyclusternode:8080/exhibitor/v1/ui/index.html

to access the ui of the exhibitor, which is used to manage the zookeeper instances.

When the cookbook was executed successful you should also be able to access solr cloud with one of the cluster hostname

e.g:

http://anyclusternode:8983/solr/

and your elastic load balancer should could also be configured to load balance requests to this port to all active instances.

Resources

Used cookbooks:

Documentation:

Other tools approaches to setup solr cloud

Solr scale toolkit:

https://github.com/LucidWorks/solr-scale-tk

Cloudera CDH5:

http://www.cloudera.com/content/cloudera/en/downloads/cdh/cdh-5-2-0.html

alt:Build Status :target: http://travis-ci.org/timoschmidt/opsworks_solrcloud

opsworks_solrcloud's People

Contributors

ndiaur avatar timohund avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

opsworks_solrcloud's Issues

during config stage I'm getting this error

not sure if I'm missing something.

Error executing action setup on resource 'opsworks_solrcloud_solr[Setting up solr cloud]'

ExhibitorError

getaddrinfo: Name or service not known

Cookbook Trace:

/var/lib/aws/opsworks/cache.stage2/cookbooks/exhibitor/libraries/exhibitor_discovery.rb:35:in rescue in discover_zookeepers' /var/lib/aws/opsworks/cache.stage2/cookbooks/exhibitor/libraries/exhibitor_discovery.rb:30:indiscover_zookeepers'
/var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_solrcloud/libraries/opsworks_solrcloud.rb:12:in get_server_array' /var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_solrcloud/providers/solr.rb:9:inblock in class_from_file'

Resource Declaration:

In /var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_solrcloud/recipes/configure.rb

7: opsworks_solrcloud_solr 'Setting up solr cloud' do
8: action [:setup, :restart]
9: end

Compiled Resource:

Declared in /var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_solrcloud/recipes/configure.rb:7:in `from_file'

opsworks_solrcloud_solr("Setting up solr cloud") do
action [:setup, :restart]
retries 0
retry_delay 2
cookbook_name "opsworks_solrcloud"
recipe_name "configure"
end

[2015-05-22T18:23:36+00:00] INFO: Running queued delayed notifications before re-raising exception
[2015-05-22T18:23:36+00:00] ERROR: Running exception handlers
[2015-05-22T18:23:36+00:00] ERROR: Exception handlers complete
[2015-05-22T18:23:36+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out
[2015-05-22T18:23:37+00:00] ERROR: opsworks_solrcloud_solr[Setting up solr cloud](opsworks_solrcloud::configure line 7) had an error: ExhibitorError: getaddrinfo: Name or service not known
[2015-05-22T18:23:37+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.