From ef30f0ea49db62cb753ba664f670b55fe3f668ce Mon Sep 17 00:00:00 2001 From: Mike Splain Date: Fri, 10 Nov 2017 11:32:57 -0500 Subject: [PATCH] Add homebrew devel/HEAD notes to docs and cleanup Added to brew in https://github.com/Homebrew/homebrew-core/pull/20464 --- docs/development/homebrew.md | 34 +++++++++++++++++++++++++++++++++- docs/install.md | 2 ++ docs/update_kops.md | 36 ++++++++++++++++++++++++++++-------- 3 files changed, 63 insertions(+), 9 deletions(-) diff --git a/docs/development/homebrew.md b/docs/development/homebrew.md index d9887195ef..9b01223572 100644 --- a/docs/development/homebrew.md +++ b/docs/development/homebrew.md @@ -1,3 +1,26 @@ +# Installing Kops via Hombrew + +Homebrew makes installing kops [very simple for MacOS.](../install.md) +```bash +brew update && brew install kops +``` + +Development Releases and master can also be installed via Homebrew very easily: +```bash +# Development Release +brew update && brew install kops --devel +# HEAD of master +brew update && brew install kops --HEAD +``` + +Note: if you already have kops installed, you need to substitute `upgrade` for `install`. + +You can switch between development and stable releases with: +```bash +brew switch kops 1.7.1 +brew switch kops 1.8.0-beta.1 +``` + # Releasing kops to Brew Submitting a new release of kops to Homebrew is very simple. @@ -8,11 +31,20 @@ Submitting a new release of kops to Homebrew is very simple. This will automatically update the provided fields and open a PR for you. More details on this script are located [here.](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/bump-formula-pr.rb) +We now include both major and development releases in homebrew. A development version can be updated by adding the `--devel` flag. + Example usage: -``` +```bash +# Major Version brew bump-formula-pr \ --url=https://github.com/kubernetes/kops/archive/1.7.1.tar.gz \ --sha256=044c5c7a737ed3acf53517e64bb27d3da8f7517d2914df89efeeaf84bc8a722a + +# Development Version +brew bump-formula-pr \ + --devel \ + --url=https://github.com/kubernetes/kops/archive/1.8.0-beta.1.tar.gz \ + --sha256=81026d6c1cd7b3898a88275538a7842b4bd8387775937e0528ccb7b83948abf1 ``` * Update the URL variable to the tar.gz of the new release source code diff --git a/docs/install.md b/docs/install.md index 7143f78dc9..f13d382a8a 100644 --- a/docs/install.md +++ b/docs/install.md @@ -8,6 +8,8 @@ From Homebrew: brew update && brew install kops ``` +Developers can also easily install [development releases](development/homebrew.md). + From Github: ```bash diff --git a/docs/update_kops.md b/docs/update_kops.md index 04c03ef485..d3b3831e6a 100644 --- a/docs/update_kops.md +++ b/docs/update_kops.md @@ -1,13 +1,33 @@ -## How to update Kops - Kubernetes Ops +# Updating kops (Binaries) -Update the latest source code from kubernetes/kops +## MacOS -``` -cd ${GOPATH}/src/k8s.io/kops/ -git pull && make -``` +From Homebrew: -Alternatively, if you installed from Homebrew -``` +```bash brew update && brew upgrade kops ``` + +From Github: + +```bash +rm -rf /usr/local/bin/kops +wget -O kops https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)/kops-darwin-amd64 +chmod +x ./kops +sudo mv ./kops /usr/local/bin/ +``` + +You can also rerun rerun [these steps](development/building.md) if previously built from source. + +## Linux + +From Github: + +```bash +rm -rf /usr/local/bin/kops +wget -O kops https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)/kops-linux-amd64 +chmod +x ./kops +sudo mv ./kops /usr/local/bin/ +``` + +You can also rerun rerun [these steps](development/building.md) if previously built from source.