Skip to content

A tool to build, deploy, and release any application on any platform.

License

Notifications You must be signed in to change notification settings

markpundsack/waypoint

Repository files navigation

Waypoint

Waypoint is a tool for deploying applications and services to any target. With Waypoint's predictable and uncomplicated workflow, you can deploy your code without spending days understanding how to interface with various endpoints.

Running Waypoint on Docker Desktop for Mac with Kubernetes

  1. Install and configure Docker Desktop for Kubernetes.
    1. Download and install Docker Desktop for Mac: https://docs.docker.com/docker-for-mac/install/
    2. Enable Kubernetes in Docker Desktop. It may take up to 5 minutes for Docker to apply your changes. Docker will restart and create a Kubernetes cluster. Image of Kubernetes Settings
  2. Configure Kubernetes to access the GitHub Docker registry.
    1. Create a personal access token on GitHub: https://github.com/settings/tokens/new
    2. Configure Docker to authenticate to GitHub Packages: https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages#authenticating-to-github-packages
    3. Add your personal access token to the Docker: kubectl create secret docker-registry github --docker-server=docker.pkg.github.com --docker-username=my-github-username --docker-password=my-github-personal-access-token --docker-email=my-github-email-address
  3. Download or build Waypoint. Note: Be sure to add Waypoint to your $PATH.
    • To use the compiled version:
      1. Clone the Waypoint repository by using http. You will need to use configuration files and a test app from the Waypoint repository to complete this tutorial.
      2. Download the binary here: https://github.com/hashicorp/waypoint/releases/download/v0.1.0/waypoint-darwin-0.1.0.zip
      3. Extract the binary to a location outside of Downloads, such as ~/enlistments/waypoint/.
    • To build Waypoint:
      1. Clone the Waypoint repository by using http.
      2. In the Terminal, navigate to the waypoint folder and run make bin
  4. Install the Waypoint server into your Kubernetes cluster.
    1. Install the Waypoint server: waypoint install The installation will download the server's Docker image.
    2. Once the installation is complete, verify that the server is running: kubectl get pod -l app=waypoint-server
    • The server's pod status should be Running.
    • If the pod status is ImagePullBackOff, your Docker registry access token is incorrect. Review step 2 to verify that you have properly set up your registry secret.
  5. In the Terminal, navigate to the test-apps/wpmini Waypoint directory.
  6. Initialize the wpmini app with Waypoint: waypoint init
  7. Use Waypoint to build the wpmini app: waypoint build
  8. Deploy the app with Waypoint: waypoint deploy
    • TODO: Make Ctrl-C cancel the deploy properly if waiting on the pods to start.
  9. Verify that the app is running: curl localhost:8080
    • The output should read, Welcome to Waypoint!
  10. View the Waypoint logs to see requests for the app and the app's heartbeat: waypoint logs
  11. Update the app's config to learn how it is constructed.
    1. Run waypoint config set NAME=my-name Note: NAME must be capitalized.
    2. Run waypoint deploy
    3. Run curl localhost:8080
    • The new response will read: "Hello your-selected-name, Welcome to Waypoint!"
  12. Access the app with the Waypoint URL Service.
    1. Register a hostname by executing waypoint hostname register (no args or flags)
    2. Access the domain that is output in the previous step curl https://<domain>

Add Waypoint to Your Path

You will want to add Waypoint to your $PATH to use the waypoint command without always needing to include the full directory path.

  1. Run echo $PATH to see what is in your current $PATH definition. If you do not have an entry for the Waypoint binary, add the following line to your shell profile: export PATH=$PATH:my-directory-path-to-waypoint-binary For example: export PATH=$PATH:~/enlistments/waypoint
  • To determine which shell you use, run echo $SHELL
  • If using Bash, use nano ~/.bash_profile to edit your Bash profile.
  • If using ZSH, use nano ~/.zshrc to edit your ZSH profile.

About

A tool to build, deploy, and release any application on any platform.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 79.5%
  • JavaScript 9.7%
  • TypeScript 2.9%
  • Handlebars 2.9%
  • SCSS 2.2%
  • CSS 1.6%
  • Other 1.2%