Git Product home page Git Product logo

orientdb-cookbook's Introduction

Build Status

OrientDB Cookbook

This cookbook installs OrientDB

Requirements

It has been tested on Ubuntu 12.04, but should work on any platform where Java 1.6 works.

The java and apt cookbooks are needed, as usual may be handled with Berkshelf.

General Attributes:

Attribute Description Default value
node['orientdb']['user']['id'] User name orientdb
node['orientdb']['version'] Database version 2.0.3
node['orientdb']['flavour'] Flavour to be installed, now only community community
node['orientdb']['base_tarball_url'] Partial location of the tarball url, flavour, version and extension removed http://www.orientechnologies.com/[email protected]&os=linux&file=orientdb
node['orientdb']['installation_directory'] Absolute install dir, dependent on the base install dir /opt/orientdb
node['orientdb']['default_init_script'] Full path to tarball's init script /opt/orientdb/bin/orientdb.sh
node['orientdb']['init_script'] Full path to actual init script /etc/init.d/orientdb
node['orientdb']['db_user'] Admin DB user admin
node['orientdb']['db_password'] Admin DB password admin

Distributed Attributes:

Attribute Description Default value
node['orientdb']['hazelcast']['nodeName'] Node Name {node.name}
node['orientdb']['hazelcast']['enabled'] Enable Hazelcast plugin true
node['orientdb']['hazelcast']['group']['name'] Hazelcast group name orientdb
node['orientdb']['hazelcast']['group']['password'] Hazelcast group password orientdb
node['orientdb']['hazelcast']['network']['join']['mode'] Hazelcast mode, one of multicast, tcp-ip or aws multicast
node['orientdb']['hazelcast']['network']['join']['multicast']['group'] Hazelcast multicast host orientdb
node['orientdb']['hazelcast']['network']['join']['multicast']['port'] Hazelcast multicast port orientdb
node['orientdb']['node_search_criteria'] Chef Search criteria for locating peers. Match on hazelcast group name & password (from above)
node['orientdb']['hazelcast']['network']['join']['tcp-ip']['members'] Array of hostname:port of peer hazelcast members to populate hazelcast.xml file. hostname:port list from node_search_criteria (above)
node['orientdb']['hazelcast']['network']['join']['aws']['access-key'] EC2 access key my-access-key
node['orientdb']['hazelcast']['network']['join']['aws']['secret-key'] EC2 secret key my-secret-key
node['orientdb']['hazelcast']['network']['join']['aws']['region'] Optional, EC2 region us-west-1
node['orientdb']['hazelcast']['network']['join']['aws']['host-header'] Optional, EC2 host header. If set region shouldn't be set as it will override this property ec2.amazonaws.com
node['orientdb']['hazelcast']['network']['join']['aws']['security-group-name'] EC2 security group hazelcast-sg
node['orientdb']['hazelcast']['network']['join']['aws']['tag-key'] EC2 tag key type
node['orientdb']['hazelcast']['network']['join']['aws']['tag-value'] EC2 tag value hz-nodes

|node['orientdb']['distributed']['clusters']['servers']|Array of hostnames to populate default-distributed-db-config.json file.|hostname list from node_search_criteria (above)|

Running the tests

For the unit tests just execute the default rake task:

$ bundle install
$ bundle exec rake

Run the integration tests through test kitchen (Vagrant and VirtualBox are needed for this):

$ bundle exec kitchen test

Vagrant usage

For testing the cookbook with Vagrant 1.2+ you just have to execute bootstrap.sh:

$ bootstrap.sh

It installs the required Vagrant plugins and launchs the machine. After the process you have a orientdb instance running in orientdb.local host, ip 33.33.33.33 (you may need to provide root privileges to allow vagrant-hostmanager do its duty).

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write you change
  4. Write tests for your change
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request

License and Authors

MIT License

Authors: Federico Gimenez Nieto [email protected]

orientdb-cookbook's People

Contributors

fgimenez avatar mdbelt avatar bitdeli-chef avatar

Stargazers

David Sadler avatar Wellington Torrejais da Silva avatar Ernestas Poskus avatar Kyle Little avatar Rudi Seelig avatar Dário avatar Steve Hoeksema avatar Steven Koch avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

orientdb-cookbook's Issues

Support AWS

I'm just starting to use this cookbook to install orientdb on AWS EC2 instances. One of the first issues I ran into is that there are no configuration parameters for AWS_SECRET and AWS_ACCESS_KEY in hazelcast plugin to support EC2 deployment.
Thanks.

