Last active
May 8, 2018 14:06
-
-
Save Limess/e309f1efacc3ce2b121ba6f119447050 to your computer and use it in GitHub Desktop.
Circle CI 2.0 neo4j hang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine: | |
node: | |
version: 8.11.1 | |
java: | |
version: oraclejdk8 | |
environment: | |
NEO4J_VERSION: "3.2.9" | |
deployment: | |
production: | |
branch: master | |
database: | |
override: | |
- mkdir -p neo4j | |
- wget -q dist.neo4j.org/neo4j-community-$NEO4J_VERSION-unix.tar.gz | |
- tar -xzf neo4j-community-$NEO4J_VERSION-unix.tar.gz -C neo4j --strip-components 1 | |
- sed -i "s|#dbms.security.auth_enabled=false|dbms.security.auth_enabled=false|g" neo4j/conf/neo4j.conf | |
- ./scripts/neo4j-plugins | |
- neo4j/bin/neo4j start | |
- ./scripts/neo4j-wait-for-start | |
- node scripts/init.js | |
test: | |
post: | |
- mv coverage $CIRCLE_ARTIFACTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
jobs: | |
install: | |
docker: | |
- image: circleci/node:8.11.1-browsers | |
environment: | |
NEO4J_VERSION: "3.2.9" | |
steps: | |
- checkout | |
- run: | |
name: Install dependencies | |
command: npm install --no-save | |
- run: | |
name: Prepare neo4j database | |
command: | | |
mkdir -p neo4j | |
wget -q dist.neo4j.org/neo4j-community-$NEO4J_VERSION-unix.tar.gz | |
tar -xzf neo4j-community-$NEO4J_VERSION-unix.tar.gz -C neo4j --strip-components 1 | |
sed -i "s|#dbms.security.auth_enabled=false|dbms.security.auth_enabled=false|g" neo4j/conf/neo4j.conf | |
./scripts/neo4j-plugins | |
neo4j/bin/neo4j start | |
./scripts/neo4j-wait-for-start | |
node scripts/init.js | |
- run: | |
name: Run tests | |
command: npm test | |
workflows: | |
version: 2 | |
build-and-deploy: | |
jobs: | |
- install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p neo4j | |
wget -q dist.neo4j.org/neo4j-community-$NEO4J_VERSION-unix.tar.gz | |
tar -xzf neo4j-community-$NEO4J_VERSION-unix.tar.gz -C neo4j --strip-components 1 | |
sed -i "s|#dbms.security.auth_enabled=false|dbms.security.auth_enabled=false|g" neo4j/conf/neo4j.conf | |
./scripts/neo4j-plugins | |
neo4j/bin/neo4j start | |
./scripts/neo4j-wait-for-start | |
node scripts/init.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ neo4j/bin/neo4j start | |
Active database: graph.db | |
Directories in use: | |
home: /home/circleci/project/gdpr-biz-op-api/neo4j | |
config: /home/circleci/project/gdpr-biz-op-api/neo4j/conf | |
logs: /home/circleci/project/gdpr-biz-op-api/neo4j/logs | |
plugins: /home/circleci/project/gdpr-biz-op-api/neo4j/plugins | |
import: /home/circleci/project/gdpr-biz-op-api/neo4j/import | |
data: /home/circleci/project/gdpr-biz-op-api/neo4j/data | |
certificates: /home/circleci/project/gdpr-biz-op-api/neo4j/certificates | |
run: /home/circleci/project/gdpr-biz-op-api/neo4j/run | |
Starting Neo4j. | |
Started neo4j (pid 188). It is available at http://localhost:7474/ | |
There may be a short delay until the server is ready. | |
See /home/circleci/neo4j/logs/neo4j.log for current status. | |
$ tail -f neo4j/logs/* | |
==> logs/debug.log <== | |
2018-05-08 14:05:02.137+0000 WARN [o.n.i.p.PageCache] The dbms.memory.pagecache.size setting has not been configured. It is recommended that this setting is always explicitly configured, to ensure the system has a balanced configuration. Until then, a computed heuristic value of 21474836480 bytes will be used instead. | |
2018-05-08 14:05:04.858+0000 INFO [o.n.k.i.f.CommunityEditionModule] No locking implementation specified, defaulting to 'community' | |
2018-05-08 14:05:05.074+0000 INFO [o.n.k.AvailabilityGuard] Requirement makes database unavailable: Database available | |
==> logs/neo4j.log <== | |
nohup: ignoring input | |
2018-05-08 14:05:01.999+0000 INFO ======== Neo4j 3.2.9 ======== | |
2018-05-08 14:05:02.044+0000 INFO Starting... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Install neo4j apoc plugin (needed for https://github.com/neo4j-graphql/neo4j-graphql-js) as per instructions on repo | |
mkdir -p neo4j/{plugins,logs,data} | |
wget -q -P neo4j/plugins https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/3.2.3.6/apoc-3.2.3.6-all.jar | |
chmod 0644 neo4j/plugins/*.jar | |
ls -la neo4j/plugins | |
echo "dbms.security.procedures.unrestricted=apoc.cypher.runFirstColumn" >> neo4j/conf/neo4j.conf | |
echo "dbms.security.procedures.whitelist=apoc.cypher.runFirstColumn" >> neo4j/conf/neo4j.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env bash | |
# Wait up to 2 minutes for the Neo4j bolt port to be available | |
BOLT_PORT=7687 | |
echo "Waiting up to 2 minutes for neo4j bolt port ($BOLT_PORT)" | |
for i in {1..120}; | |
do | |
nc -z 127.0.0.1 $BOLT_PORT | |
is_up=$? | |
if [ $is_up -eq 0 ]; then | |
echo | |
echo "Successfully started, neo4j bolt available on $BOLT_PORT" | |
break | |
fi | |
sleep 1 | |
echo -n "." | |
done | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment