Waypoint includes several commands to support debugging and monitoring your application through the CLI as well as viewing information about projects and applications in the web UI.
In this tutorial, you will learn how to interact with your applications, view logs, and access the Waypoint UI.
You can use
waypoint exec to run commands in the context of the most recent deployment. This command is helpful in diagnosing tasks like database migrations and general debugging but you can use it for any purpose.
HCP Waypoint does not currently support the
exec functionality. It is only available when running self-managed Waypoint servers.
Open a shell prompt to the application's container. Waypoint is aware that a
waypoint.hcl file exists in the current directory and automatically executes against the currently deployed application defined in this configuration file. Your terminal prompt will change to show that you are in the application's container. In this example, the prompt is
$ waypoint exec /bin/bash Connected to deployment v1 heroku@77399d60b8f2:/workspace$
Validate that this is the correct application deployment by listing out the directory hosting the application's compiled files. Note that the output contains the file structure for the current deployment.
$ cd / && ls alloc bin cnb etc layers lib32 libx32 media opt root sbin srv tmp var workspace app boot dev home lib lib64 local mnt proc run secrets sys usr waypoint-entrypoint
Next, list the processes that are running in the container. Note that
node is running the
index.js for the example application.
$ ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND heroku 1 0.3 1.0 4987960 68688 ? Ssl 20:10 0:00 /waypoint-entrypoint /cnb/process/web heroku 18 0.3 0.6 720652 40708 ? Sl 20:10 0:00 npm heroku 35 0.0 0.0 2620 596 ? S 20:10 0:00 sh -c node index.js heroku 36 0.2 0.5 555288 37692 ? Sl 20:10 0:00 node index.js heroku 43 0.0 0.0 4248 3516 pts/0 Ss 20:11 0:00 /bin/bash heroku 46 0.0 0.0 5900 2856 pts/0 R+ 20:12 0:00 ps aux
Finally, exit the interactive Docker session.
In the application's directory, view the logs for the running deployment.
$ waypoint logs # ... 2023-04-19T20:10:50.173Z 0G500W: [INFO] entrypoint.child: starting child process: args=["/cnb/process/web"] cmd=/cnb/process/web 2023-04-19T20:10:50.435Z 0G500W: 2023-04-19T20:10:50.435Z 0G500W: > firstname.lastname@example.org start /workspace 2023-04-19T20:10:50.435Z 0G500W: > node index.js 2023-04-19T20:10:50.435Z 0G500W: 2023-04-19T20:10:50.575Z 0G500W: Listening on 3000
Ctrl-C to stop viewing the logs.
The Waypoint server includes a web-based user interface that you can use to view builds, deployments, and releases for projects and applications.
Review information about the application and associated operations in your browser by clicking on the project name, and then the application name. The navigation bar below the application name includes views for builds, deployments, logs, releases and an in-browser shell that replicates the
In this tutorial, you learned about the
waypoint exec command and browsed the Waypoint web UI.
Continue on to the Destroy the Deployment tutorial to uninstall the Waypoint components.