@tundra tundra authored on 30 Dec 2017
README.md improve makefile cleanup stanza, document bootstrap build 6 years ago
brewenvs first cut at complete makefile 6 years ago
makefile correct syntax error in makefile 6 years ago
README.md

Build Standard Tools

This is automation support for the linuxbrew-based tools procedure documented at:

https://www.tundraware.com/TechnicalNotes/Divorce-Your-Linux-Admin

How To Use The Makefile

This makefile handles both the bootstrapping and then the full release of a custom linuxbrew based toolset, installed at any location you wish (so long as you have write permission there).

Before doing anything, edit the variables as the top of the makefile to reflect where you want the built tarballs to be exported, where you intend to install the tools, and what set of tools you want installed.

Release Versioning

Both the bootstrap and full build process create tarballs and rename the tools directory with a version stamp in the form, YYYMMDD. The idea is to allow multiple verisons of your toolsets to exist under ${INSTALLDIR}. You simply create a symlink in that directory named ${TOOLS} to point to the version you want. This makes certain automation use cases with tsshbatch or ansible somewhat simpler.

Building The Bootstrap Image

  1. Log into your build machine, VM, or docker image.

  2. Make sure you have write permission to the installation directory.

  3. Make sure the native OS compiler tools are installed.

  4. Get the linuxbrew image:

    make getbrew

  5. Build the bootstrap image:

    make bootstrap-build

  6. Build a release tarball and export it:

    make bootstrap-release

  7. Cleanup:

    make clean

Building The Full Tools Set

The brewenv File

The brewenv file documents the environment variables that need to be set in order to access your installed binaries and support files. You may find this useful when doing the builds. You certainly will want these variables set when running a final installation of your tools.

Just be sure to edit it and change TOOLSDIR="/opt/TundraWare/tools" to wherever your tools installation actually lives.