PS: I have never tried to setup orientdb in distributed mode on EC2 before, so I may be missing something?

service orientdb does not support chkconfig

Hi @fgimenez, first of all thanks for this cookbook it has helped me significantly deploying OrientDB with AWS OpsWorks!

I'm still an AWS / Cloud / Chef / Ruby newbie and I'm experiencing the error service orientdb does not support chkconfig (full log below) every time I start my orientdb instance (both Amazon Linux and Ubuntu). OrientDB does start and runs but this error is a bit of a nuisance...

Is this something that needs to be addressed in orientdb-cookbook or something I need to config? I did research a bit but couldn't find anything useful... I would appreciate if you could point me in the right direction.

Thanks in advance!

...
[2015-05-12T14:46:43+00:00] INFO: execute[set service status not runnint to correct exit value] ran successfully
[2015-05-12T14:46:43+00:00] INFO: Processing service[orientdb_new] action start (orientdb::default line 30)
[2015-05-12T14:46:44+00:00] INFO: service[orientdb_new] started
[2015-05-12T14:46:44+00:00] INFO: Processing service[orientdb_new] action enable (orientdb::default line 30)
 
================================================================================
Error executing action `enable` on resource 'service[orientdb_new]'
================================================================================
 
 
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /sbin/chkconfig orientdb on ----
STDOUT: 
STDERR: service orientdb does not support chkconfig
---- End output of /sbin/chkconfig orientdb on ----
Ran /sbin/chkconfig orientdb on returned 1
 
 
Resource Declaration:
---------------------
# In /var/lib/aws/opsworks/cache.stage2/cookbooks/orientdb/recipes/default.rb
 
30: service "orientdb_new" do
31:   service_name "orientdb"
32:   supports :status => true, :start => true, :stop => true
33:   action [:start, :enable]
34: end
 
 
 
Compiled Resource:
------------------
# Declared in /var/lib/aws/opsworks/cache.stage2/cookbooks/orientdb/recipes/default.rb:30:in `from_file'
 
service("orientdb_new") do
action [:start, :enable]
updated true
supports {:status=>true, :start=>true, :stop=>true}
retries 0
retry_delay 2
service_name "orientdb"
running true
pattern "orientdb_new"
cookbook_name "orientdb"
recipe_name "default"
end

Better docs

A quick note on where everything is installed / how to start up would be helpful.

Error running testing spec

I'm trying to run "rspec" (version 3.2.0) from the root of cookbook & I'm getting a compilation error on spec/spec_helper.rb indicating the the "<<" is an undefined method. Specifically the stack trace is:

