HDDS-280. Support ozone dist-start-stitching on openbsd/osx. Contributed by Elek, Marton.

This commit is contained in:
Mukul Kumar Singh 2018-08-30 02:21:24 +05:30
parent 73625168c0
commit 692736f7cf
11 changed files with 24 additions and 33 deletions

View File

@ -117,9 +117,9 @@ ROOT=$(cd "${BASEDIR}"/../..;pwd)
echo
echo "Current directory $(pwd)"
echo
run rm -rf "ozone"
run mkdir "ozone"
run cd "ozone"
run rm -rf "ozone-${HDDS_VERSION}"
run mkdir "ozone-${HDDS_VERSION}"
run cd "ozone-${HDDS_VERSION}"
run cp -p "${ROOT}/LICENSE.txt" .
run cp -p "${ROOT}/NOTICE.txt" .
run cp -p "${ROOT}/README.txt" .

View File

@ -36,12 +36,7 @@ function run()
fi
}
#To make the final dist directory easily mountable from docker we don't use
#version name in the directory name.
#To include the version name in the root directory of the tar file
# we create a symbolic link and dereference it during the tar creation
ln -s -f ozone ozone-${VERSION}
run tar -c --dereference -f "ozone-${VERSION}.tar" "ozone-${VERSION}"
run tar -c -f "ozone-${VERSION}.tar" "ozone-${VERSION}"
run gzip -f "ozone-${VERSION}.tar"
echo
echo "Ozone dist tar available at: ${BASEDIR}/ozone-${VERSION}.tar.gz"

View File

@ -15,4 +15,4 @@
# limitations under the License.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
$DIR/robot.sh $DIR/../../src/test/acceptance
"$DIR/robot.sh" "$DIR/../../src/test/acceptance"

View File

@ -18,15 +18,9 @@ set -x
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#Dir od the definition of the dind based test exeucution container
DOCKERDIR="$DIR/../docker"
#Dir to save the results
TARGETDIR="$DIR/../../target/dnd"
#Dir to mount the distribution from
OZONEDIST="$DIR/../../../../hadoop-dist/target/ozone"
#Name and imagename of the temporary, dind based test containers
DOCKER_IMAGE_NAME=ozoneacceptance
DOCKER_INSTANCE_NAME="${DOCKER_INSTANCE_NAME:-ozoneacceptance}"
@ -47,10 +41,10 @@ chmod o+w "$OZONEDIST" || true
rm "$TARGETDIR/docker-compose.log"
docker rm "$DOCKER_INSTANCE_NAME" || true
docker build -t "$DOCKER_IMAGE_NAME" $DIR/../docker
docker build -t "$DOCKER_IMAGE_NAME" "$DIR/../docker"
#Starting the dind based environment
docker run --rm -v $DIR/../../../..:/opt/hadoop --privileged -d --name "$DOCKER_INSTANCE_NAME" $DOCKER_IMAGE_NAME
docker run --rm -v "$DIR/../../../..:/opt/hadoop" --privileged -d --name "$DOCKER_INSTANCE_NAME" $DOCKER_IMAGE_NAME
sleep 5
#Starting the tests

View File

@ -18,7 +18,7 @@ set -x
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ ! "$(which robot)" ] ; then
if [ ! "$(command -v robot)" ] ; then
echo ""
echo "robot is not on your PATH."
echo ""
@ -28,10 +28,11 @@ if [ ! "$(which robot)" ] ; then
exit -1
fi
OZONEDISTDIR="$DIR/../../../../hadoop-dist/target/ozone"
MARKERFILE=$(find "$DIR/../../../../hadoop-dist/target" -name hadoop-ozone.sh)
OZONEDISTDIR="$(dirname "$(dirname "$(dirname "$MARKERFILE")")")"
if [ ! -d "$OZONEDISTDIR" ]; then
echo "Ozone can't be found in the $OZONEDISTDIR."
echo "You may need a full build with -Phdds and -Pdist profiles"
exit -1
fi
robot -x junit-results.xml "$@"
robot --variable "OZONEDIR:$OZONEDISTDIR" -x junit-results.xml "$@"

View File

@ -19,9 +19,8 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-project</artifactId>
<version>3.2.0-SNAPSHOT</version>
<relativePath>../../hadoop-project</relativePath>
<artifactId>hadoop-ozone</artifactId>
<version>0.2.1-SNAPSHOT</version>
</parent>
<artifactId>hadoop-ozone-acceptance-test</artifactId>
<version>3.2.0-SNAPSHOT</version>
@ -45,7 +44,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<configuration>
<testCasesDirectory>src/test/acceptance</testCasesDirectory>
<variables>
<variable>basedir:${project.basedir}/../..</variable>
<variable>OZONEDIR:${project.basedir}/../../hadoop-dist/target/ozone-${ozone.version}</variable>
</variables>
<skip>false</skip>
<skipTests>false</skipTests>

View File

@ -22,7 +22,6 @@ Resource ../commonlib.robot
Test Timeout 2 minute
*** Variables ***
${basedir}
${COMPOSEFILE} ${CURDIR}/docker-compose.yaml
${PROJECTDIR} ${CURDIR}/../../../../../..

View File

@ -71,7 +71,7 @@ Execute on
Run docker compose
[arguments] ${command}
Set Environment Variable COMPOSE_INTERACTIVE_NO_CLI 1
Set Environment Variable OZONEDIR ${PROJECTDIR}/hadoop-dist/target/ozone
Set Environment Variable OZONEDIR ${OZONEDIR}
${rc} ${output} = Run And Return Rc And Output docker-compose -f ${COMPOSEFILE} ${command}
Log ${output}
Should Be Equal As Integers ${rc} 0

View File

@ -29,11 +29,8 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<packaging>jar</packaging>
<properties>
<ozone.version>0.2.1-SNAPSHOT</ozone.version>
<ozone.release>Acadia</ozone.release>
<hadoop.component>ozone</hadoop.component>
<is.hadoop.component>true</is.hadoop.component>
<declared.ozone.version>${ozone.version}</declared.ozone.version>
</properties>
<dependencies>

View File

@ -80,8 +80,9 @@ on the machine.
Go to the directory where the docker compose files exist and tell
`docker-compose` to start Ozone. This will start SCM, OM and a single datanode
in the background.
```
cd hadoop-dist/target/ozone/compose/ozone
cd hadoop-dist/target/ozone-*/compose/ozone
docker-compose up -d
```

View File

@ -29,6 +29,11 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<name>Apache Hadoop Ozone</name>
<packaging>pom</packaging>
<properties>
<ozone.version>0.2.1-SNAPSHOT</ozone.version>
<ozone.release>Acadia</ozone.release>
<declared.ozone.version>${ozone.version}</declared.ozone.version>
</properties>
<modules>
<module>common</module>
<module>client</module>