Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Commit 98a084a

Browse files
authored
Add documents for setting up a docker based development environment (#3475)
1 parent a6ec96e commit 98a084a

File tree

4 files changed

+45
-11
lines changed

4 files changed

+45
-11
lines changed

website2/docs/compiling-docker.md

+35-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ For developing Heron, you will need to compile it for the environment that you
2424
want to use it in. If you'd like to use Docker to create that build environment,
2525
Heron provides a convenient script to make that process easier.
2626

27-
Currently, only Ubuntu 14.04, Ubuntu 15.10, and CentOS 7 are supported, but if you
27+
Currently, only Ubuntu 14.04, Ubuntu 18.04, and CentOS 7 are supported, but if you
2828
need another platform there are instructions for adding new ones
2929
[below](#contributing-new-environments).
3030

@@ -60,7 +60,7 @@ Running the script by itself will display usage information:
6060
```
6161
Usage: docker/build-artifacts.sh <platform> <version_string> [source-tarball] <output-directory>
6262
63-
Platforms Supported: darwin, ubuntu14.04, ubuntu15.10, centos7
63+
Platforms Supported: darwin, ubuntu14.04, ubuntu18.04, centos7
6464
6565
Example:
6666
./build-artifacts.sh ubuntu14.04 0.12.0 .
@@ -113,6 +113,39 @@ heron-layer-0.12.0-ubuntu14.04.tar
113113
heron-tools-0.12.0-ubuntu14.04.tar.gz
114114
```
115115

116+
## Set Up A Docker Based Development Environment
117+
118+
In case you want to have a development environment instead of making a full build,
119+
Heron provides two helper scripts for you. It could be convenient if you don't want
120+
to set up all the libraries and tools on your machine directly.
121+
122+
The following commands are to create a new docker image with a development environment
123+
and start the container based on it:
124+
```bash
125+
$ cd /path/to/heron/repo
126+
$ docker/scripts/dev-env-create.sh heron-dev
127+
```
128+
129+
After the commands, a new docker container is started with all the libraries and tools
130+
installed. The operation system is Ubuntu 18.04 by default. Now you can build Heron
131+
like:
132+
```bash
133+
\# bazel build --config=ubuntu scripts/packages:binpkgs
134+
\# bazel build --config=ubuntu scripts/packages:tarpkgs
135+
```
136+
137+
The current folder is mapped to the '/heron' directory in the container and any changes
138+
you make on the host machine will be reflected in the container. Note that when you exit
139+
the container and re-run the script, a new container will be started with a fresh new
140+
environment.
141+
142+
When a development environment container is running, you can use the follow script
143+
to start a new terminal in the container.
144+
```bash
145+
$ cd /path/to/heron/repo
146+
$ docker/scripts/dev-env-run.sh heron-dev
147+
```
148+
116149
## Contributing New Environments
117150

118151
You'll notice that there are multiple

website2/docs/compiling-linux.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ sidebar_label: Compiling on Linux
2222

2323
Heron can currently be built on the following Linux platforms:
2424

25-
* [Ubuntu 14.04](#building-on-ubuntu-18.04)
25+
* [Ubuntu 18.04](#building-on-ubuntu-18.04)
2626
* [CentOS 7](#building-on-centos-7)
2727

28-
## Building on Ubuntu 14.04
28+
## Building on Ubuntu 18.04
2929

3030
To build Heron on a fresh Ubuntu 18.04 installation:
3131

@@ -96,13 +96,13 @@ $ ./bazel_configure.py
9696
### Step 10 --- Build the project
9797

9898
```bash
99-
$ bazel build --config=ubuntu heron/...
99+
$ bazel build --config=ubuntu heron/...
100100
```
101101

102102
### Step 11 --- Build the packages
103103

104104
```bash
105-
$ bazel build --config=ubuntu scripts/packages:binpkgs
105+
$ bazel build --config=ubuntu scripts/packages:binpkgs
106106
$ bazel build --config=ubuntu scripts/packages:tarpkgs
107107
```
108108

website2/docs/compiling-overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Heron build system. For step-by-step build instructions for a specific platform,
2727
the following guides are available:
2828

2929
* [Building on Linux Platforms](compiling-linux)
30-
* [Building on Mac OS X](compiling-mac)
30+
* [Building on Mac OS X](compiling-osx)
3131

3232
Heron can be built either [in its entirety](#building-all-components), as [individual components](#building-specific-components).
3333

website2/website/versioned_docs/version-0.20.0-incubating/compiling-overview.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ original_id: compiling-overview
2222
-->
2323

2424
Heron is currently available for [Mac OS X 10.14](compiling-osx),
25-
[Ubuntu 14.04](compiling-linux), and [CentOS
25+
[Ubuntu 18.04](compiling-linux), and [CentOS
2626
7](compiling-linux#building-on-centos-7). This guide describes the basics of the
2727
Heron build system. For step-by-step build instructions for a specific platform,
2828
the following guides are available:
2929

3030
* [Building on Linux Platforms](compiling-linux)
31-
* [Building on Mac OS X](compiling-mac)
31+
* [Building on Mac OS X](compiling-osx)
32+
* [Building in Docker Container](compiling-docker)
3233

3334
Heron can be built either [in its entirety](#building-all-components), as [individual components](#building-specific-components).
3435

@@ -93,8 +94,8 @@ OS-specific configuration using the `--config` flag. The following OS values
9394
are supported:
9495

9596
* `darwin` (Mac OS X)
96-
* `ubuntu` (Ubuntu 14.04)
97-
* `centos5` (CentOS 5)
97+
* `ubuntu` (Ubuntu)
98+
* `centos` (CentOS)
9899

99100
For example, on Mac OS X (`darwin`), the following command will build all
100101
packages:

0 commit comments

Comments
 (0)