/home/user/direct-chef/cookbooks/orient-db-MDB-Github-Fork/spec/spec_helper.rb:13:in `<top (required)>': undefined method `<<' for {}:Hash (NoMethodError)
        from /home/user/direct-chef/cookbooks/orient-db-MDB-Github-Fork/spec/configuration_spec.rb:1:in `require_relative'
        from /home/user/direct-chef/cookbooks/orient-db-MDB-Github-Fork/spec/configuration_spec.rb:1:in `<top (required)>'
        from /usr/local/lib/ruby/gems/2.1.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1226:in `load'
        from /usr/local/lib/ruby/gems/2.1.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1226:in `block in load_spec_files'
        from /usr/local/lib/ruby/gems/2.1.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224:in `each'
        from /usr/local/lib/ruby/gems/2.1.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224:in `load_spec_files'
        from /usr/local/lib/ruby/gems/2.1.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:97:in `setup'
        from /usr/local/lib/ruby/gems/2.1.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:85:in `run'
        from /usr/local/lib/ruby/gems/2.1.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:70:in `run'
        from /usr/local/lib/ruby/gems/2.1.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:38:in `invoke'
        from /usr/local/lib/ruby/gems/2.1.0/gems/rspec-core-3.2.0/exe/rspec:4:in `<top (required)>'
        from /usr/local/bin/rspec:23:in `load'
        from /usr/local/bin/rspec:23:in `<main>'

Is running rspec the correct way to test this cookbook? Do you know of an alternate way of doing the intended function that will compile?

Distributed mode not working in AWS EC2 instance using cookbook

Hi,

I'm currently running into the below issue where setting up orientdb on AWS ec2 instance using chef cookbook.I'm using the version community edition 2.1.8... I followed the reference cookbook from https://github.com/fgimenez/orientdb-cookbook.

nodename genererated automatically

Here is the error message from log file

2016-01-20 12:48:31:388 INFO Installing GREMLIN language v.2.6.0 - graph.pool.max=50 [OGraphServerHandler]Exception in thread "main" com.orientechnologies.orient.core.exception.OConfigurationException: Illegal node name '10.94.77.214_160120123938'. '.' is not allowed in node name
at com.orientechnologies.orient.server.distributed.ODistributedAbstractPlugin.config(ODistributedAbstractPlugin.java:119)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.config(OHazelcastPlugin.java:116)
at com.orientechnologies.orient.server.OServer.registerPlugins(OServer.java:978)
at com.orientechnologies.orient.server.OServer.activate(OServer.java:346)
at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)

Here is the config from orientdb-server-config.xml

<handler class="com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin">
        <parameters>
            <parameter name="nodeName" value="<%= node['orientdb']['hazelcast']['nodeName']%>" />
            <parameter name="enabled" value="<%= node['orientdb']['hazelcast']['enabled']%>"/>
            <parameter name="configuration.db.default"
                       value="${ORIENTDB_HOME}/config/default-distributed-db-config.json"/>
            <parameter name="configuration.hazelcast" value="${ORIENTDB_HOME}/config/hazelcast.xml"/>
        </parameters>
    </handler>

Here is the detailed log from orientdb-err.log

2016-01-20 13:41:11:895 INFO Installing GREMLIN language v.2.6.0 - graph.pool.max=50 [OGraphServerHandler]Exception in thread "main" com.orientechnologies.orient.core.exception.OConfigurationException: Illegal node name '10.94.77.111_160120133340'. '.' is not allowed in node name
at com.orientechnologies.orient.server.distributed.ODistributedAbstractPlugin.config(ODistributedAbstractPlugin.java:119)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.config(OHazelcastPlugin.java:116)
at com.orientechnologies.orient.server.OServer.registerPlugins(OServer.java:978)
at com.orientechnologies.orient.server.OServer.activate(OServer.java:346)
at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)

2016-01-20 13:41:32:435 WARNI Distributed server is not yet ONLINE (status=OFFLINE), reject incoming connection from /10.94.77.111:60726. If you are trying to shutdown the server, please kill the process [OServerNetworkListener]
2016-01-20 13:46:27:892 WARNI Distributed server is not yet ONLINE (status=OFFLINE), reject incoming connection from /10.94.77.111:60828. If you are trying to shutdown the server, please kill the process [OServerNetworkListener]log.OLogManager log
INFO: Loading configuration from: /opt/orientdb/config/orientdb-server-config.xml...
Jan 20, 2016 1:41:32 PM com.orientechnologies.common.log.OLogManager log
SEVERE: Error on connecting to 0.0.0.0:2424
com.orientechnologies.orient.enterprise.channel.binary.ONetworkProtocolException: Cannot read protocol version from remote server ip-10-94-77-111.kdc.capitalone.com/10.94.77.111:2424: java.io.EOFException
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.(OChannelBinaryAsynchClient.java:99)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.(OChannelBinaryAsynchClient.java:62)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClientSynch.(OChannelBinaryAsynchClientSynch.java:36)
at com.orientechnologies.orient.server.OServerShutdownMain.connect(OServerShutdownMain.java:107)
at com.orientechnologies.orient.server.OServerShutdownMain.main(OServerShutdownMain.java:139)

Jan 20, 2016 1:41:32 PM com.orientechnologies.common.log.OLogManager log
SEVERE: Error on connecting to 0.0.0.0:2425
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:204)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.(OChannelBinaryAsynchClient.java:83)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.(OChannelBinaryAsynchClient.java:62)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClientSynch.(OChannelBinaryAsynchClientSynch.java:36)
at com.orientechnologies.orient.server.OServerShutdownMain.connect(OServerShutdownMain.java:107)
at com.orientechnologies.orient.server.OServerShutdownMain.main(OServerShutdownMain.java:139)

Jan 20, 2016 1:41:32 PM com.orientechnologies.common.log.OLogManager log
SEVERE: Error on connecting to 0.0.0.0:2426
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:204)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.(OChannelBinaryAsynchClient.java:83)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.(OChannelBinaryAsynchClient.java:62)
at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClientSynch.(OChannelBinaryAsynchClientSynch.java:36)
at com.orientechnologies.orient.server.OServerShutdownMain.connect(OServerShutdownMain.java:107)
at com.orientechnologies.orient.server.OServerShutdownMain.main(OServerShutdownMain.java:139)

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.