Skip to content

Commit

Permalink
publish on git
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe committed May 2, 2012
0 parents commit 25cf15a
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dotcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
neo4j:
type: custom
buildscript: neo4j/builder
systempackages:
- lsof
ports:
www: http
18 changes: 18 additions & 0 deletions neo4j/builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash


NEO4J_DIR="$HOME/neo4j"
PACKAGE="http://dist.neo4j.org/neo4j-community-1.7-unix.tar.gz"

cd

if [ -d $NEO4J_DIR ]; then
echo "Neo4j is already setup"
else
mkdir -p $NEO4J_DIR
curl "$PACKAGE" | tar -zxf- --strip-components=1 -C "$NEO4J_DIR"
fi

cat > ~/profile << EOF
NEO4J_DIR="$NEO4J_DIR"
EOF
21 changes: 21 additions & 0 deletions postinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

# Source the INSTALL_DIRECTORY variable
[ -f ~/profile ] && . ~/profile

sed -i 's/^org.neo4j.server.webserver.port=.*//' $NEO4J_DIR/conf/neo4j-server.properties
sed -i 's/^org.neo4j.server.webserver.address=.*//' $NEO4J_DIR/conf/neo4j-server.properties
echo org.neo4j.server.webserver.port=$PORT_WWW >> $NEO4J_DIR/conf/neo4j-server.properties
echo org.neo4j.server.webserver.address=0.0.0.0 >> $NEO4J_DIR/conf/neo4j-server.properties


