diff --git a/build/README.md b/build/README.md index cae71d9eca..8575572f57 100644 --- a/build/README.md +++ b/build/README.md @@ -1,6 +1,30 @@ # Rpm Build Instructions +## Using `docker-compose` + +We are moving toward using a docker-based build system. This eliminates the need to maintain a local installation with all the +build tools as well as ensuring that you are using the same versions as we use for testing. + +These are the versions of these tools we are using: +* docker 1.12.2 +* docker-compose 1.8.1 + +You can build from any repository/branch combination, but that repository must be available to `git clone ...`. Note that in the +following `docker-compose` commands, you can limit building to one or more sub-projects by supplying arguments at the end. If none +are supplied, then *all* will be run. + +Starting at the top-level of your trafficcontrol git clone (e.g. `~/src/incubator-trafficcontrol`): + +> cd infrastructure/docker/build +> docker-compose build traffic_ops_build traffic_monitor_build ... +> GITREPO=https://github.com/username/incubator-trafficcontrol BRANCH=mybranch docker-compose up traffic_ops_build traffic_monitor_build ... + +The resulting `.rpm` files will be created in the `artifacts` directory. + + +## Building the old-fashioned way + rpm files for all sub-projects can be built using the file `build/build.sh`. If this script is given parameters, it will build only those projects specified on the command line, e.g. `$ ./build/build.sh traffic_ops`. The prerequisites for each sub-project are listed below. diff --git a/build/docker-build.sh b/build/docker-build.sh deleted file mode 100755 index 01005be9c6..0000000000 --- a/build/docker-build.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash -# -# docker-build.sh creates containers for building each component of traffic_control with -# all needed dependencies. Once the build is complete, all rpms are copied into the "dist" -# directory in the current directory. -# -# Usage: docker-build.sh [] -# Options: -# -r git repository to clone from (defaults to value of GITREPO env variable or -# `https://github.com/Comcast/traffic_control'). Can be a URI or local directory. -# -b branch (or tag) in repository to checkout (defaults to value of BRANCH env variable or `master') -# -d directory to copy build artifacts (default is ./dist) - -export GITREPO="${GITREPO:-https://github.com/Comcast/traffic_control}" -export BRANCH="${BRANCH:-master}" - -Usage() { - echo "Usage:" - echo " $0 [