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
echo "Current directory $(pwd)" echo "Current directory $(pwd)"
echo echo
run rm -rf "ozone" run rm -rf "ozone-${HDDS_VERSION}"
run mkdir "ozone" run mkdir "ozone-${HDDS_VERSION}"
run cd "ozone" run cd "ozone-${HDDS_VERSION}"
run cp -p "${ROOT}/LICENSE.txt" . run cp -p "${ROOT}/LICENSE.txt" .
run cp -p "${ROOT}/NOTICE.txt" . run cp -p "${ROOT}/NOTICE.txt" .
run cp -p "${ROOT}/README.txt" . run cp -p "${ROOT}/README.txt" .

View File

@ -36,13 +36,8 @@ function run()
fi fi
} }
#To make the final dist directory easily mountable from docker we don't use run tar -c -f "ozone-${VERSION}.tar" "ozone-${VERSION}"
#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 gzip -f "ozone-${VERSION}.tar" run gzip -f "ozone-${VERSION}.tar"
echo echo
echo "Ozone dist tar available at: ${BASEDIR}/ozone-${VERSION}.tar.gz" echo "Ozone dist tar available at: ${BASEDIR}/ozone-${VERSION}.tar.gz"
echo echo

View File

@ -15,4 +15,4 @@
# limitations under the License. # limitations under the License.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 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="$( 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 #Dir to save the results
TARGETDIR="$DIR/../../target/dnd" 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 #Name and imagename of the temporary, dind based test containers
DOCKER_IMAGE_NAME=ozoneacceptance DOCKER_IMAGE_NAME=ozoneacceptance
DOCKER_INSTANCE_NAME="${DOCKER_INSTANCE_NAME:-ozoneacceptance}" DOCKER_INSTANCE_NAME="${DOCKER_INSTANCE_NAME:-ozoneacceptance}"
@ -47,10 +41,10 @@ chmod o+w "$OZONEDIST" || true
rm "$TARGETDIR/docker-compose.log" rm "$TARGETDIR/docker-compose.log"
docker rm "$DOCKER_INSTANCE_NAME" || true 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 #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 sleep 5
#Starting the tests #Starting the tests

View File

@ -18,7 +18,7 @@ set -x
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ ! "$(which robot)" ] ; then if [ ! "$(command -v robot)" ] ; then
echo "" echo ""
echo "robot is not on your PATH." echo "robot is not on your PATH."
echo "" echo ""
@ -28,10 +28,11 @@ if [ ! "$(which robot)" ] ; then
exit -1 exit -1
fi 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 if [ ! -d "$OZONEDISTDIR" ]; then
echo "Ozone can't be found in the $OZONEDISTDIR." echo "Ozone can't be found in the $OZONEDISTDIR."
echo "You may need a full build with -Phdds and -Pdist profiles" echo "You may need a full build with -Phdds and -Pdist profiles"
exit -1 exit -1
fi 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> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.apache.hadoop</groupId> <groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-project</artifactId> <artifactId>hadoop-ozone</artifactId>
<version>3.2.0-SNAPSHOT</version> <version>0.2.1-SNAPSHOT</version>
<relativePath>../../hadoop-project</relativePath>
</parent> </parent>
<artifactId>hadoop-ozone-acceptance-test</artifactId> <artifactId>hadoop-ozone-acceptance-test</artifactId>
<version>3.2.0-SNAPSHOT</version> <version>3.2.0-SNAPSHOT</version>
@ -45,7 +44,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<configuration> <configuration>
<testCasesDirectory>src/test/acceptance</testCasesDirectory> <testCasesDirectory>src/test/acceptance</testCasesDirectory>
<variables> <variables>
<variable>basedir:${project.basedir}/../..</variable> <variable>OZONEDIR:${project.basedir}/../../hadoop-dist/target/ozone-${ozone.version}</variable>
</variables> </variables>
<skip>false</skip> <skip>false</skip>
<skipTests>false</skipTests> <skipTests>false</skipTests>

View File

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

View File

@ -71,7 +71,7 @@ Execute on
Run docker compose Run docker compose
[arguments] ${command} [arguments] ${command}
Set Environment Variable COMPOSE_INTERACTIVE_NO_CLI 1 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} ${rc} ${output} = Run And Return Rc And Output docker-compose -f ${COMPOSEFILE} ${command}
Log ${output} Log ${output}
Should Be Equal As Integers ${rc} 0 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> <packaging>jar</packaging>
<properties> <properties>
<ozone.version>0.2.1-SNAPSHOT</ozone.version>
<ozone.release>Acadia</ozone.release>
<hadoop.component>ozone</hadoop.component> <hadoop.component>ozone</hadoop.component>
<is.hadoop.component>true</is.hadoop.component> <is.hadoop.component>true</is.hadoop.component>
<declared.ozone.version>${ozone.version}</declared.ozone.version>
</properties> </properties>
<dependencies> <dependencies>
@ -120,4 +117,4 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -80,8 +80,9 @@ on the machine.
Go to the directory where the docker compose files exist and tell 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 `docker-compose` to start Ozone. This will start SCM, OM and a single datanode
in the background. in the background.
``` ```
cd hadoop-dist/target/ozone/compose/ozone cd hadoop-dist/target/ozone-*/compose/ozone
docker-compose up -d 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> <name>Apache Hadoop Ozone</name>
<packaging>pom</packaging> <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> <modules>
<module>common</module> <module>common</module>
<module>client</module> <module>client</module>