diff --git a/Makefile b/Makefile index 3db82bfece..035df40eb5 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,9 @@ export DOCKER_TAG ?= latest export DOCKER_IMAGE_NAME ?= $(DOCKER_IMAGE):$(DOCKER_TAG) export DOCKER_BUILD_FLAGS = +export DEFAULT_HELP_TARGET := help/install +export README_DEPS ?= docs/targets.md + -include $(shell curl -sSL -o .build-harness "https://git.io/build-harness"; echo .build-harness) all: init deps build install run @@ -19,3 +22,6 @@ push: run: docker run -it ${DOCKER_IMAGE_NAME} sh + +help/install: + @$(SELF) help/generate MAKEFILE_LIST=install/Makefile diff --git a/README.md b/README.md index 3af863416d..cfe72fcc28 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,24 @@ -# Packages [![Build Status](https://travis-ci.org/cloudposse/packages.svg?branch=master)](https://travis-ci.org/cloudposse/packages) + + +[![Cloud Posse](https://cloudposse.com/logo-300x69.png)](https://cloudposse.com) + +# Packages [![TravisCI Build Status](https://travis-ci.org/cloudposse/packages.svg?branch=master)](https://travis-ci.org/cloudposse/packages) [![Codefresh Build Status](https://g.codefresh.io/api/badges/build?repoOwner=cloudposse&repoName=packages&branch=master&pipelineName=packages&accountName=cloudposse&type=cf-1)](https://g.codefresh.io/repositories/cloudposse/packages/builds?filter=trigger:build;branch:master;service:5b234974667ab79287990636~packages) [![Latest Release](https://img.shields.io/github/release/cloudposse/packages.svg)](https://github.com/cloudposse/packages/releases) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com) + Cloud Posse distribution of native apps. Use this repo to easily install binary releases of popular apps. This is useful for inclusion into a `Dockerfile` to install dependencies. -## Manifest -``` -Available targets: +--- + +This project is part of our comprehensive ["SweetOps"](https://docs.cloudposse.com) approach towards DevOps. + + +It's 100% Open Source and licensed under the [APACHE2](LICENSE). + + - aws-vault Install aws-vault to easily assume roles (not related to HashiCorp Vault) - chamber Install Chamber to manage secrets with SSM+KMS - fetch Install fetch to easily download files, folders, and release assets from a specific git commit, branch, or tag - github-commenter Install github-commenter - gomplate Install gomplate - goofys Install goofys - helm Install helm - helmfile Install helmfile - kops Install kops - kubectl Install kubectl - kubectx Install kubectx - kubens Install kubens - sops Install sops (required by `helm-secrets`) - terraform Install Terraform - yq Install YQ to manipulte YAML -``` ## Usage @@ -48,6 +42,18 @@ Install to a specific folder: make -C install aws-vault INSTALL_PATH=/usr/bin ``` +Uninstall a specific package +``` +make -C uninstall yq +``` + + + + +## Examples + +### Docker Multi-stage Build + Add this to a `Dockerfile` to install packages using a multi-stage build process: ``` FROM cloudposse/packages:latest AS packages @@ -55,6 +61,8 @@ FROM cloudposse/packages:latest AS packages COPY --from=packages /packages/bin/kubectl /usr/local/bin/ ``` +### Docker with Git Clone + Or... add this to a `Dockerfile` to easily install packages on-demand: ``` RUN git clone --depth=1 -b master https://github.com/cloudposse/packages.git /packages && \ @@ -62,12 +70,7 @@ RUN git clone --depth=1 -b master https://github.com/cloudposse/packages.git /pa make -C /packages/install kubectl ``` -Uninstall a specific package -``` -make -C uninstall yq -``` - -## Makefile Inclusion +### Makefile Inclusion Sometimes it's necessary to install some binary dependencies when building projects. For example, we frequently rely on `gomplate` or `helm` to build chart packages. @@ -98,12 +101,71 @@ packages/uninstall/%: ``` + +## Makefile Targets +``` +Available targets: + + aws-vault Install aws-vault to easily assume roles (not related to HashiCorp Vault) + chamber Install Chamber to manage secrets with SSM+KMS + fetch Install fetch to easily download files, folders, and release assets from a specific git commit, branch, or tag + github-commenter Install github-commenter + gomplate Install gomplate + goofys Install goofys + helm Install helm + helmfile Install helmfile to easily deploy collections of helm charts + htmltest Install htmltest + htmltest-darwin Install htmltest (darwin) + htmltest-linux Install htmltest (linux) + hugo Install hugo framework for building static websites. + hugo-darwin Install hugo framework for building static websites (darwin) + hugo-linux Install hugo framework for building static websites (linux) + kops Install kops + kubectl Install kubectl + kubectx Install kubectx + kubens Install kubens + sops Install sops (required by `helm-secrets`) + stern Install stern multi pod and container log tailing for Kubernetes + terraform Install Terraform + terraform-docs Install terraform-docs to generate docs from terraform modules + terragrunt Install terragrunt for tools that make it easier to work with multiple Terraform modules + yq Install YQ to manipulte YAML + +``` + + + +## Related Projects + +Check out these related projects. + +- [build-harness](https://github.com/cloudposse/build-harness) - Collection of Makefiles to facilitate building Golang projects, Dockerfiles, Helm charts, and more +- [geodesic](https://github.com/cloudposse/geodesic) - Geodesic is the fastest way to get up and running with a rock solid, production grade cloud platform built on strictly Open Source tools. + + ## Help **Got a question?** -File a GitHub [issue](https://github.com/cloudposse/packages/issues), send us an [email](mailto:hello@cloudposse.com) or reach out to us on [Gitter](https://gitter.im/cloudposse/). +File a GitHub [issue](https://github.com/cloudposse/packages/issues), send us an [email][email] or join our [Slack Community][slack]. + +## Commerical Support +Work directly with our team of DevOps experts via email, slack, and video conferencing. + +We provide *commercial support* for all of our [Open Source][github] projects. As a *Dedicated Support* customer, you have access to our team of subject matter experts at a fraction of the cost of a fulltime engineer. + +- **Questions.** We'll use a Shared Slack channel between your team and ours. +- **Troubleshooting.** We'll help you triage why things aren't working. +- **Code Reviews.** We'll review your Pull Requests and provide constructive feedback. +- **Bug Fixes.** We'll rapidly work to fix any bugs in our projects. +- **Build New Terraform Modules.** We'll develop original modules to provision infrastructure. +- **Cloud Architecture.** We'll assist with your cloud strategy and design. +- **Implementation.** We'll provide hands on support to implement our reference architectures. + +## Community Forum + +Get access to our [Open Source Community Forum][slack] on Slack. It's **FREE** to join for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build *sweet* infrastructure. ## Contributing @@ -113,7 +175,7 @@ Please use the [issue tracker](https://github.com/cloudposse/packages/issues) to ### Developing -If you are interested in being a contributor and want to get involved in developing `packages`, we would love to hear from you! Shoot us an [email](mailto:hello@cloudposse.com). +If you are interested in being a contributor and want to get involved in developing this project or [help out](https://github.com/orgs/cloudposse/projects/3) with our other projects, we would love to hear from you! Shoot us an [email](mailto:hello@cloudposse.com). In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow. @@ -121,14 +183,18 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow. 2. **Clone** the project to your own machine 3. **Commit** changes to your own branch 4. **Push** your work back up to your fork - 5. Submit a **Pull request** so that we can review your changes + 5. Submit a **Pull Request** so that we can review your changes + +**NOTE:** Be sure to merge the latest changes from "upstream" before making a pull request! -**NOTE:** Be sure to merge the latest from "upstream" before making a pull request! +## Copyright +Copyright © 2017-2018 [Cloud Posse, LLC](https://cloudposse.com) -## License -[APACHE 2.0](LICENSE) © 2018 [Cloud Posse, LLC](https://cloudposse.com) +## License + +[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) See [LICENSE](LICENSE) for full details. @@ -140,7 +206,7 @@ See [LICENSE](LICENSE) for full details. "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an @@ -150,31 +216,43 @@ See [LICENSE](LICENSE) for full details. under the License. +## Trademarks + +All other trademarks referenced herein are the property of their respective owners. + ## About -`packages` is maintained and funded by [Cloud Posse, LLC][website]. +This project is maintained and funded by [Cloud Posse, LLC][website]. Like it? Please let us know at -![Cloud Posse](https://cloudposse.com/logo-300x69.png) +[![Cloud Posse](https://cloudposse.com/logo-300x69.png)](https://cloudposse.com) +We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. We love [Open Source Software](https://github.com/cloudposse/)! -Like it? Please let us know at +We offer paid support on all of our projects. -We love [Open Source Software](https://github.com/cloudposse/)! +Check out [our other projects][github], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation. -See [our other projects][community] -or [hire us][hire] to help build your next cloud-platform. + [docs]: https://docs.cloudposse.com/ + [website]: https://cloudposse.com/ + [github]: https://github.com/cloudposse/ + [jobs]: https://cloudposse.com/jobs/ + [hire]: https://cloudposse.com/contact/ + [slack]: https://slack.cloudposse.com/ + [linkedin]: https://www.linkedin.com/company/cloudposse + [twitter]: https://twitter.com/cloudposse/ + [email]: mailto:hello@cloudposse.com - [website]: http://cloudposse.com/ - [community]: https://github.com/cloudposse/ - [hire]: http://cloudposse.com/contact/ ### Contributors +| [![Erik Osterman][osterman_avatar]](osterman_homepage)
[Erik Osterman][osterman_homepage] | [![Igor Rodionov][goruha_avatar]](goruha_homepage)
[Igor Rodionov][goruha_homepage] | [![Andriy Knysh][aknysh_avatar]](aknysh_homepage)
[Andriy Knysh][aknysh_homepage] | +|---|---|---| + + [osterman_homepage]: https://github.com/osterman + [osterman_avatar]: http://s.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb?s=144 + [goruha_homepage]: https://github.com/goruha/ + [goruha_avatar]: http://s.gravatar.com/avatar/bc70834d32ed4517568a1feb0b9be7e2?s=144 + [aknysh_homepage]: https://github.com/aknysh/ + [aknysh_avatar]: https://avatars0.githubusercontent.com/u/7356997?v=4&u=ed9ce1c9151d552d985bdf5546772e14ef7ab617&s=144 -| [![Erik Osterman][erik_img]][erik_web]
[Erik Osterman][erik_web] | [![Andriy Knysh][andriy_img]][andriy_web]
[Andriy Knysh][andriy_web] | -|-------------------------------------------------------|------------------------------------------------------------------| - [erik_img]: http://s.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb?s=144 - [erik_web]: https://github.com/osterman/ - [andriy_img]: https://avatars0.githubusercontent.com/u/7356997?v=4&u=ed9ce1c9151d552d985bdf5546772e14ef7ab617&s=144 - [andriy_web]: https://github.com/aknysh/ diff --git a/README.yaml b/README.yaml new file mode 100644 index 0000000000..aced444f63 --- /dev/null +++ b/README.yaml @@ -0,0 +1,131 @@ +name: Packages + +description: |- + Cloud Posse distribution of native apps. + + Use this repo to easily install binary releases of popular apps. This is useful for inclusion into a `Dockerfile` to install dependencies. + +# License of this project +license: "APACHE2" + +# Canonical GitHub repo +github_repo: cloudposse/packages + +# Badges to display +badges: + - name: "TravisCI Build Status" + image: "https://travis-ci.org/cloudposse/packages.svg?branch=master" + url: "https://travis-ci.org/cloudposse/packages" + - name: "Codefresh Build Status" + image: "https://g.codefresh.io/api/badges/build?repoOwner=cloudposse&repoName=packages&branch=master&pipelineName=packages&accountName=cloudposse&type=cf-1" + url: "https://g.codefresh.io/repositories/cloudposse/packages/builds?filter=trigger:build;branch:master;service:5b234974667ab79287990636~packages" + - name: "Latest Release" + image: "https://img.shields.io/github/release/cloudposse/packages.svg" + url: "https://github.com/cloudposse/packages/releases" + - name: "Slack Community" + image: "https://slack.cloudposse.com/badge.svg" + url: "https://slack.cloudposse.com" + +related: + - name: "build-harness" + description: "Collection of Makefiles to facilitate building Golang projects, Dockerfiles, Helm charts, and more" + url: "https://github.com/cloudposse/build-harness" + - name: "geodesic" + description: "Geodesic is the fastest way to get up and running with a rock solid, production grade cloud platform built on strictly Open Source tools." + url: "https://github.com/cloudposse/geodesic" + +# Other files to include in this README from the project folder +include: + - "docs/targets.md" + +usage: |- + See all available packages: + ``` + make -C install help + ``` + + Install everything... + ``` + make -C install all + ``` + + Install specific packages: + ``` + make -C install aws-vault chamber + ``` + + Install to a specific folder: + ``` + make -C install aws-vault INSTALL_PATH=/usr/bin + ``` + + Uninstall a specific package + ``` + make -C uninstall yq + ``` + +examples: |- + ### Docker Multi-stage Build + + Add this to a `Dockerfile` to install packages using a multi-stage build process: + ``` + FROM cloudposse/packages:latest AS packages + + COPY --from=packages /packages/bin/kubectl /usr/local/bin/ + ``` + + ### Docker with Git Clone + + Or... add this to a `Dockerfile` to easily install packages on-demand: + ``` + RUN git clone --depth=1 -b master https://github.com/cloudposse/packages.git /packages && \ + rm -rf /packages/.git && \ + make -C /packages/install kubectl + ``` + + ### Makefile Inclusion + + Sometimes it's necessary to install some binary dependencies when building projects. For example, we frequently + rely on `gomplate` or `helm` to build chart packages. + + Here's a stub you can include into a `Makefile` to make it easier to install binary dependencies. + + ``` + export PACKAGES_VERSION ?= master + export PACKAGES_PATH ?= packages/ + export INSTALL_PATH ?= $(PACKAGES_PATH)/vendor + + ## Install packages + packages/install: + @if [ ! -d $(PACKAGES_PATH) ]; then \ + echo "Installing packages $(PACKAGES_VERSION)..."; \ + rm -rf $(PACKAGES_PATH); \ + git clone --depth=1 -b $(PACKAGES_VERSION) https://github.com/cloudposse/packages.git $(PACKAGES_PATH); \ + rm -rf $(PACKAGES_PATH)/.git; \ + fi + + ## Install package (e.g. helm, helmfile, kubectl) + packages/install/%: packages/install + @make -C $(PACKAGES_PATH)/install $(subst packages/install/,,$@) + + ## Uninstall package (e.g. helm, helmfile, kubectl) + packages/uninstall/%: + @make -C $(PACKAGES_PATH)/uninstall $(subst packages/uninstall/,,$@) + ``` + + +# Contributors to this project +contributors: + - name: "Erik Osterman" + homepage: "https://github.com/osterman" + avatar: "http://s.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb?s=144" + github: "osterman" + - name: "Igor Rodionov" + homepage: "https://github.com/goruha/" + avatar: "http://s.gravatar.com/avatar/bc70834d32ed4517568a1feb0b9be7e2?s=144" + github: "goruha" + - name: "Andriy Knysh" + homepage: "https://github.com/aknysh/" + avatar: "https://avatars0.githubusercontent.com/u/7356997?v=4&u=ed9ce1c9151d552d985bdf5546772e14ef7ab617&s=144" + github: "aknysh" + diff --git a/docs/targets.md b/docs/targets.md new file mode 100644 index 0000000000..0213af0323 --- /dev/null +++ b/docs/targets.md @@ -0,0 +1,30 @@ +## Makefile Targets +``` +Available targets: + + aws-vault Install aws-vault to easily assume roles (not related to HashiCorp Vault) + chamber Install Chamber to manage secrets with SSM+KMS + fetch Install fetch to easily download files, folders, and release assets from a specific git commit, branch, or tag + github-commenter Install github-commenter + gomplate Install gomplate + goofys Install goofys + helm Install helm + helmfile Install helmfile to easily deploy collections of helm charts + htmltest Install htmltest + htmltest-darwin Install htmltest (darwin) + htmltest-linux Install htmltest (linux) + hugo Install hugo framework for building static websites. + hugo-darwin Install hugo framework for building static websites (darwin) + hugo-linux Install hugo framework for building static websites (linux) + kops Install kops + kubectl Install kubectl + kubectx Install kubectx + kubens Install kubens + sops Install sops (required by `helm-secrets`) + stern Install stern multi pod and container log tailing for Kubernetes + terraform Install Terraform + terraform-docs Install terraform-docs to generate docs from terraform modules + terragrunt Install terragrunt for tools that make it easier to work with multiple Terraform modules + yq Install YQ to manipulte YAML + +``` diff --git a/install/Makefile b/install/Makefile index 611677a3ea..3762af4f42 100644 --- a/install/Makefile +++ b/install/Makefile @@ -22,6 +22,7 @@ all: aws-vault \ kubectx \ kubens \ sops \ + stern \ terraform \ terraform-docs \ terragrunt \ @@ -132,6 +133,10 @@ export SOPS_VERSION ?= 3.0.3 sops: $(call github_download_binary_release,mozilla,$(SOPS_VERSION),$@-$(SOPS_VERSION).$(OS)) +export STERN_VERSION ?= 1.7.0 +## Install stern multi pod and container log tailing for Kubernetes +stern: + $(call github_download_binary_release,wercker,$(STERN_VERSION),$@_$(OS)_$(ARCH)) export TERRAFORM_VERSION ?= 0.11.5 ## Install Terraform