Olivier Mauras 1783a6a923 Forgot to return after setting 550 html code 3 years ago
systemd Provide systemd unit file 3 years ago
LICENSE Update license 3 years ago
README.md Readme tweaks 3 years ago
app.go Add /host/accept function 3 years ago
config.toml Use a cleaner host_is_here() function with saner/more consistent function returns 3 years ago
functions.go Replace fetch_rudder_data() by get_body() and simplify calls in functions using it 3 years ago
groups.go Replace fetch_rudder_data() by get_body() and simplify calls in functions using it 3 years ago
hosts.go Forgot to return after setting 550 html code 3 years ago

README.md

Go Gateway for Rudder

A Go HTTP service that let's use the Rudder API with ease and minimal fuss.
It's particularly useful during OS provisioning - like %pre/%post part of a Kickstart, and this is where this project comes from - where you don't have much tools and/or dependencies available to do so.

Features

  • Support Rudder server over HTTPS
  • Can disable SSL verification and/or provide a root CA certificate
  • Groups:
    • Add hosts in Rudder groups
    • Automatically add regex if provided host contains the following characters: *[]|
  • Hosts:
    • Check if hostname is pending
    • Check if hostname exists
    • Get node uuid from hostname
    • Accept pending node from hostname
    • Add/delete properties

Usage

Groups:
curl -X POST http://localhost:8181/group/addHost -d "g_uuid=5af30b6b-c8cd-4405-9d0c-410c2b05e220&host=test.domain.com"

Hosts:
curl -X GET http://localhost:8181/host/isExist?host=test.domain.com
curl -X GET http://localhost:8181/host/isPending?host=test.domain.com
curl -X GET http://localhost:8181/host/getId?host=test.domain.com
curl -X POST http://localhost:8181/host/addProperty -d "host=demo-latest.rudder-project.org&key=KEY1&value=VALUE1"
curl -X POST http://localhost:8181/host/delProperty -d "host=demo-latest.rudder-project.org&key=KEY1"
curl -X POST http://localhost:8181/host/accept -d "host=demo-latest.rudder-project.org"

Available endpoints

  • /group
    • /addHost - Returns nothing if success
  • /host
    • /isExist - Returns true or false
    • /isPending - Returns true or false
    • /getId - Returns node uuid or None
    • /addProperties - Returns nothing if success
    • /delProperties - Returns nothing if success
    • /accept - Returns nothing if success

Known issue

  • None so far

Planned features

  • Support of other group options

License

Copyright 2015, Olivier Mauras

This project is governed by the 3-clause BSD license. For details see the file titled LICENSE in the project root folder.