You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by nw...@apache.org on 2018/12/20 01:03:04 UTC
[incubator-heron] branch master updated: Fix docker rc and scripts
for building heron (#3130)
This is an automated email from the ASF dual-hosted git repository.
nwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git
The following commit(s) were added to refs/heads/master by this push:
new b869041 Fix docker rc and scripts for building heron (#3130)
b869041 is described below
commit b869041a6f2df0d72624ef8bba2d02feac389533
Author: Ning Wang <nw...@twitter.com>
AuthorDate: Wed Dec 19 17:02:59 2018 -0800
Fix docker rc and scripts for building heron (#3130)
---
docker/Readme.md | 1 +
docker/scripts/build-exec-docker.sh | 2 +-
docker/scripts/compile-platform.sh | 1 +
tools/docker/bazel.rc | 8 ++++++++
website/content/docs/operators/deployment/schedulers/dcos.md | 2 +-
5 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/docker/Readme.md b/docker/Readme.md
index a9c0220..1585708 100644
--- a/docker/Readme.md
+++ b/docker/Readme.md
@@ -1,6 +1,7 @@
# Docker
## To compile source, into Heron release artifacts, using a docker container:
+Make sure enough resources are configured in Docker settings: 2 CPU, 4G RAM and 128G disk.
```
./docker/scripts/build-artifacts.sh <platform> <version_string> [source-tarball] <output-directory>
# e.g. ./docker/scripts/build-artifacts.sh ubuntu14.04 testbuild ~/heron-release
diff --git a/docker/scripts/build-exec-docker.sh b/docker/scripts/build-exec-docker.sh
index f9842bb..88d615a 100755
--- a/docker/scripts/build-exec-docker.sh
+++ b/docker/scripts/build-exec-docker.sh
@@ -49,7 +49,7 @@ build_exec_image() {
HERON_VERSION=$2
OUTPUT_DIRECTORY=$(realpath $3)
- DOCKER_FILE="$SCRATCH_DIR/Dockerfile.dist.$TARGET_PLATFORM"
+ DOCKER_FILE="$SCRATCH_DIR/dist/Dockerfile.dist.$TARGET_PLATFORM"
DOCKER_TAG="heron:$HERON_VERSION-$TARGET_PLATFORM"
setup_scratch_dir $SCRATCH_DIR
diff --git a/docker/scripts/compile-platform.sh b/docker/scripts/compile-platform.sh
index 384a9df..69dd36f 100755
--- a/docker/scripts/compile-platform.sh
+++ b/docker/scripts/compile-platform.sh
@@ -57,6 +57,7 @@ else
exit 1
fi
+bazel version
./bazel_configure.py
bazel clean
diff --git a/tools/docker/bazel.rc b/tools/docker/bazel.rc
index b0a7069..f6bb4ea 100644
--- a/tools/docker/bazel.rc
+++ b/tools/docker/bazel.rc
@@ -24,3 +24,11 @@ build --verbose_failures
# fails to run tests.
build --spawn_strategy=standalone --genrule_strategy=standalone
test --test_strategy=standalone
+
+# Workaround https://github.com/bazelbuild/bazel/issues/3645
+# Bazel doesn't calculate the memory ceiling correctly when running under Docker.
+# Limit Bazel to consuming 4G ram and 2 cores.
+build --local_resources=4096,2.0,1.0
+
+# Echo all the configuration settings and their source
+ build --announce_rc
\ No newline at end of file
diff --git a/website/content/docs/operators/deployment/schedulers/dcos.md b/website/content/docs/operators/deployment/schedulers/dcos.md
index a380574..f63c492 100644
--- a/website/content/docs/operators/deployment/schedulers/dcos.md
+++ b/website/content/docs/operators/deployment/schedulers/dcos.md
@@ -78,7 +78,7 @@ bucket).
* `heron.executor.docker.image` --- Specified the Docker image to be used for running the executor.
For the time being, a public image has been made available at `ndustrialio/heron-executor:jre8`.
However, you can create your own version of this Docker image by creating a Docker image with
-the Dockerfile provided at `heron/docker/Dockerfile.dist.ubuntu14.04` and pushing it to your own
+the Dockerfile provided at `heron/docker/dist/Dockerfile.dist.ubuntu14.04` and pushing it to your own
publicly-available Docker repository.
### Example Marathon Scheduler Configuration