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

feat: add hubble dockerfile #295

Merged
merged 8 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hugegraph-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
ls ${project.parent.basedir}/hugegraph-loader/*
ls ${project.parent.basedir}/hugegraph-tools/*

\cp -r ${project.parent.basedir}/hugegraph-hubble/hugegraph-hubble-${project.version} ${project.basedir}
\cp -r ${project.parent.basedir}/hugegraph-hubble/hugegraph-hubble ${project.basedir}
\cp -r ${project.parent.basedir}/hugegraph-loader/hugegraph-loader-${project.version} ${project.basedir}
\cp -r ${project.parent.basedir}/hugegraph-tools/hugegraph-tools-${project.version} ${project.basedir}

tar -zcvf ${project.parent.basedir}/${final.name}.tar.gz \
hugegraph-hubble-* hugegraph-loader-* hugegraph-tools-* || exit 1
hugegraph-hubble hugegraph-loader-* hugegraph-tools-* || exit 1

md5sum ${project.parent.basedir}/${final.name}.tar.gz
echo -n "hugegraph-toolchain tar.gz available at: "
Expand Down
19 changes: 19 additions & 0 deletions hugegraph-hubble/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM ubuntu:xenial

RUN set -x \
&& apt-get -q update \
&& apt-get -q install -y --no-install-recommends --no-install-suggests \
curl \
lsof \
g++ \
gcc \
openjdk-8-jdk \
&& apt-get clean

ENV HUBBLE_HOME /opt/hugegraph-hubble
WORKDIR ${HUBBLE_HOME}

ADD ./hugegraph-hubble/hugegraph-hubble $HUBBLE_HOME
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is this relative path? (seems we miss the install step?)

EXPOSE 8088

ENTRYPOINT ["./bin/start-hubble.sh"]
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
set -ev

TRAVIS_DIR=$(dirname "$0")
HUBBLE_DIR="hugegraph-hubble-*.*"
HUBBLE_DIR="hugegraph-hubble"

echo "$TRAVIS_DIR"
pwd && mvn -e -X clean package -DskipTests

cp "${TRAVIS_DIR}"/jacocoagent.jar $HUBBLE_DIR/lib || exit 1
cp "${TRAVIS_DIR}"/start-hubble.sh $HUBBLE_DIR/bin || exit 1

./hugegraph-hubble-*/bin/start-hubble.sh
${HUBBLE_DIR}/bin/start-hubble.sh
8 changes: 4 additions & 4 deletions hugegraph-hubble/hubble-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<appendAssemblyId>false</appendAssemblyId>
<outputDirectory>${top.level.dir}</outputDirectory>
<descriptor>${assembly.descriptor.dir}/assembly.xml</descriptor>
<finalName>${final.name}</finalName>
<finalName>${release.name}</finalName>
</configuration>
</execution>
</executions>
Expand All @@ -70,10 +70,10 @@
echo -e "Hubble-FE build successfully.\n"

cd ${top.level.dir} &amp;&amp; pwd
rm -rf ${final.name}/ui
cp -r ${hubble-fe.dir}/build ${final.name}/ui
rm -rf ${release.name}/ui
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the directory version information here, so that version does not need to be added to the dockerfile, which is more general

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine if test OK

cp -r ${hubble-fe.dir}/build ${release.name}/ui

tar -zcvf ${top.level.dir}/${final.name}.tar.gz ${final.name} || exit 1
tar -zcvf ${top.level.dir}/${final.name}.tar.gz ${release.name} || exit 1
echo -n "hugegraph-hubble tar.gz available at: "
echo "${top.level.dir}/${final.name}.tar.gz"
rm -f ${top.level.dir}/dist.sh
Expand Down