Skip to content

Commit

Permalink
[skip ci] Merge pull request gruntwork-io#5 from gruntwork-io/fix_links
Browse files Browse the repository at this point in the history
[skip ci] Change links to absolute
  • Loading branch information
autero1 authored May 9, 2019
2 parents 48eec0b + 6e28122 commit 6010510
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 11 deletions.
File renamed without changes.
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Contribution Guidelines

<!-- NOTE: We use absolute linking here instead of relative linking, because the terraform registry does not support
relative linking correctly.
-->

Contributions to this Module are very welcome! We follow a fairly standard [pull request process](
https://help.github.com/articles/about-pull-requests/) for contributions, subject to the following guidelines:

Expand Down Expand Up @@ -96,4 +100,4 @@ to include the following:
## Merge and release

The maintainers for this repo will review your code and provide feedback. If everything looks good, they will merge the
code and release a new version, which you'll be able to find in the [releases page](../../releases).
code and release a new version, which you'll be able to find in the [releases page](https://github.com/gruntwork-io/terraform-google-load-balancer/releases).
64 changes: 64 additions & 0 deletions GRUNTWORK_PHILOSOPHY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Gruntwork Philosophy

At Gruntwork, we strive to accelerate the deployment of production grade infrastructure by prodiving a library of
stable, reusable, and battle tested infrastructure as code organized into a series of [modules](#what-is-a-module) with
[submodules](#what-is-a-submodule). Each module represents a particular set of infrastructure that is componentized into
smaller pieces represented by the submodules within the module. By doing so, we have built a composable library that can
be combined into building out everything from simple single service deployments to complicated microservice setups so
that your infrastructure can grow with your business needs. Every module we provide is built with the [production grade
infrastruture checklist](#production-grade-infrastructure-checklist) in mind, ensuring that the services you deploy are
resilient, fault tolerant, and scalable.


## What is a Module?

A Module is a reusable, tested, documented, configurable, best-practices definition of a single piece of Infrastructure
(e.g., Docker cluster, VPC, Jenkins, Consul), written using a combination of [Terraform](https://www.terraform.io/), Go,
and Bash. A module contains a set of automated tests, documentation, and examples that have been proven in production,
providing the underlying infrastructure for [Gruntwork's customers](https://www.gruntwork.io/customers).

Instead of figuring out the details of how to run a piece of infrastructure from scratch, you can reuse existing code
that has been proven in production. And instead of maintaining all that infrastructure code yourself, you can leverage
the work of the community to pick up infrastructure improvements through a version number bump.


## What is a Submodule?

Each Infrastructure Module consists of one or more orthogonal Submodules that handle some specific aspect of that
Infrastructure Module's functionality. Breaking the code up into multiple submodules makes it easier to reuse and
compose to handle many different use cases. Although Modules are designed to provide an end to end solution to manage
the relevant infrastructure by combining the Submodules defined in the Module, Submodules can be used independently for
specific functionality that you need in your infrastructure code.


## Production Grade Infrastructure Checklist

At Gruntwork, we have learned over the years that it is not enough to just get the services up and running in a publicly
accessible space to call your application "production-ready." There are many more things to consider, and oftentimes
many of these considerations are missing in the deployment plan of applications. These topics come up as afterthoughts,
and are learned the hard way after the fact. That is why we codified all of them into a checklist that can be used as a
reference to help ensure that they are considered before your application goes to production, and conscious decisions
are made to neglect particular components if needed, as opposed to accidentally omitting them from consideration.

<!--
Edit the following table using https://www.tablesgenerator.com/markdown_tables. Start by pasting the table below in the
menu item File > Paste table data.
-->

| Task | Description | Example tools |
|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|
| Install | Install the software binaries and all dependencies. | Bash, Chef, Ansible, Puppet |
| Configure | Configure the software at runtime. Includes port settings, TLS certs, service discovery, leaders, followers, replication, etc. | Bash, Chef, Ansible, Puppet |
| Provision | Provision the infrastructure. Includes EC2 instances, load balancers, network topology, security gr oups, IAM permissions, etc. | Terraform, CloudFormation |
| Deploy | Deploy the service on top of the infrastructure. Roll out updates with no downtime. Includes blue-green, rolling, and canary deployments. | Scripts, Orchestration tools (ECS, k8s, Nomad) |
| High availability | Withstand outages of individual processes, EC2 instances, services, Availability Zones, and regions. | Multi AZ, multi-region, replication, ASGs, ELBs |
| Scalability | Scale up and down in response to load. Scale horizontally (more servers) and/or vertically (bigger servers). | ASGs, replication, sharding, caching, divide and conquer |
| Performance | Optimize CPU, memory, disk, network, GPU, and usage. Includes query tuning, benchmarking, load testing, and profiling. | Dynatrace, valgrind, VisualVM, ab, Jmeter |
| Networking | Configure static and dynamic IPs, ports, service discovery, firewalls, DNS, SSH access, and VPN access. | EIPs, ENIs, VPCs, NACLs, SGs, Route 53, OpenVPN |
| Security | Encryption in transit (TLS) and on disk, authentication, authorization, secrets management, server hardening. | ACM, EBS Volumes, Cognito, Vault, CIS |
| Metrics | Availability metrics, business metrics, app metrics, server metrics, events, observability, tracing, and alerting. | CloudWatch, DataDog, New Relic, Honeycomb |
| Logs | Rotate logs on disk. Aggregate log data to a central location. | CloudWatch logs, ELK, Sumo Logic, Papertrail |
| Backup and Restore | Make backups of DBs, caches, and other data on a scheduled basis. Replicate to separate region/account. | RDS, ElastiCache, ec2-snapper, Lambda |
| Cost optimization | Pick proper instance types, use spot and reserved instances, use auto scaling, and nuke unused resources. | ASGs, spot instances, reserved instances |
| Documentation | Document your code, architecture, and practices. Create playbooks to respond to incidents. | READMEs, wikis, Slack |
| Tests | Write automated tests for your infrastructure code. Run tests after every commit and nightly. | Terratest |
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

# Cloud Load Balancer Modules

<!-- NOTE: We use absolute linking here instead of relative linking, because the terraform registry does not support
relative linking correctly.
-->

This repo contains modules to perform load balancing on [Google Cloud Platform (GCP)](https://cloud.google.com/) using [Google Cloud Load Balancing](https://cloud.google.com/load-balancing/).

## Quickstart
Expand Down Expand Up @@ -40,7 +44,7 @@ You can learn more about Cloud Load Balancing in [the official documentation](ht

## Who maintains this Module?

This Module and its Submodules are maintained by [Gruntwork](http://www.gruntwork.io/). Read the [Gruntwork Philosophy](/GRUNTWORK_PHILOSOPHY.md) document to learn more about how Gruntwork builds production grade infrastructure code. If you are looking for help or
This Module and its Submodules are maintained by [Gruntwork](http://www.gruntwork.io/). Read the [Gruntwork Philosophy](https://github.com/gruntwork-io/terraform-google-load-balancer/blob/master/GRUNTWORK_PHILOSOPHY.md) document to learn more about how Gruntwork builds production grade infrastructure code. If you are looking for help or
commercial support, send an email to
[[email protected]](mailto:[email protected]?Subject=Google%20LB%20Module).

Expand All @@ -55,13 +59,13 @@ Gruntwork can help with:

## How do I contribute to this Module?

Contributions are very welcome! Check out the [Contribution Guidelines](/CONTRIBUTING.md) for instructions.
Contributions are very welcome! Check out the [Contribution Guidelines](https://github.com/gruntwork-io/terraform-google-load-balancer/blob/master/CONTRIBUTING.md) for instructions.


## How is this Module versioned?

This Module follows the principles of [Semantic Versioning](http://semver.org/). You can find each new release, along
with the changelog, in the [Releases Page](../../releases).
with the changelog, in the [Releases Page](https://github.com/gruntwork-io/terraform-google-load-balancer/releases).

During initial development, the major version will be 0 (e.g., `0.x.y`), which indicates the code does not yet have a
stable API. Once we hit `1.0.0`, we will make every effort to maintain a backwards compatible API and use the MAJOR,
Expand All @@ -70,4 +74,4 @@ MINOR, and PATCH versions on each release to indicate any incompatibilities.

## License

Please see [LICENSE.txt](/LICENSE.txt) for details on how the code in this repo is licensed.
Please see [LICENSE.txt](https://github.com/gruntwork-io/terraform-google-load-balancer/blob/master/LICENSE.txt) for details on how the code in this repo is licensed.
9 changes: 6 additions & 3 deletions examples/http-multi-backend/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# HTTP Load Balancer Example

The root folder of this repo shows an example of how to use the [HTTP Load Balancer Module](/modules/http-load-balancer) to create a [HTTP Cloud Load Balancer](https://cloud.google.com/load-balancing/docs/https/) with
<!-- NOTE: We use absolute linking here instead of relative linking, because the terraform registry does not support
relative linking correctly.
-->

The root folder of this repo shows an example of how to use the [HTTP Load Balancer Module](https://github.com/gruntwork-io/terraform-google-load-balancer/tree/master/modules/http-load-balancer) to create a [HTTP Cloud Load Balancer](https://cloud.google.com/load-balancing/docs/https/) with

* HTTP listener
* Backend Cloud Storage Bucket with sample files
Expand All @@ -12,8 +16,7 @@ To run this example, you need to:

1. Install [Terraform](https://www.terraform.io/).
1. Make sure you are in the root folder of the repo.
1. Open up `variables.tf` and set secrets at the top of the file as environment variables and fill in any other variables in
the file that don't have defaults.
1. Open up `variables.tf` and fill in variables that don't have defaults.
1. `terraform init`.
1. `terraform plan`.
1. If the plan looks good, run `terraform apply`.
Expand Down
10 changes: 7 additions & 3 deletions modules/http-load-balancer/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# HTTP(S) Load Balancer Module

<!-- NOTE: We use absolute linking here instead of relative linking, because the terraform registry does not support
relative linking correctly.
-->

This Terraform Module creates an [HTTP(S) Cloud Load Balancer](https://cloud.google.com/load-balancing/docs/https/) using [global forwarding rules](https://cloud.google.com/load-balancing/docs/https/global-forwarding-rules).

HTTP(S) load balancing can balance HTTP and HTTPS traffic across multiple backend instances, across multiple regions. Your entire app is available via a single global IP address, resulting in a simplified DNS setup. HTTP(S) load balancing is scalable, fault-tolerant, requires no pre-warming, and enables content-based load balancing.

## Quick Start

* See the [http-multi-backend example](/examples/http-multi-backend) for working sample code.
* Check out [variables.tf](variables.tf) for all parameters you can set for this module.
* See the [http-multi-backend example](https://github.com/gruntwork-io/terraform-google-load-balancer/tree/master/examples/http-multi-backend) for working sample code.
* Check out [variables.tf](https://github.com/gruntwork-io/terraform-google-load-balancer/blob/master/modules/http-load-balancer/variables.tf) for all parameters you can set for this module.

## How do you configure this module

This module allows you to configure a number of parameters, such as HTTP/HTTPS, Google-managed Certificates and custom domain name. For a list of all available variables and their descriptions, see [variables.tf](./variables.tf).
This module allows you to configure a number of parameters, such as HTTP/HTTPS, Google-managed Certificates and custom domain name. For a list of all available variables and their descriptions, see [variables.tf](https://github.com/gruntwork-io/terraform-google-load-balancer/blob/master/modules/http-load-balancer/variables.tf).

## HTTP(S) Load Balancer Terminology

Expand Down
4 changes: 4 additions & 0 deletions test/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Tests

<!-- NOTE: We use absolute linking here instead of relative linking, because the terraform registry does not support
relative linking correctly.
-->

This folder contains automated tests for this Module. All of the tests are written in [Go](https://golang.org/).
Most of these are "integration tests" that deploy real infrastructure using Terraform and verify that infrastructure works as expected using a helper library called [Terratest](https://github.com/gruntwork-io/terratest).

Expand Down

0 comments on commit 6010510

Please sign in to comment.