#running script
cat > ~/run <<EOF
#!/bin/bash
exec /usr/bin/java -cp /home/dotcloud/neo4j/lib/geronimo-jta_1.1_spec-1.1.1.jar:/home/dotcloud/neo4j/lib/lucene-core-3.5.0.jar:/home/dotcloud/neo4j/lib/neo4j-cypher-1.7.jar:/home/dotcloud/neo4j/lib/neo4j-graph-algo-1.7.jar:/home/dotcloud/neo4j/lib/neo4j-graph-matching-1.7.jar:/home/dotcloud/neo4j/lib/neo4j-jmx-1.7.jar:/home/dotcloud/neo4j/lib/neo4j-kernel-1.7.jar:/home/dotcloud/neo4j/lib/neo4j-lucene-index-1.7.jar:/home/dotcloud/neo4j/lib/neo4j-shell-1.7.jar:/home/dotcloud/neo4j/lib/neo4j-udc-1.7.jar:/home/dotcloud/neo4j/lib/org.apache.servicemix.bundles.jline-0.9.94_1.jar:/home/dotcloud/neo4j/lib/scala-library-2.9.0-1.jar:/home/dotcloud/neo4j/lib/server-api-1.7.jar:/home/dotcloud/neo4j/system/lib/antlr-2.7.7.jar:/home/dotcloud/neo4j/system/lib/asm-3.1.jar:/home/dotcloud/neo4j/system/lib/asm-analysis-3.2.jar:/home/dotcloud/neo4j/system/lib/asm-commons-3.2.jar:/home/dotcloud/neo4j/system/lib/asm-tree-3.2.jar:/home/dotcloud/neo4j/system/lib/asm-util-3.2.jar:/home/dotcloud/neo4j/system/lib/bcprov-jdk16-140.jar:/home/dotcloud/neo4j/system/lib/blueprints-core-1.2.jar:/home/dotcloud/neo4j/system/lib/blueprints-neo4j-graph-1.2.jar:/home/dotcloud/neo4j/system/lib/commons-beanutils-1.8.0.jar:/home/dotcloud/neo4j/system/lib/commons-beanutils-core-1.8.0.jar:/home/dotcloud/neo4j/system/lib/commons-collections-3.2.1.jar:/home/dotcloud/neo4j/system/lib/commons-configuration-1.6.jar:/home/dotcloud/neo4j/system/lib/commons-digester-1.8.1.jar:/home/dotcloud/neo4j/system/lib/commons-io-1.4.jar:/home/dotcloud/neo4j/system/lib/commons-lang-2.4.jar:/home/dotcloud/neo4j/system/lib/commons-logging-1.1.1.jar:/home/dotcloud/neo4j/system/lib/gremlin-groovy-1.5.jar:/home/dotcloud/neo4j/system/lib/gremlin-java-1.5.jar:/home/dotcloud/neo4j/system/lib/groovy-1.8.5.jar:/home/dotcloud/neo4j/system/lib/jackson-core-asl-1.8.3.jar:/home/dotcloud/neo4j/system/lib/jackson-jaxrs-1.8.3.jar:/home/dotcloud/neo4j/system/lib/jackson-mapper-asl-1.8.3.jar:/home/dotcloud/neo4j/system/lib/jansi-1.5.jar:/home/dotcloud/neo4j/system/lib/jcl-over-slf4j-1.6.1.jar:/home/dotcloud/neo4j/system/lib/jersey-core-1.9.jar:/home/dotcloud/neo4j/system/lib/jersey-multipart-1.9.jar:/home/dotcloud/neo4j/system/lib/jersey-server-1.9.jar:/home/dotcloud/neo4j/system/lib/jettison-1.3.jar:/home/dotcloud/neo4j/system/lib/jetty-6.1.25.jar:/home/dotcloud/neo4j/system/lib/jetty-util-6.1.25.jar:/home/dotcloud/neo4j/system/lib/jsr311-api-1.1.1.jar:/home/dotcloud/neo4j/system/lib/log4j-over-slf4j-1.6.1.jar:/home/dotcloud/neo4j/system/lib/mimepull-1.6.jar:/home/dotcloud/neo4j/system/lib/neo4j-cypher-plugin-1.7.jar:/home/dotcloud/neo4j/system/lib/neo4j-gremlin-plugin-1.7.jar:/home/dotcloud/neo4j/system/lib/neo4j-server-1.7-static-web.jar:/home/dotcloud/neo4j/system/lib/neo4j-server-1.7.jar:/home/dotcloud/neo4j/system/lib/pipes-1.0.jar:/home/dotcloud/neo4j/system/lib/rrd4j-2.0.7.jar:/home/dotcloud/neo4j/system/lib/servlet-api-2.5-20081211.jar:/home/dotcloud/neo4j/system/lib/slf4j-api-1.6.1.jar:/home/dotcloud/neo4j/system/lib/slf4j-jdk14-1.6.1.jar:/home/dotcloud/neo4j/system/lib/stax-api-1.0.1.jar -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dfile.encoding=UTF-8 -Dlog4j.configuration=file:conf/log4j.properties \
-Dorg.neo4j.server.properties="/home/dotcloud/neo4j/conf/neo4j-server.properties" \
-Djava.util.logging.config.file="/home/dotcloud/neo4j/conf/logging.properties" \
-Dneo4j.home="/home/dotcloud/neo4j/" -Dneo4j.instance="/home/dotcloud/neo4j/" \
org.neo4j.server.Bootstrapper
EOF
chmod +x ~/run
50 changes: 50 additions & 0 deletions readme.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Neo4J 1.7 On DotCloud (ALPHA)
=========================

This is an **ALPHA** (i.e., not production-ready) Neo4j stack for DotCloud.

based on https://raw.github.com/jpetazzo/neo4j-on-dotcloud-ALPHA

How It Works
------------

It retrieve Neo4j community edition tarball, unpacks it, and adds a little
bit of scaffolding (custom scripts) to run it under dotCloud.
The build is not totally dotCloud-compliant (it uses all the default build
options, instead of trying to setup the logs/data/etc. directories in the
proper place).

Again: **don't use this for production!**

Proper Neo4j support will come soon.


How To Use It (Standalone)
--------------------------

Just use our (un)patented Clone-And-DotCloud-Push method::

dotcloud push neo4j17-on-dotcloud

At the end of the push, the URL to the Neo4j administration interface
will be shown.


How To Use It (In Your App)
---------------------------

Add the ``dotcloud.yml`` supplied here to your own ``dotcloud.yml``,
and copy the ``neo4j`` directory to your repository as well. Push as
usual. Rejoice (but remember not to put any important stuff into
your Neo4j DB yet).


Authentication
--------------

By default, there is **NO** authentication. Anyone knowing its URL
can acccess your Neo4j DB. You can setup authentication yourself if
you need to. And of course, when Neo4j will be officially supported,
authentication will be pre-configured by default, like for other
dotCloud-supported database stacks.

0 comments on commit 25cf15a

Please sign in to comment.