michaelklishin / neo4j-server-chef-cookbook Goto Github PK
View Code? Open in Web Editor NEWChef cookbook for Neo4J Server (Community Edition)
Chef cookbook for Neo4J Server (Community Edition)
Hi
You seem to have a bunch of HTML in the templates and readme.md. The repository is currently broken.
Regards, Richard
[default] Running provisioner: chef_solo...
Generating chef JSON and uploading...
Running chef-solo...
stdin: is not a tty
[2013-07-19T14:34:06+00:00] INFO: *** Chef 10.12.0 ***
[2013-07-19T14:34:06+00:00] INFO: Setting the run_list to ["recipe[apt]", "recipe[neo4j-server::tarball]"] from JSON
[2013-07-19T14:34:06+00:00] INFO: Run List is [recipe[apt], recipe[neo4j-server::tarball]]
[2013-07-19T14:34:06+00:00] INFO: Run List expands to [apt, neo4j-server::tarball]
[2013-07-19T14:34:06+00:00] INFO: Starting Chef Run for vagrant-ubuntu-raring-64
[2013-07-19T14:34:06+00:00] INFO: Running start handlers
[2013-07-19T14:34:06+00:00] INFO: Start handlers complete.
[2013-07-19T14:34:06+00:00] ERROR: Running exception handlers
[2013-07-19T14:34:06+00:00] ERROR: Exception handlers complete
[2013-07-19T14:34:06+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-07-19T14:34:06+00:00] FATAL: NameError: undefined local variable or method `use_inline_resources' for #<Class:0x00000001d4ebe8>
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
If you comment that line of code another error happens:
[default] Running provisioner: chef_solo...
Generating chef JSON and uploading...
Running chef-solo...
stdin: is not a tty
[2013-07-19T14:39:30+00:00] INFO: *** Chef 10.12.0 ***
[2013-07-19T14:39:30+00:00] INFO: Setting the run_list to ["recipe[apt]", "recipe[neo4j-server::tarball]"] from JSON
[2013-07-19T14:39:30+00:00] INFO: Run List is [recipe[apt], recipe[neo4j-server::tarball]]
[2013-07-19T14:39:30+00:00] INFO: Run List expands to [apt, neo4j-server::tarball]
[2013-07-19T14:39:30+00:00] INFO: Starting Chef Run for vagrant-ubuntu-raring-64
[2013-07-19T14:39:30+00:00] INFO: Running start handlers
[2013-07-19T14:39:30+00:00] INFO: Start handlers complete.
[2013-07-19T14:39:30+00:00] ERROR: Running exception handlers
[2013-07-19T14:39:30+00:00] ERROR: Exception handlers complete
[2013-07-19T14:39:30+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-07-19T14:39:30+00:00] FATAL: NoMethodError: undefined method `notifies' for "template[/etc/init.d/neo4j]":String
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
Maybe I miss something?
hi
i have forked you project and update the version and add port forward.
I'm trying to run the tarball recipe however I'm getting an error when it's run:
================================================================================
Error executing action `create` on resource 'directory[/usr/local/neo4j-server/conf]'
================================================================================
Errno::EEXIST
-------------
File exists - /usr/local/neo4j-server
Resource Declaration:
---------------------
# In /srv/chef/file_store/cookbooks/neo4j/recipes/tarball.rb
94: directory dir do
95: owner node.neo4j.server.user
96: group node.neo4j.server.user
97: recursive true
98: action :create
99: end
100: end
Compiled Resource:
------------------
# Declared in /srv/chef/file_store/cookbooks/neo4j/recipes/tarball.rb:94:in `block in from_file'
directory("/usr/local/neo4j-server/conf") do
provider Chef::Provider::Directory
action [:create]
retries 0
retry_delay 2
path "/usr/local/neo4j-server/conf"
recursive true
cookbook_name "neo4j"
recipe_name "tarball"
owner "neo4j"
group "neo4j"
end
It appears that :installation_dir
always points to the binary file instead of a directory
Hi,
First of all thanks for the recipe!
There seems to be a problem when the version number is set to 1.7.2.
It give the following error:
FATAL: Chef::Exceptions::ShellCommandFailed: bash[extract /tmp/neo4j-community-1.7.2.tar.gz, move it to /usr/local/neo4j-server] (neo4j-server::tarball line 58) had an error: Chef::Exceptions::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20120712-1500-ze195r-0" ----
STDOUT:
STDERR: mv: cannot stat `/tmp/neo4j-community-1.7.2': No such file or directory
---- End output of "bash" "/tmp/chef-script20120712-1500-ze195r-0" ----
Ran "bash" "/tmp/chef-script20120712-1500-ze195r-0" returned 1
It looks like the tar is not extracted to '/tmp/neo4j-community-1.7.2' but to 'tmp/neo4j-community-1.7'.
Maybe it is a idea to change the mv command into 'mv --force tar tf #{tmp} | head -1
#{node.neo4j.server.installation_dir}' ?
This is largely a style issue, but I see that the host address is nested under "http" in the configuration.
I realise that this would be a breaking change (and as such, unlikely to be changed soon), but I propose that it be moved up a level as it encompasses both HTTP and HTTPS.
Edit: code reference https://github.com/michaelklishin/neo4j-server-chef-cookbook/blob/master/attributes/tarball.rb#L24
You can set neo4j.server.version to be anything other than 1.8 and it will still download the 1.8 tar, name it the tar the version you were asking for and install it (you can see the tar looking like it has the correct name in /tmp). If you only specify the version like so:
"neo4j": { "server": {
"version": "1.9.1"
}}
it will actually install 1.8. You can see the result by checking /usr/local/neo4j-server/README.txt.
I have a workaround, which is to set the neo4j.server.tarball attributes manually:
"neo4j": { "server": {
"version": "1.9.1",
"tarball" : {
"url": "http://dist.neo4j.org/neo4j-community-1.9.1-unix.tar.gz",
"md5": "9905b51303b97f15b0041d8db3e6520b"
}
}},
That config actually puts 1.9.1 into the /usr/local/neo4j-server directory.
I'm using this cookbook (as of revision 22d5cca), and deploying to an EC2 server set up as shown below. Everything looks good in the output from the knife run, but when I log into the server, neo4j-server isn't running. I see files have been written to the data directory (overridden from the default location as shown below), and I see in the log files that the server came up, but since it's not running, obviously it shut down or was killed somehow.
If I run sudo service neo4j start
then the service starts and stays up. The log output (in console.log and neo4j.0.0.log) from the manual start looks the same as from the chef-client-initiated start, based on a cursory comparison. There could be some detail I'm missing, but they both end with INFO: Server started on [http://0.0.0.0:7474/]
Here's how I provisioned the server:
knife ec2 server create -I ami-74199744 -x ubuntu -f m1.small --region 'us-west-2' -Z 'us-west-2b' -r 'role[foo]'
The foo role does a few things that matter for neo4j-server:
/data
neo4j-server::tarball
in its run_listIs there anything you'd recommend I look at other than the files in /usr/local/neo4j-server/data/log/
to diagnose this issue? If you want to see those logs, I can provide them.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.