Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
platy-browser-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christian Tischer
platy-browser-data
Commits
6aeb3f18
Commit
6aeb3f18
authored
5 years ago
by
Tuomas Mettaenen
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
441de54d
Branches
patch-1
No related tags found
1 merge request
!4
Update README.md
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+112
-1
112 additions, 1 deletion
README.md
with
112 additions
and
1 deletion
README.md
+
112
−
1
View file @
6aeb3f18
...
...
@@ -106,7 +106,118 @@ conda env create -f environment.yaml
## BigDataServer
TODO
Description: Client -> Nginx proxy tcp/80 -> Java application tcp/8020
Start or stop the application
```
systemctl start/stop/restart bigdata-0.2.0
systemctl start/stop/restart nginx
```
Monitor logs
```
tail /var/log/bigdata.log /var/log/nginx/error.log
```
- Add user
```
useradd --shell /sbin/nologin bigdata
cat /etc/passwd |grep bigdata:
bigdata:x:1000:1000::/home/bigdata:/sbin/nologin
```
- Configure Nginx (/etc/nginx/conf.d/cbb-bigdatra01.conf)
```
server {
listen 80;
server_name cbb-bigdata01.embl.de;
location /0.2.0 {
proxy_pass http://cbb-bigdata01.embl.de:8020/0.2.0;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
location /0.2.1 {
proxy_pass http://cbb-bigdata01.embl.de:8021/0.2.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
# Allow only GET, HEAD
if ($request_method !~ ^(GET|HEAD)$ )
{
return 405;
}
# Allow only requests for published applications
if ($request_uri !~ ^/0.2.0/.*|^0.2.1/.*) {return 403;}
server_tokens off;
large_client_header_buffers 4 32k;
}
```
- Copy the application to /opt/bigdata/ and set permissions
```
chown -R bigdata.bigdata /opt/bigdata/*
touch /var/log/bigdata.log
chown bigdata.bigdata /var/log/bigdata.log
```
- Create Java application startup script (/opt/bigdata/bigdata.sh)
```
#!/bin/sh
# Check that the parameter is given for the version
if [ -z "$1" ]
then
echo "No instance version supplied"
exit 1
fi
# Create the listening port from the version
port=$(echo "8" $1 |sed 's/[^0-9]//g')
# Mount the network drive if not mounted
if [ ! -f /data/s3 ]; then echo "S3 not mounted, mounting";
goofys --endpoint https://s3.embl.de --uid=1000 --gid=1000 --dir-mode=0777 --file-mode=0666 --profile embl cbb-bigdata /data;
fi
echo "Starting the server"
cd /data/platy-browser-data/data/$1/misc/
java -Xmx4G -jar /opt/bigdata/bigdataserver.jar -d /data/platy-browser-data/data/$1/misc/bdv_server.txt -s cbb-bigdata01.embl.de -p 80 -b $port -P /0.2.1 -t /var/thumb &>/var/log/bigdata.log &
```
- Create Systemd for Java application (/etc/systemd/system/bigdata-0.2.0.service)
```
[Unit]
Description=Bigdata Platy image server 0.2.0
After=network.target
[Service]
User=bigdata
Group=bigdata
Type=forking
ExecStart=/opt/bigdata/bigdata.sh 0.2.0
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
[Install]
WantedBy=multi-user.targe
```
- Enable and start the services
```
systemctl daemon-reload
systemctl enable bigdata-0.2.0
systemctl restart bigdata-0.2.0
systemctl restart nginx
```
## Data generation
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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