No description
  • Go 86.7%
  • Makefile 5.9%
  • Shell 5.7%
  • Dockerfile 1%
  • HCL 0.7%
Find a file
2023-03-09 13:44:11 -08:00
.github Add default codeowner 2023-03-09 13:25:26 -08:00
plugins [COMPLIANCE] Add Copyright and License Headers 2022-12-12 18:29:22 +00:00
template [COMPLIANCE] Add Copyright and License Headers 2022-12-12 18:29:22 +00:00
.gitignore Updated template for clone 2020-10-21 14:10:11 +01:00
go.mod Upgrade top level go.mod 2021-10-20 09:42:12 -07:00
go.sum Upgrade top level go.mod 2021-10-20 09:42:12 -07:00
LICENSE [COMPLIANCE] Add MPL 2.0 LICENSE 2022-10-11 23:23:38 +00:00
README.md Adding Seaplane community plugin 2023-02-16 13:31:16 -08:00

waypoint-plugin-examples

Example external plugins for Waypoint

For a full guide on building plugins with Waypoint please see the Extending Waypoint documentation

Plugin Template

This template can be used to scaffold new Waypoint plugins. All the main Waypoint components and interfaces are implemented in this sample.

Go Builder Plugin

This plugin is the final example code from the plugin development guide in the Waypoint documentation.

Filepath Plugin

Plugin which implements Registry, Platform, and ReleaseManager which interacts with the local file system

Running the Sample App

  1. Build the sample plugins

This command will build the plugins and move them to the ./plugins/example_app/.waypoint/plugins folder

cd plugins
make

### Build Go Builder Plugin
make -C gobuilder_final
make[1]: Entering directory '/home/nicj/go/src/github.com/hashicorp/waypoint-plugin-examples/plugins/gobuilder_final'

Build Protos
protoc -I . --go_out=plugins=grpc:. --go_opt=paths=source_relative ./builder/output.proto

Compile Plugin
go build -o ./bin/waypoint-plugin-gobuilder ./main.go 
make[1]: Leaving directory '/home/nicj/go/src/github.com/hashicorp/waypoint-plugin-examples/plugins/gobuilder_final'


### Build Filepath Builder Plugin
make -C filepath
make[1]: Entering directory '/home/nicj/go/src/github.com/hashicorp/waypoint-plugin-examples/plugins/filepath'
protoc -I . --go_out=plugins=grpc:. --go_opt=paths=source_relative ./registry/output.proto
protoc -I . --go_out=plugins=grpc:. --go_opt=paths=source_relative ./platform/output.proto
protoc -I . --go_out=plugins=grpc:. --go_opt=paths=source_relative ./release/output.proto
make[1]: Leaving directory '/home/nicj/go/src/github.com/hashicorp/waypoint-plugin-examples/plugins/filepath'


### Install Plugins
mkdir -p ./example_app/.waypoint/plugins
cp ./gobuilder_final/bin/* ./example_app/.waypoint/plugins
cp ./filepath/bin/* ./example_app/.waypoint/plugins

The ./plugins/example_app folder has a simple Golang application and the following Waypoint file

project = "custom-waypoint-plugin"

app "example" {

  build {
    use "gobuilder" {
      output_name = "app"
      source = "./"
    }

    registry {
      use "filepath" {
        directory = "./bin"
      }
    }
  }

  deploy {
    use "filepath" {
      directory = "./deployments"
    }
  }

  release {
    use "filepath" {}
  }
}

You can build the application using the following command:

cd ./example_app

waypoint init
✓ Configuration file appears valid
✓ Local mode initialized successfully
✓ Project "guides" and all apps are registered with the server.
✓ Plugins loaded and configured successfully
✓ Authentication requirements appear satisfied.

Project initialized!

You may now call 'waypoint up' to deploy your project or
commands such as 'waypoint build' to perform steps individually.

And then:

waypoint init
waypoint up

» Building example...
✓ Application built successfully
✓ Application binary pushed to registry

» Deploying example...
✓ Created deployment deployments/app.1.deployment

✓ File is ready!

» Releasing example...
✓ Created release deployments/release

✓ Symlink to File is ready!

The deploy was successful! A Waypoint deployment URL is shown below. This
can be used internally to check your deployment and is not meant for external
traffic. You can manage this hostname using "waypoint hostname."

   Release URL: deployments/release
Deployment URL: https://seemingly-settled-weevil--v20.waypoint.run

Community Built Plugins

Here are a list of plugins which have been created by folks within the Waypoint community.

Adding a plugin

If you are creating a plugin and would like to be featured on this list please submit a PR and add your plugin to the list above using the following format.

- [organization/Plugin Name](url to plugin repository) - Brief description of plugin