mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
nb5 AppImage skel updates
This commit is contained in:
parent
5915a05f0b
commit
c7e4695492
1
nb5/.gitignore
vendored
Normal file
1
nb5/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
cache/**
|
12
nb5/appimage/skel/nb5.desktop
Normal file
12
nb5/appimage/skel/nb5.desktop
Normal file
@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Name=nosqlbench5
|
||||
Exec=nb5 %F
|
||||
Icon=nb5
|
||||
Type=Application
|
||||
Categories=Development;Network;Utility;Science;
|
||||
Comment=nosqlbench5
|
||||
MimeType=text/yaml;application/yaml;
|
||||
Name[nb]=nb5
|
||||
Terminal=false
|
||||
StartupNotify=true
|
||||
NoDisplay=false
|
BIN
nb5/appimage/skel/nb5.png
Normal file
BIN
nb5/appimage/skel/nb5.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
51
nb5/appimage/skel/usr/bin/nb5
Executable file
51
nb5/appimage/skel/usr/bin/nb5
Executable file
@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022 nosqlbench
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
#set -x
|
||||
DIR="$(dirname "$(readlink -f "$0")")"
|
||||
if [ "$1" = "--wrapper-help" ]
|
||||
then
|
||||
echo "OPTIONS:"
|
||||
echo " # run the bundled JRE with -version"
|
||||
echo " --java-version"
|
||||
echo " # run the app with JDWP debugging support, with suspend=n"
|
||||
echo " --DN"
|
||||
echo " # run the app with JDWP debugging support, with suspend=y"
|
||||
echo " --DY"
|
||||
echo " # set additional JRE options ..."
|
||||
echo " JAVA_OPTS=... $0 ..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "--java-version" ]
|
||||
then
|
||||
shift
|
||||
$DIR/jre/bin/java -version
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" = "-DN" ]
|
||||
then
|
||||
shift
|
||||
exec $DIR/jre/bin/java -Dnashorn.args="--no-deprecation-warning" ${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar $DIR/nb5.jar "$@"
|
||||
elif [ "$1" = "-DY" ]
|
||||
then
|
||||
shift
|
||||
exec $DIR/jre/bin/java -Dnashorn.args="--no-deprecation-warning" ${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005 -jar $DIR/nb5.jar "$@"
|
||||
else
|
||||
exec $DIR/jre/bin/java -Dnashorn.args="--no-deprecation-warning" ${JAVA_OPTS} -jar $DIR/nb5.jar "$@"
|
||||
fi
|
42
nb5/assembly.xml
Normal file
42
nb5/assembly.xml
Normal file
@ -0,0 +1,42 @@
|
||||
<!--
|
||||
~ Copyright (c) 2022 nosqlbench
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/xsd/assembly-2.0.0.xsd">
|
||||
|
||||
<id>jar-with-dependencies</id>
|
||||
<formats>
|
||||
<format>jar</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<useProjectArtifact>true</useProjectArtifact>
|
||||
<unpack>true</unpack>
|
||||
<scope>runtime</scope>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
|
||||
<containerDescriptorHandlers>
|
||||
<containerDescriptorHandler>
|
||||
<handlerName>metaInf-services</handlerName>
|
||||
</containerDescriptorHandler>
|
||||
</containerDescriptorHandlers>
|
||||
|
||||
</assembly>
|
86
nb5/build-bin.sh
Executable file
86
nb5/build-bin.sh
Executable file
@ -0,0 +1,86 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# Copyright (c) 2022 nosqlbench
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
APPDIR=target/NB.AppDir
|
||||
JAR_NAME="nb5.jar"
|
||||
BIN_NAME="nb5"
|
||||
JAVA_VERSION="17"
|
||||
|
||||
|
||||
mkdir -p ${APPDIR}
|
||||
|
||||
|
||||
if [ ! -f target/${JAR_NAME} ]
|
||||
then
|
||||
printf "target/${JAR_NAME} does not exist"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
rsync -av appimage/skel/ "${APPDIR}/"
|
||||
cp target/${JAR_NAME} "${APPDIR}/usr/bin/${JAR_NAME}"
|
||||
|
||||
mkdir -p "${APPDIR}/usr/bin/jre"
|
||||
|
||||
if [ "$JAVA_VERSION" == "17" ]
|
||||
then
|
||||
if [ ! -d "cache/jdk17" ] ; then
|
||||
printf "getting jdk17 once into cache/jdk17\n";
|
||||
mkdir -p cache
|
||||
(cd cache && (
|
||||
wget -c https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.1%2B12/OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz
|
||||
tar -xf OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz
|
||||
mv jdk-17.0.1+12 jdk17
|
||||
rm OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz
|
||||
))
|
||||
fi
|
||||
rsync -av cache/jdk17/ "${APPDIR}/usr/bin/jre/"
|
||||
else
|
||||
printf "Unknown java version indicated in $0"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ ! -f "${APPDIR}/AppRun" ]
|
||||
then
|
||||
( cd ${APPDIR} && (
|
||||
printf "Linking AppRun...\n";
|
||||
ln -s usr/bin/${BIN_NAME} AppRun
|
||||
))
|
||||
fi
|
||||
|
||||
printf "getting appimage tool and building image...\n";
|
||||
|
||||
( cd target && (
|
||||
if [ ! -x "appimagetool-x86_64.AppImage" ]
|
||||
then
|
||||
wget -c https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage
|
||||
chmod +x appimagetool-x86_64.AppImage
|
||||
fi
|
||||
|
||||
ARCH=x86_64 ./appimagetool-x86_64.AppImage NB.AppDir ${BIN_NAME}
|
||||
# && chmod +x ${BIN_NAME}
|
||||
)
|
||||
)
|
||||
|
||||
if [ -x "target/${BIN_NAME}" ]
|
||||
then
|
||||
printf "nosqlbench AppImage binary was built at target/${BIN_NAME}\n";
|
||||
fi
|
||||
|
53
nb5/nb-scripts/link-jar-name.sh
Executable file
53
nb5/nb-scripts/link-jar-name.sh
Executable file
@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022 nosqlbench
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
NBJAR_VERSION=${NBJAR_VERSION:?NBJAR_VERSION must be specified}
|
||||
JAR_NAME="nb5.jar"
|
||||
BIN_NAME="nb5"
|
||||
|
||||
echo "NBJAR_VERSION: ${NBJAR_VERSION}"
|
||||
echo "NBJAR_NAME: ${JAR_NAME}"
|
||||
|
||||
|
||||
cd target
|
||||
if [ -e "${JAR_NAME}" ]
|
||||
then
|
||||
echo "${JAR_NAME} link exists, skipping"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for qualifier in jar-with-dependencies
|
||||
do
|
||||
FULL_JAR_NAME="${BIN_NAME}-${NBJAR_VERSION}-${qualifier}.jar"
|
||||
if [ -e "$FULL_JAR_NAME" ]
|
||||
then
|
||||
echo "linking $FULL_JAR_NAME to ${BIN_NAME}.jar"
|
||||
ln -s $FULL_JAR_NAME $JAR_NAME
|
||||
echo "linked $FULL_JAR_NAME to $JAR_NAME, exiting"
|
||||
exit 0
|
||||
else
|
||||
echo "$FULL_JAR_NAME does not exist, skipping"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
echo "Unable to find any jar to link to ${JAR_NAME} name.."
|
||||
exit 2
|
||||
|
211
nb5/pom.xml
Normal file
211
nb5/pom.xml
Normal file
@ -0,0 +1,211 @@
|
||||
<!--
|
||||
~ Copyright (c) 2022 nosqlbench
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
<parent>
|
||||
<artifactId>mvn-defaults</artifactId>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<version>4.17.15-SNAPSHOT</version>
|
||||
<relativePath>../mvn-defaults</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>nb5</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>${project.artifactId}</name>
|
||||
<description>A binary and jar for nb5, with only nb5 updated drivers included.</description>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<javadoc.name>nosqlbench Command Line</javadoc.name>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>nbr</artifactId>
|
||||
<version>4.17.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Everything below this line is in common between nb and nb5 -->
|
||||
<!-- The nb5 modules should contain NO driver-* modules, and all adapter-* modules -->
|
||||
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>adapter-stdout</artifactId>
|
||||
<version>4.17.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>adapter-diag</artifactId>
|
||||
<version>4.17.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>adapter-dynamodb</artifactId>
|
||||
<version>4.17.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>adapter-cqld4</artifactId>
|
||||
<version>4.17.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>assembly.xml</descriptor>
|
||||
</descriptors>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>io.nosqlbench.engine.cli.NBCLI</mainClass>
|
||||
</manifest>
|
||||
<manifestEntries>
|
||||
<Multi-Release>true</Multi-Release>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>assemble-nb</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>link-nb-jar-name</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<environmentVariables>
|
||||
<NBJAR_VERSION>${project.version}</NBJAR_VERSION>
|
||||
</environmentVariables>
|
||||
<basedir>${project.basedir}</basedir>
|
||||
<executable>${project.basedir}/nb-scripts/link-jar-name.sh</executable>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>with-mongodb</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>driver-mongodb</artifactId>
|
||||
<version>4.17.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>build-nb5-appimage</id>
|
||||
<activation>
|
||||
<os>
|
||||
<family>unix</family>
|
||||
<name>linux</name>
|
||||
<arch>amd64</arch>
|
||||
</os>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-nb5-appimage</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<basedir>${project.basedir}</basedir>
|
||||
<executable>${project.basedir}/build-bin.sh</executable>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>enforce</id>
|
||||
<activation>
|
||||
<activeByDefault>false</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<configuration>
|
||||
<rules>
|
||||
<dependencyConvergence />
|
||||
</rules>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
|
||||
</profiles>
|
||||
|
||||
|
||||
</project>
|
Loading…
Reference in New Issue
Block a user