Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump junit from 4.12 to 4.13.1 in /backend #174

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -25,7 +25,7 @@ pom.xml
-- frontend
-- pom.xml
```
#MVN command
## MVN command

```shell script
To clean:
Expand Down Expand Up @@ -198,7 +198,7 @@ Info: So far only filtered data is pushed into the database.
}
}
```
##Region Import
## Region Import
Region is imported by parsing Folder path of ride or profile file.
Its important to keep Rides and Profiles under City name.

Expand Down
135 changes: 135 additions & 0 deletions alternative_install.sh
@@ -0,0 +1,135 @@
#!/bin/bash
set -e

#get info from user
echo Please enter server name, ex: yourserver.com:
read servername
echo Please specify the directory to be monitored by the importer:
read monitorpath
echo Please specify the directory for the pbf files:
read pbffiles
echo Please specify the logging directory:
read loggingdir
echo Please specify the user you want to run the java applications on:
read javauser

#add required repositories
sudo apt-get install software-properties-common
sudo apt-add-repository universe
sudo apt update

#install nginx
sudo apt install nginx -y

#install java + maven
sudo apt-get install default-jre -y
sudo apt-get install default-jdk -y
sudo apt install maven -y

#install nodejs
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs

#install mongodb
. /etc/lsb-release
sudo apt-get install gnupg -y
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
if [ "$DISTRIB_CODENAME" = "xenial" ]
then
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
else
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
fi
sudo apt update
sudo apt install mongodb-org -y
sudo systemctl daemon-reload
sudo systemctl start mongod

#install git
sudo apt install git -y

#clone repository
git clone https://github.com/simra-project/SimRa-Visualization.git
cd SimRa-Visualization

#update configuration of CSV importer
sudo cat <<EOT >> backend/csvimporter/src/main/resources/application.properties
csv.monitor.path=$monitorpath
pbf.path=$pbffiles
logging.file.name=$loggingdir/csvimporter.log
EOT

#compile jars
sudo mvn clean install -DskipTests

#import dump
mongorestore

#compile frontend
cd frontend
npm install
npm run build
cd ..

#configure and start frontend
sudo sed -i 's/# server_names_hash_bucket_size 64;/server_names_hash_bucket_size 256;/g' /etc/nginx/nginx.conf
sudo cat <<EOT > ./simra.conf
server {
listen 80;
server_name $servername;

# Tell Nginx where your app's 'public' directory is
root `pwd`/frontend/dist;

location / {
try_files \$uri \$uri/ /index.html;
}
}
EOT
sudo mv ./simra.conf /etc/nginx/sites-enabled/simra.conf
sudo service nginx restart

#configure and start interface
sudo cat <<EOT > ./simra_api.service
[Unit]
Description=Simra Springboot API
After=syslog.target
After=network.target

[Service]
ExecStart=/usr/bin/java -jar `pwd`/backend/SimRa-Visualization-API/target/SimRa-Visualization-API-1.0-SNAPSHOT.jar
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=simra_api
User=$javauser
Type=simple

[Install]
WantedBy=multi-user.target
EOT
sudo mv ./simra_api.service /etc/systemd/system/simra_api.service
sudo systemctl start simra_api

#configure and start backend

sudo cat <<EOT > ./simra_backend.service
[Unit]
Description=Simra Springboot API
After=syslog.target
After=network.target

[Service]
ExecStart=/usr/bin/java -jar `pwd`/backend/csvimporter/target/csvimporter-0.0.1-SNAPSHOT.jar
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=simra_backend
User=$javauser
Type=simple

[Install]
WantedBy=multi-user.target
EOT
sudo mv ./simra_backend.service /etc/systemd/system/simra_backend.service
sudo systemctl start simra_backend
19 changes: 10 additions & 9 deletions backend/SimRa-Visualization-API/pom.xml
Expand Up @@ -121,7 +121,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -152,16 +152,17 @@
</repository>
<repository>
<id>osgeo</id>
<name>Open Source Geospatial Foundation Repository</name>
<url>http://download.osgeo.org/webdav/geotools/</url>
<name>OSGeo Release Repository</name>
<url>https://repo.osgeo.org/repository/release/</url>
<snapshots><enabled>false</enabled></snapshots>
<releases><enabled>true</enabled></releases>
</repository>
<repository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>boundless</id>
<name>Boundless Maven Repository</name>
<url>http://repo.boundlessgeo.com/main</url>
<id>osgeo-snapshot</id>
<name>OSGeo Snapshot Repository</name>
<url>https://repo.osgeo.org/repository/snapshot/</url>
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>false</enabled></releases>
</repository>
</repositories>

Expand Down
2 changes: 1 addition & 1 deletion backend/pom.xml
Expand Up @@ -30,7 +30,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Expand Up @@ -5,7 +5,7 @@ set -e
echo Please enter server name, ex: yourserver.com:
read servername
echo Please specify the directory to be monitored by the importer:
read monitordir
read monitorpath
echo Please specify the directory for the pbf files:
read pbffiles
echo Please specify the logging directory:
Expand Down