Accessing a REST API without the proper tools is often bothersome, especially when you only have a shell and curl at hand - like in a kickstart %post part - and parsing JSON replies or building parameters can quickly become a mess.
g2rudder is here to help you cope with that issue in the form of a gateway written in Go that let's you use Rudder's API easily in a consistent way.
- Support Rudder server over HTTPS
- Can disable SSL verification and/or provide a root CA certificate
- Add hosts in Rudder groups
- Automatically add regex if provided host contains the following characters:
- Check if hostname is pending
- Check if hostname exists
- Get node uuid from hostname
- Accept pending node from hostname
- Add/delete properties
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"
Project readme will be updated along with the addition of new features.
Don't hesitate to contact me if you encounter any issue.