-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from indigo-dc/spring-boot
fix path issues + add daemon build
- Loading branch information
Showing
39 changed files
with
513 additions
and
232 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
#!/bin/bash | ||
|
||
VERSION=0.1 | ||
NAME=cdmi-server | ||
|
||
mvn clean package | ||
|
||
mkdir -p debian/usr/lib/cdmi-server | ||
cp target/cdmi-server-0.1-SNAPSHOT.jar debian/usr/lib/cdmi-server | ||
mkdir -p debian/var/lib/$NAME/config/ | ||
cp config/application.yml debian/var/lib/$NAME/config/ | ||
cp target/$NAME-$VERSION-SNAPSHOT.jar debian/var/lib/$NAME/ | ||
|
||
dpkg --build debian | ||
|
||
mv debian.deb cdmi-server-1.0.deb | ||
mv debian.deb $NAME-$VERSION.deb |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
#!/bin/bash | ||
|
||
VERSION=0.1 | ||
NAME=cdmi-server | ||
TOPDIR=`pwd`/rpm | ||
|
||
mvn clean package | ||
|
||
cp target/cdmi-server-0.1-SNAPSHOT.jar $TOPDIR/SOURCES | ||
cp target/$NAME-$VERSION-SNAPSHOT.jar $TOPDIR/SOURCES | ||
cp config/application.yml $TOPDIR/SOURCES | ||
|
||
rpmbuild --define "_topdir ${TOPDIR}" -ba $TOPDIR/SPECS/cdmi-server.spec | ||
rpmbuild --define "_topdir ${TOPDIR}" -ba $TOPDIR/SPECS/$NAME.spec | ||
|
||
cp ${TOPDIR}/RPMS/x86_64/cdmi-server-1.0-1.el7.centos.x86_64.rpm . | ||
cp ${TOPDIR}/RPMS/x86_64/cdmi-server-0.1-1.x86_64.rpm . | ||
#cp ${TOPDIR}/RPMS/x86_64/cdmi-server-1.0-1.el7.centos.x86_64.rpm . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
spring: | ||
profiles: | ||
active: filesystem | ||
|
||
server: | ||
port: 8888 | ||
|
||
rest: | ||
user: restadmin | ||
pass: restadmin | ||
--- | ||
spring: | ||
profiles: filesystem | ||
cdmi: | ||
data: | ||
baseDirectory: /tmp/cdmi | ||
objectIdPrefix: .cdmi_ | ||
qos: | ||
backend: | ||
type: dummy_filesystem |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
|
||
NAME=cdmi-server | ||
VERSION=0.1 | ||
USER=cdmi | ||
|
||
count=`egrep -c "^${USER}:" /etc/group` | ||
if [ $count -eq 0 ]; then | ||
echo "No ${USER} group found ... create group" | ||
addgroup --system $USER | ||
fi | ||
|
||
/usr/bin/id -u $USER > /dev/null 2>&1 | ||
if [ $? -eq 1 ]; then | ||
echo "No ${USER} user found .. create user" | ||
adduser --system $USER --ingroup $USER | ||
fi | ||
|
||
if [ -f /var/lib/$NAME/$NAME-$VERSION-SNAPSHOT.jar ]; then | ||
chmod +x /var/lib/$NAME/$NAME-$VERSION-SNAPSHOT.jar | ||
fi | ||
|
||
chown -R $USER:$USER /var/lib/$NAME/ | ||
|
||
if [ ! -L /etc/init.d/$NAME ]; then | ||
ln -s /var/lib/$NAME/$NAME-$VERSION-SNAPSHOT.jar /etc/init.d/$NAME | ||
fi | ||
|
||
service $NAME start | ||
update-rc.d $NAME defaults 99 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=cdmi-server | ||
After=syslog.target | ||
|
||
[Service] | ||
User=cdmi | ||
ExecStart=/var/lib/cdmi-server/cdmi-server-0.1-SNAPSHOT.jar | ||
SuccessExitStatus=143 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=cdmi-server | ||
After=syslog.target | ||
|
||
[Service] | ||
User=cdmi | ||
ExecStart=/var/lib/cdmi-server/cdmi-server-0.1-SNAPSHOT.jar | ||
SuccessExitStatus=143 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=cdmi-server | ||
After=syslog.target | ||
|
||
[Service] | ||
User=cdmi | ||
ExecStart=/var/lib/cdmi-server/cdmi-server-0.1-SNAPSHOT.jar | ||
SuccessExitStatus=143 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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
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
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
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
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
Oops, something went wrong.