My customizations and notes about using the HashiCups sample app and infrastructure code created by HashiCorp to do their demos and training
Overview
NOTE: Content here are my personal opinions, and not intended to represent any employer (past or present). “PROTIP:” here highlight information I haven’t seen elsewhere on the internet because it is hard-won, little-know but significant facts based on my personal research and experience.
“HashiCups” is the demo app used across several products from HashiCorp.
HashiCups is not a “bare bones” toy app. Unlike many others, HashiCups comes with configuration settings for installing in several clouds running with Kubernetes, Gateways, and other production-grade infrastructure.
That’s because HashiCorp created it and actively maintains it as the base for testing, demos, training, observability instrumentation (logging, monintoring, tracing), and performance benchmarks of HashiCorp’s industry-grade Terraform, Vault, Consul, Nomad, Waypoint, Packer, Vagrant, and others used by many Global 2000 enterprises around the world.
HashiCorp provides instructions for creating instances of HashiCups locally on a Mac and in Linux servers in various clouds. CircleCI config.yml code is provided for using Terraform Cloud.
HashiCups configurations include HA (High Availability) and High Performance redudancies across several Availability Zones and even several regions.
HashiCups leverages micro-services and Consul Service Mesh to connect components together securely in a way that satisfies “Zero Trust” principals.
All that means complexity to learn. So being comfortable installing and using HashiCups takes some time and cloud credits (if you’re not using Instruqt labs). But you’ll be learning a production-quality way to make use of the latest IT technologies.
My files in GitHub
The above is why here is where I put notes about integrating various HashiCorp products with utility software such as Kubernetes. Files for this topic is under my personal account:
- https://github.com/wilsonmar/hashicups
-
For use while going through a a class:
export SCRIPT="consul-server-install.sh" sh -c "$(curl -fsSL https://raw.githubusercontent.com/wilsonmar/hashicups/main/${SCRIPT})" -v
Doc & Tutorials
https://github.com/hashicorp/learn-consul-k8s-hashicups
https://github.com/hashicorp/field-demo-hashicups-sample
https://wilsonmar.github.io/hashicups/#hashicorps-codebase-for-hashicups
HashiCorp’s Codebase for HashiCups
Code to create an instance of Hashicups is (Apache 2) open-sourced at the GitHub Organization: https://github.com/hashicorp-demoapp
-
https://github.com/hashicorp-demoapp/hashicups-client-go
-
https://github.com/hashicorp-demoapp/frontend provides a React-based UI which makes GraphQL calls to the products-api backend
-
https://github.com/hashicorp-demoapp/product-api is the products-api backend which responds to GraphQL API calls
-
https://github.com/hashicorp-demoapp/product-api-go is the products-api backend which accesses the
-
https://github.com/hashicorp-demoapp/postgres database
-
https://github.com/hashicorp-demoapp/payments is the gRCP-based payments service which handles customer payments. This service is backed by a PostgreSQL database or a Redis queue.
SREs look at this regarding infrastructure:
-
https://github.com/hashicorp-demoapp/instruqt uses Shipyard data workflows https://shipyard.run/ referencing https://github.com/shipyard-run/shipyard to run Cloud Native Dev deployments on local environments (managing dependencies better than Docker Compose & Postman)
- https://github.com/hashicorp-demoapp/hashicups-setups
-
https://github.com/hashicorp-demoapp/infrastructure
-
https://github.com/hashicorp-demoapp/traffic-simulation by nicholas jackson is the code to https://hub.docker.com/repository/docker/hashicorpdemoapp/traffic-simulation
- https://github.com/hashicorp-demoapp/coffee-service is the code to https://hub.docker.com/r/hashicorpdemoapp/coffee-service
Its standard library of reusable abstractions (in Golang) uses Opentracing, Zipkin, Jaeger.
HashiStack
“HashiStack” is the nickname for an implementation that makes use of HashiCorp’s main products and associated utilities:
Component | Usage |
---|---|
Vagrant | Ansible. |
Terraform | Infrastructure as Code. |
Consul | Service Discovery. |
Vault | Secrets Management. |
Nomad | Applications Management. |
Docker | Applications Containerization. |
Dnsmasq | Internal Hostnames Resolution. |
Traefik | Reverse Proxy. |