Giter Club home page Giter Club logo

waypoint-plugin-examples's Introduction

waypoint-plugin-examples

Example external plugins for Waypoint

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

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

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

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

waypoint-plugin-examples's People

Contributors

alikefia avatar briancain avatar calebalbers avatar demophoon avatar evanphx avatar fokkedekker avatar hashicorp-copywrite[bot] avatar krantzinator avatar lucywyman avatar nicholasjackson avatar nsdavidson avatar paladin-devops avatar remyleone avatar spencergilbert avatar xsaamiir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

waypoint-plugin-examples's Issues

build using docker in template link to musl

Describe the bug
The make docker command to build using docker and the Dockerfile produces builds that link to musl.
This make the binaries not working when using them with waypoint on a system that does not have musl as libc.

Steps to Reproduce

  • Download the linux build that is produced by this build in a plugin, for example cloudfoundry
  • file the binary
 ○ file waypoint-plugin-cloudfoundry
waypoint-plugin-cloudfoundry: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, Go BuildID=6AVyHUccoYweMVdpx9Ry/VkjT6-P2icj3imeXHyBd/XqYh8sw7MfBJRfNvR5iX/87-ju-GqBf5OD4Rr1iYh, not stripped

Expected behavior
The produced binaries should not dynamically link to alpine's libc

Additional context
I solved it on scaleway's side by adding CGO_ENABLED=0 when building binaries

filepath plugin deploy will remove all file in ./deployment directory after 3 times deploy

Describe the bug
filepath deploy will remove all file in ./deployment directory after 3 times waypoint deploy

Steps to Reproduce
3 times waypoint deploy

Please include any waypoint.hcl files if applicable, as well as a
GitHub Gist of any relevant logs or steps to
reproduce the bug. Running waypoint commands with -v up to -vvv will
include any additional debugging info in the log.

Expected behavior
A clear and concise description of what you expected to happen.

Waypoint Platform Versions
Additional version and platform information to help triage the issue if
applicable:

  • Waypoint CLI Version:
  • Waypoint Server Platform and Version: (like docker, nomad, kubernetes)
  • Waypoint Plugin: (like aws/ecs, pack, azure)

Additional context
Add any other context about the problem here.

image

create-release action in plugin template is deprecated

Describe the bug
The create-release action that is being used in the template's workflow is getting deprecated soon.

Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

test

  • Make this an issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.