Coder Social home page Coder Social logo

monte-carlo-data / terraform-google-mcd-agent Goto Github PK

View Code? Open in Web Editor NEW
0.0 21.0 0.0 53 KB

Monte Carlo's agent module for customer-hosted deployments in GCP

Home Page: https://www.montecarlodata.com/

License: Other

HCL 98.07% Makefile 1.93%

terraform-google-mcd-agent's Introduction

Monte Carlo GCP Agent Module

This module deploys Monte Carlo's containerized agent on GCP Cloud Run, along with storage, roles and service accounts.

See here for architecture details and alternative deployment options.

Prerequisites

Usage

Basic usage of this module:

module "apollo" {
  source = "monte-carlo-data/mcd-agent/google"

  # Required variables
  generate_key      = true
  project_id        = "<GCP PROJECT>"
}

output "uri" {
  value       = module.apollo.mcd_agent_uri
  description = "The URL for the agent."
}

output "key" {
  value       = module.apollo.mcd_agent_invoker_key
  description = "The Key file for Monte Carlo to invoke the agent."
  sensitive   = true
}

After which you must register your agent with Monte Carlo. See here for more details, options, and documentation.

Note that setting generate_key = true will persist a key in the remote state used by Terraform. Please take appropriate measures to protect your remote state.

This module also activates the Cloud Run API in the project you specified. This resource (API) is not deactivated on destroy.

Inputs

Name Description Type Default
project_id The GCP project ID to deploy the agent into. string N/A
location The GCP location (region) to deploy the agent into. string us-east4
image The image for the agent. string montecarlodata/agent:latest-cloudrun
remote_upgradable Allow the agent image to be remotely upgraded by Monte Carlo. Note that this sets a lifecycle to ignore any changes in Terraform to the image used after the initial deployment. If not set to 'true' you will be responsible for upgrading the image (e.g. specifying a new tag) for any bug fixes and improvements. Changing this value after initial deployment will replace your agent and require (re)registration. bool true
generate_key Whether to generate a key for Monte Carlo to invoke the agent via Terraform. Note that this will persist a key in the remote state used by Terraform. Please take appropriate measures to protect your remote state. If not set to 'true' you will need to create a JSON key via another mechanism (e.g. GCP console) before registration. bool N/A

Outputs

Name Description
mcd_agent_name The name of the agent Cloud Run service.
mcd_agent_uri The URL for the agent service. To be used in registering.
mcd_agent_storage The GCS bucket for the agent.
mcd_agent_invoker_sa The email of the invoker service account for the agent.
mcd_agent_invoker_key The Key file for Monte Carlo to invoke the agent service. To be used in registering.

Releases and Development

The README and sample agent in the examples/agent directory is a good starting point to familiarize yourself with using the agent. These docs are also helpful to learn about provisioning resources in GCP.

Note that all Terraform files must conform to the standards of terraform fmt and the standard module structure. CircleCI will sanity check formatting and for valid tf config files. It is also recommended you use Terraform Cloud as a backend. Otherwise, as normal, please follow Monte Carlo's code guidelines during development and review.

When ready to release simply add a new version tag, e.g. v0.0.42, and push that tag to GitHub. See additional details here.

License

See LICENSE for more information.

Security

See SECURITY for more information.

terraform-google-mcd-agent's People

Contributors

pxc-dev avatar mcd-ryan avatar mrostan avatar xbeta avatar

Watchers

Mauricio De Diana avatar Halisson Bruno Vitor avatar Richard Morrisroe avatar  avatar Andy Liu avatar Amy Troschinetz avatar Prantik Bhattacharyya avatar  avatar bharath yarlagadda avatar Ivan Lamden avatar Lior Gavish avatar Itay Bleier avatar Gilad Grushka avatar Jonathan Avila avatar Hina Aman avatar C.J. Jameson avatar  avatar  avatar Payoj Baral avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.