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

SUBMARINE-349. Support using existing artifacts to build mini-submarine image #158

Closed
wants to merge 4 commits into from

Conversation

tangzhankun
Copy link
Contributor

What is this PR for?

The hard-coded submarine version(0.3.0-SNAPSHOT) in build_mini-submarine.sh is not convenient. When doing a release, we need the image to package a candidate artifacts like 0.3.0.
This JIRA is for extending the build script to package specified artifacts. Setting environment variable submarine_version and release_candidates_path can trigger this code path.
It will copy binary tarball with the submarine_version to the local dir and build the image.

What type of PR is it?

Improvement

What is the Jira issue?

https://issues.apache.org/jira/browse/SUBMARINE-349

How should this be tested?

Put submarine candidate aritifacts to a folder like "~/releases/submarine-release"
$ ls $release_candidates_path
submarine-dist-0.3.0-hadoop-2.9.tar.gz submarine-dist-0.3.0-src.tar.gz.asc
submarine-dist-0.3.0-hadoop-2.9.tar.gz.asc submarine-dist-0.3.0-src.tar.gz.sha512
submarine-dist-0.3.0-hadoop-2.9.tar.gz.sha512 submarine-dist-0.3.0-src.tar.gz

export submarine_version=0.3.0
export release_candidates_path=~/releases/submarine-release
./build_mini-submarine.sh
docker run -it -h submarine-dev --net=bridge --privileged -P local/mini-submarine:0.3.0 /bin/bash
In the container, check the submarine jar version is 0.3.0

Questions:

  • Does the licenses files need an update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? Yes

@xunliu xunliu changed the title Support using existing artifacts to build mini-submarine image SUBMARINE-349. Support using existing artifacts to build mini-submarine image Jan 20, 2020
@@ -49,7 +49,11 @@ else
WORKER_CMD="myvenv.zip/venv/bin/python mnist_distributed.py --steps 2 --data_dir /tmp/data --working_dir /tmp/mode"
fi

SUBMARINE_VERSION=0.3.0-SNAPSHOT
SUBMARINE_VERSION=$SUBMARINE_VER
Copy link
Member

Choose a reason for hiding this comment

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

SUBMARINE_VERSION =${SUBMARINE_VER:-"0.3.0-SNAPSHOT"}
This way, So you can set default values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. Will simplify it.

hadoop_v=2.9.2
spark_v=2.4.4
submarine_v=0.3.0-SNAPSHOT

submarine_v=$submarine_version
Copy link
Member

Choose a reason for hiding this comment

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

submarine_v =${submarine_version:-"0.3.0-SNAPSHOT"}
This way, So you can set default values.

@@ -47,7 +47,11 @@ else
WORKER_CMD="myvenv.zip/venv/bin/python mnist_distributed.py --steps 2 --data_dir /tmp/data --working_dir /tmp/mode"
fi

SUBMARINE_VERSION=0.3.0-SNAPSHOT
SUBMARINE_VERSION=$SUBMARINE_VER
Copy link
Member

Choose a reason for hiding this comment

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

SUBMARINE_VERSION =${SUBMARINE_VER:-"0.3.0-SNAPSHOT"}
This way, So you can set default values.

@@ -17,8 +17,10 @@

# Below are configurable variables, please adapt base on your local environment.
# Version of submarine jar
SUBMARINE_VERSION=0.3.0-SNAPSHOT

SUBMARINE_VERSION=$SUBMARINE_VER
Copy link
Member

Choose a reason for hiding this comment

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

SUBMARINE_VERSION =${SUBMARINE_VER:-"0.3.0-SNAPSHOT"}
This way, So you can set default values.

@@ -52,6 +52,26 @@ mvn clean install package -DskipTests
cd submarine/dev-support/mini-submarine/
./build_mini-submarine.sh
```
#### Package An Existing Release Candidates
When doing release, the release manager might needs to package a artifact candidatesin this docker image and public the image candidate for a vote.
Copy link
Member

Choose a reason for hiding this comment

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

candidatesin should be candidates in

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching this.

@yuanzac
Copy link
Contributor

yuanzac commented Jan 22, 2020

@tangzhankun
Thanks for the contributions.
@liuxunorg, @pingsutw
Thanks for the review

@asfgit asfgit closed this in 15d5c91 Jan 22, 2020
@tangzhankun tangzhankun deleted the submarine-349 branch January 22, 2020 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants