From aa1b885732c2d62c090cb8e1eacfe47971e3e6a3 Mon Sep 17 00:00:00 2001 From: Ev Kontsevoy Date: Tue, 19 Mar 2019 09:07:56 -0700 Subject: [PATCH] Added more assets to the release tarball (#329) --- build.assets/Makefile | 5 ++- build.assets/README.md | 83 ++++++++++++++++++++++++++++++++++++++--- build.assets/release.sh | 11 +++++- 3 files changed, 90 insertions(+), 9 deletions(-) diff --git a/build.assets/Makefile b/build.assets/Makefile index 91d8a91626..304e9c389a 100644 --- a/build.assets/Makefile +++ b/build.assets/Makefile @@ -29,6 +29,7 @@ MONITORING_APP_TAG ?= 0.0.1 MONITORING_APP_BRANCH ?= $(MONITORING_APP_TAG) K8S_APP_TAG ?= 0.0.1 TILLER_APP_TAG ?= 0.0.1 +GOLFLAGS ?= -w -s # Git repositories TELEPORT_REPO = git@github.com:gravitational/teleport.git @@ -444,13 +445,13 @@ build-tsh-on-host: cd $(BUILDDIR)/src/$(TELEPORT_PKG_PATH) && \ git fetch --all --tags && \ git checkout $(TELEPORT_REPOTAG) && \ - GOPATH=$(BUILDDIR) go build -o $(TSH_OUT) ./tool/tsh + GOPATH=$(BUILDDIR) go build -ldflags "$(GOLFLAGS)" -o $(TSH_OUT) ./tool/tsh @echo "Done --> $(TSH_OUT)" .PHONY: build-tsh-inside-container build-tsh-inside-container: @echo "\n----> Building Tsh binary inside container...\n" - go build -o $(LOCAL_GRAVITY_BUILDDIR)/tsh $(TELEPORT_PKG_PATH)/tool/tsh + go build -ldflags "$(GOLFLAGS)" -o $(LOCAL_GRAVITY_BUILDDIR)/tsh $(TELEPORT_PKG_PATH)/tool/tsh @echo "Done --> $(LOCAL_GRAVITY_BUILDDIR)/tsh" .PHONY: clone-teleport diff --git a/build.assets/README.md b/build.assets/README.md index d9599f6fc3..50b6380539 100644 --- a/build.assets/README.md +++ b/build.assets/README.md @@ -1,10 +1,81 @@ -### Build Assets +Gravity +======= +Gravity is a Kubernetes packaging solution that takes the drama out of +on-premises deployments. -This directory is used by Jenkinds to build Gravity inside CI/CD pipeline using -Docker container to ensure reproducible builds. +Project Links +============== -To do it manually simply type: +Gravity Website: https://gravitational.com/gravity/ +Quick Start : https://gravitational.com/gravity/docs/quickstart/ +Blog : https://blog.gravitational.com +Community Forum: https://community.gravitational.com + +Introduction +============ +Gravity is an open source toolkit for creating "images" of Kubernetes +clusters and the applications running inside the clusters. The resulting +images are called *application bundles* and they are just `.tar` files. + +An application bundle can be used to re-create full replicas of the original +cluster in any environment where compliance and consistency matters, i.e. in +locked-down AWS/GCE/Azure environments or even in air-gapped server rooms. A +bundle can run without human supervision, as a "kubernetes appliance". + +Gravity has been running in production in major financial institutions, +government data centers and enterprises. Gravitational open sourced it in the +fall of 2018. + +Installing +========== + +Execute `./install.sh` script as root. It will copy `tele` and `tsh` binaries +into `/usr/local/bin`. + +What are these binaries? + +* `tele` is a tool to build cluster images. These images will contain + a Kubernetes installer. +* `tsh` is a tool to remotely connect to clusters created from the images. + tsh supports both SSH and Kubernetes API. + +See the quick start to learn how to use these tools: +https://gravitational.com/gravity/docs/quickstart/ + +Building from source +==================== +Gravity is written in Go. There are two ways to build the Gravity tools from +source: by using locally installed build tools or via Docker. In both cases +you will need a Linux machine. + +**Building on MacOS, even with Docker, is possible but not currently supported** + +```bash +$ git clone git@github.com:gravitational/gravity.git +$ cd gravity + +# Running 'make' with the default target uses Docker. +# The output will be stored in build/current/ +$ make + +# If you have Go 1.10+ installed, you can build without Docker which is faster. +# The output will be stored in $GOPATH/bin/ +$ make install + +# To build tsh +$ make build-tsh + +# To remove the build artifacts: +$ make clean ``` -make -``` + +Talk to us +========== + +* Want to join our team to hack on Gravity? https://gravitational.com/careers/systems-engineer/ +* Want to stop managing Kubernetes and have autonomous appliance-like clusters? +* Want to take your complex SaaS application and convert it into a downloadable + appliance so your customers can run it on their own AWS account or in a colo? + +Reach out to info@gravitational.com diff --git a/build.assets/release.sh b/build.assets/release.sh index 2774fa2e39..622276d338 100644 --- a/build.assets/release.sh +++ b/build.assets/release.sh @@ -4,5 +4,14 @@ set -e TEMP_DIR="$(mktemp -d)" trap "rm -rf ${TEMP_DIR}" exit -cp ${TSH_OUT} ${TELE_OUT} install.sh ${TEMP_DIR} +# These commands add the following assets to the release tarball: +# install.sh +# LICENSE +# README.md +# tele +# tsh +# VERSION +cp ${TSH_OUT} ${TELE_OUT} install.sh README.md ../LICENSE ${TEMP_DIR} +../version.sh > ${TEMP_DIR}/VERSION + tar -C ${TEMP_DIR} -zcvf ${RELEASE_OUT} .