• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

hashicorp/terraform-google-consul: A Terraform Module for how to run Consul on G ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

hashicorp/terraform-google-consul

开源软件地址(OpenSource Url):

https://github.com/hashicorp/terraform-google-consul

开源编程语言(OpenSource Language):

HCL 42.0%

开源软件介绍(OpenSource Introduction):

DISCLAIMER: This is no longer supported.

Moving forward in the future this repository will be no longer supported and eventually lead to deprecation. Please use our latest versions of our products moving forward or alternatively you may fork the repository to continue use and development for your personal/business use.


Terraform Version

Consul for Google Cloud Platform (GCP)

This repo contains a Terraform Module for how to deploy a Consul cluster on GCP using Terraform. Consul is a distributed, highly-available tool that you can use for service discovery and key/value storage. A Consul cluster typically includes a small number of server nodes, which are responsible for being part of the consensus quorum, and a larger number of client nodes, which you typically run alongside your apps:

Consul architecture

How to use this Module

Each Module has the following folder structure:

  • modules: This folder contains the reusable code for this Module, broken down into one or more submodules.
  • examples: This folder contains examples of how to use the submodules.
  • test: Automated tests for the submodules and examples.

To deploy Consul servers using this Module:

  1. Create a Consul Image using a Packer template that references the install-consul module. Here is an example Packer template. Note that Google Cloud does not support custom public Images so you must build this Packer template on your own to proceed.

  2. Deploy that Image across a Compute Instance Group using the Terraform consul-cluster module and execute the run-consul script with the --server flag during boot on each Instance in the Compute Instance Group to form the Consul cluster. Here is an example Terraform configuration to provision a Consul cluster.

To deploy Consul clients using this Module:

  1. Use the install-consul module to install Consul alongside your application code.
  2. Before booting your app, execute the run-consul script with --client flag.
  3. Your app can now usr the local Consul agent for service discovery and key/value storage.
  4. Optionally, you can use the install-dnsmasq module to configure Consul as the DNS for a specific domain (e.g. .consul) so that URLs such as foo.service.consul resolve automatically to the IP address(es) for a service foo registered in Consul (all other domain names will be continue to resolve using the default resolver on the OS).

What's a Terraform Module?

A Terraform Module refers to a self-contained packages of Terraform configurations that are managed as a group. This repo is a Terraform Module and contains many "submodules" which can be composed together to create useful infrastructure patterns.

Who created this Module?

These modules were created by Gruntwork, in partnership with HashiCorp, in 2017 and maintained through 2021. They were deprecated in 2022, see the top of the README for details.

Code included in this Terraform Module:

  • install-consul: This module installs Consul using a Packer template to create a Consul Custom Image.

  • consul-cluster: The module includes Terraform code to deploy a Consul Image across a Managed Compute Instance Group.

  • run-consul: This module includes the scripts to configure and run Consul. It is used by the above Packer module at build-time to set configurations, and by the Terraform module at runtime with the Instance's Startup Script to create the cluster.

  • install-dnsmasq module: Install Dnsmasq and configure it to forward requests for a specific domain to Consul. This allows you to use Consul as a DNS server for URLs such as foo.service.consul.

How is this Terraform Module versioned?

This Terraform Module follows the principles of Semantic Versioning. You can find each new release, along with the changelog, in the Releases Page.

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, MINOR, and PATCH versions on each release to indicate any incompatibilities.

License

This code is released under the Apache 2.0 License. Please see LICENSE and NOTICE for more details.

Copyright © 2017 Gruntwork, Inc.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
kamyu104/GoogleKickStart-2021: 发布时间:2022-06-12
下一篇:
googlevr/gvr-ios-sdk: Google VR SDK for iOS发布时间:2022-06-12
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap