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

Issue159 #268

Closed
Closed
Show file tree
Hide file tree
Changes from all 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
20 changes: 11 additions & 9 deletions change-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ if [ ! -z ${OVER+x} ]; then
wget https://github.com/radanalyticsio/oshinko-cli/releases/download/${OVER}/oshinko_${OVER}_linux_amd64.tar.gz -O /tmp/oshinko_${OVER}_linux_amd64.tar.gz
if [ "$?" -eq 0 ]; then
sum=$(md5sum /tmp/oshinko_${OVER}_linux_amd64.tar.gz | cut -d ' ' -f 1)
# Mac OSX
if [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
# Fix the url references
gsed -i "s@https://github.com/radanalyticsio/oshinko-cli/releases/download/.*@https://github.com/radanalyticsio/oshinko-cli/releases/download/${OVER}/oshinko_${OVER}_linux_amd64.tar.gz@" image.*.yaml
# Fix the md5sum on the line following the url
Expand All @@ -69,26 +69,28 @@ fi

# Change spark distro
if [ ! -z ${SPARK+x} ]; then

# Change the md5sum for pyspark and java, update base image for scala
wget https://archive.apache.org/dist/spark/spark-${SPARK}/spark-${SPARK}-bin-hadoop${HVER}.tgz.md5 -O /tmp/spark-${SPARK}-bin-hadoop${HVER}.tgz.md5
if [ "$?" -eq 0 ]; then
sum=$(cat /tmp/spark-${SPARK}-bin-hadoop2.7.tgz.md5 | cut -d':' -f 2 | tr -d '[:space:]' | tr '[:upper:]' '[:lower:]')
# Mac OSX
if [[ "$OSTYPE" == "darwin"* ]]; then
# Fix the url references
gsed -i "s@https://archive.apache.org/dist/spark/spark-.*/spark-.*-bin-@https://archive.apache.org/dist/spark/spark-${SPARK}/spark-${SPARK}-bin-@" image.*.yaml
# Fix the md5 sum references on the line following the url
# Mac OSX
# Fix the url references
gsed -i "s@https://archive.apache.org/dist/spark/spark-.*/spark-.*-bin-@https://archive.apache.org/dist/spark/spark-${SPARK}/spark-${SPARK}-bin-@" image.*.yaml
# Fix the md5 sum references on the line following the url
gsed -i '\@url: https://archive.apache.org/dist/spark/@!b;n;s/md5.*/md5: '$sum'/' image.*.yaml
else
# Fix the url references
sed -i "s@https://archive.apache.org/dist/spark/spark-.*/spark-.*-bin-@https://archive.apache.org/dist/spark/spark-${SPARK}/spark-${SPARK}-bin-@" image.*.yaml
# Fix the md5 sum references on the line following the url
sed -i '\@url: https://archive.apache.org/dist/spark/@!b;n;s/md5.*/md5: '$sum'/' image.*.yaml
# Fix the url references
sed -i "s@https://archive.apache.org/dist/spark/spark-.*/spark-.*-bin-@https://archive.apache.org/dist/spark/spark-${SPARK}/spark-${SPARK}-bin-@" image.*.yaml
# Fix the md5 sum references on the line following the url
sed -i '\@url: https://archive.apache.org/dist/spark/@!b;n;s/md5.*/md5: '$sum'/' image.*.yaml
fi
else
echo "Failed to get the md5 sum for the specified spark version, the version $SPARK may not be a real version"
exit 1
fi
fi

# Add any changes for commit
git add image.*.yaml
2 changes: 1 addition & 1 deletion java-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ USER 185

ENTRYPOINT ["/opt/app-root/etc/bootstrap.sh"]

CMD ["/usr/local/s2i/usage"]
CMD java -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -jar java-container.jar ["/usr/local/s2i/usage"]