BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News HashiCorp Waypoint Adds Triggers and External Data Fetching

HashiCorp Waypoint Adds Triggers and External Data Fetching

This item in japanese

HashiCorp has released version 0.7 of Waypoint, their open-source application deployment tool. This release presents a number of redesigns to the user interface, the introduction of scripting and continuous integration lifecycle operations via triggers, external data fetching, and scoping of configurations to specific workspaces.

The goal of Waypoint is to provide a consistent abstraction of the underlying infrastructure for handling deployment, operations, and observability of running applications. Waypoint has first party support for Docker, Kubernetes, AWS ECS, and AWS Lambda.

Triggers are able to execute specific Waypoint operations for a specific project when triggered. This includes operations such as deploying the latest build, running a status report on all applications within a project, or running waypoint up on all apps in a project. With this release triggers are only supported via the gRPC library, a future release will support running them via HTTP.

Trigger URLs can be invoked within the environment using a gRPC request. For example, the following creates a trigger URL to deploy the latest artifact to the production workspace:

$ waypoint trigger create \
     -project=hcp-packer \
     -app=backend-svc \
     -workspace=production \
     -name=deploy-latest \
     -op=deploy
Trigger "deploy-latest" (123ABC456DEF) has been created
Trigger ID: 123ABC456DEF

When setting up a trigger the correct project, application, and workspace need to be specified. Note that these are validated at execution time, not creation time. If necessary, an existing trigger can be modified via waypoint trigger update. When a trigger is created, the trigger ID is returned which can then be used to execute the trigger via gRPC:

$ grpcurl -d '{"ref": {"id": "123ABC456DEF"}}' -H "Authorization: `waypoint user token`" waypoint.server.address hashicorp.waypoint.Waypoint/RunTrigger

The release also delivers a number of UI improvements including a dropdown for environment selection, updated icons, and a new timeline view for build, deploy, and release actions. In addition the UI now supports OpenID Connect (OIDC) login flows.

Waypoint's new timeline view

Waypoint's new timeline view (credit: HashiCorp)

 

Included with these improvements is the ability to run waypoint exec within the UI. This allows for commands to be run during a deployment. Potential use cases of this include troubleshooting, executing database migrations, or validating application configuration.

The new Exec tab in the Waypoint UI

The new Exec tab in the Waypoint UI (credit: HashiCorp)

 

With this release it is now possible to fetch data from external sources such as Vault, Terraform Cloud, Kubernetes ConfigMaps, or AWS Secrets Manager. This data can be incorporated directly into the waypoint.hcl file instead of having it hardcoded. For example, AWS ACM certificate ARNs can be sourced directly from a Terraform Cloud output value:

variable "acm-cert-arn" {
 type    = string
 default = dynamic("terraform-cloud", {
   organization = "dadgarcorp"
   workspace = "ws-6fIaMNotRealXSQUv"
   output  = "aws_cert_arn"
 })
}

release {
 use "kubernetes" {
   load_balancer = true
   annotations = {
      "service.beta.kubernetes.io/aws-load-balancer-ssl-cert" = var.acm-cert-arn
   }
 }
}

Workspaces also get an improvement in this release. It is now possible to alter the plugin configuration based on the active workspace. This allows for adjusting plugin types based on deployment environment; such as using Docker for development and Kubernetes for production.

The team notes that future releases should include additional workflow improvements for handling multiple deployment environments. Waypoint is open-source under the Mozilla Public License 2.0. More details on the changes in this release can be found on the HashiCorp blog.

About the Author

Rate this Article

Adoption
Style

BT