Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.
/ srebot Public archive

SRE bot uses terraform to deploy GCP DialogFlow bot for Site Reliability Engineers who are lonely

Notifications You must be signed in to change notification settings

contino/srebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

srebot

SRE bot uses terraform to deploy GCP DialogFlow bot for Site Reliability Engineers who are lonely

Pre-requisites for deploying from local machine

  • Install terraform locally.
  • Install GCP SDK (gcloud) locally.
  • Create an GCP account and project.
  • https://dialogflow.cloud.google.com/ login and enable
  • Setup authentication to your GCP account in account.json (don't check this in)
  • export GOOGLE_APPLICATION_CREDENTIALS=account.json
  • update your project and bot_name in in variables.tf

Intents

  • alerts (service,environment)
  • call.latency (service,environment)
  • call.rate (service,environment)
  • error.rate (service,environment)
  • errors (service,environment)
  • health (service,environment)
  • deployments (datetime)
  • oncall (datetime)
  • help

Entities

  • environmen e.g. dev, int, qa, prodt
  • service e.g. kafka, cassandra, orders, batch, purchases

Instructions for deploying from local machine

terraform init
terraform plan 
terraform apply

Importing agent

Terraform DialogFlow support in the google provider is currently restricted to the top level "google_dialogflow_agent" resource. The agent configuration, including Entities, Intents, and other agent configuration is managed using DialogFlow import/export zip. The contents of the zip are unzipped to the sre_template directory, and templatized with ${XXX} variable references, and template_dir resource is used to render the entire sre_template directory to the sre directory. A null_resource local provisioner zips up the rendered sre directory and calls the DialogFlow import API to configure the agent.

refs

About

SRE bot uses terraform to deploy GCP DialogFlow bot for Site Reliability Engineers who are lonely

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published