Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pdbe-neo4j-aws
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sreenath Sasidharan Nair
pdbe-neo4j-aws
Commits
8c5df3b4
Commit
8c5df3b4
authored
5 years ago
by
Sreenath Sasidharan Nair
Browse files
Options
Downloads
Patches
Plain Diff
a
parent
2a5e8187
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
highspec/startup.sh
+76
-0
76 additions, 0 deletions
highspec/startup.sh
highspec/userdata_script
+9
-0
9 additions, 0 deletions
highspec/userdata_script
playground/userdata_script
+9
-0
9 additions, 0 deletions
playground/userdata_script
with
94 additions
and
0 deletions
highspec/startup.sh
0 → 100644
+
76
−
0
View file @
8c5df3b4
#!/bin/bash
CURRDIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
# update yum
yum update
-y
# install dependencies
wget
$PBZIP_BASE_URL
/
$PBZIP_PACKAGE
yum
install
$BASIC_DEPENDENCIES
$PBZIP_PACKAGE
-y
rm
$PBZIP_PACKAGE
# get Neo4J
wget
$NEO4J_DOWNLOAD_URL
tar
-xvf
artifact.php?name
=
$NEO4J_SETUP_FILE
rm
artifact.php?name
=
$NEO4J_SETUP_FILE
-f
mv
$NEO4J_VERSION
/var/lib/
export
NEO4J_HOME
=
/var/lib/
$NEO4J_VERSION
# get apoc plugin
wget
$APOC_URL
mv
$APOC_VERSION
$NEO4J_HOME
/plugins/
### make few config changes for Neo4J
for
line
in
`
cat
$CURRDIR
/neo4j.conf
`
;
do
sed
-i
-e
"1i
$line
\\
"
$NEO4J_HOME
/conf/neo4j.conf
done
# provide ownership to ec2-user user
chown
-R
ec2-user:ec2-user
$NEO4J_HOME
# get the SSD device name
device
=
$(
lsblk |
grep
nvme0n1 |
cut
-d
' '
-f1
)
# create an ext4 partition on the disk
mkfs.ext4
-E
nodiscard
-m0
/dev/
$device
# create a mount point
mountpoint
=
/media/disk1
sudo mkdir
-p
$mountpoint
# mount the device
mount
-o
discard /dev/
$device
$mountpoint
# provide ownership to ec2-user user
chown
-R
ec2-user:ec2-user
$mountpoint
# get compressed graph db from S3
echo
"Getting compressed graph db from S3 - START"
date
aws s3
cp
s3://ebi-pdbe/neo4j/graph.db.tgz
$mountpoint
/
date
echo
"Getting compressed graph db from S3 - END"
# create directories for neo4j data
mkdir
-p
$mountpoint
/neo4j_data/databases/graph.db
mkdir
-p
$mountpoint
/neo4j_data/dbms
graphdb_path
=
$mountpoint
/neo4j_data/databases/graph.db
mv
$mountpoint
/graph.db.tgz
$mountpoint
/neo4j_data/databases/graph.db/
# uncompress graph data
echo
"Uncompress graph db - START"
cd
$mountpoint
/neo4j_data/databases/graph.db
date
pbzip2
-dc
graph.db.tgz |
tar
x
date
rm
graph.db.tgz
echo
"Uncompress graph db - END"
# Change Neo4J config to pick data from new location
sed
-i
-e
'1idbms.directories.data='
${
mountpoint
}
'/neo4j_data\'
$NEO4J_HOME
/conf/neo4j.conf
echo
"Starting Neo4J"
sudo
-u
ec2-user
$NEO4J_HOME
/bin/neo4j start
This diff is collapsed.
Click to expand it.
highspec/userdata_script
0 → 100644
+
9
−
0
View file @
8c5df3b4
#!/bin/bash
yum update
-y
yum
install
git
-y
git clone https://gitlab.ebi.ac.uk/sreenath/pdbe-neo4j-aws.git
cd
pdbe-neo4j-aws
chmod
-R
755
.
./setup.sh highspec
This diff is collapsed.
Click to expand it.
playground/userdata_script
0 → 100644
+
9
−
0
View file @
8c5df3b4
#!/bin/bash
yum update
-y
yum
install
git
-y
git clone https://gitlab.ebi.ac.uk/sreenath/pdbe-neo4j-aws.git
cd
pdbe-neo4j-aws
chmod
-R
755
.
./setup.sh playground
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment