https://github.com/fredwangwang/bosh-plugin
Plugin Manager Bosh release enables hosting simple tasks outside of cloud foundry
https://github.com/fredwangwang/bosh-plugin
bosh plugin-manager
Last synced: about 1 year ago
JSON representation
Plugin Manager Bosh release enables hosting simple tasks outside of cloud foundry
- Host: GitHub
- URL: https://github.com/fredwangwang/bosh-plugin
- Owner: fredwangwang
- License: mit
- Created: 2019-08-16T15:14:52.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-19T00:31:32.000Z (almost 7 years ago)
- Last Synced: 2025-02-05T05:22:55.467Z (over 1 year ago)
- Topics: bosh, plugin-manager
- Language: Go
- Homepage:
- Size: 3.51 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## What
Plugin manager is a lightweight application (plugin) hosting platform enables running small workload
outside of cloud foundry without creating dedicated vms for each workload.
## API
Note: all the api endpoints under `/api/v1` require authentication
- GET `/health` health check endpoint for plugin manager, returns HTTP 200
- GET `/api/v1/plugins` list all plugins currently installed
```
$ curl -H "Authorization: $(cf oauth-token) https://host:port/api/v1/plugins"
[
{
"Name": "sample-plugin",
"Description": "description for sample plugin!",
"Location": "sample-plugin",
"Enabled": true,
"Env": {
"PORT": "4321"
},
"Arg": [
"thisisanexample"
],
"AdditionalEnv": {
"METRON_CA_CERT_PATH": "/var/vcap/jobs/sample-plugin/config/metron_ca_cert.pem",
"METRON_CERT_PATH": "/var/vcap/jobs/sample-plugin/config/metron_cert.pem",
"METRON_KEY_PATH": "/var/vcap/jobs/sample-plugin/config/metron_cert.key"
},
"PendingEnv": {}
}
]
```
- POST `/api/v1/plugins` upload the plugin to plugin manager and enable the plugin
```
$ curl -H "Authorization: $(cf oauth-token)" -F 'file=@example/sample-plugin.zip' https://host:port/api/v1/plugins
{"message":"plugin uploaded successfully"}
```
- GET `/api/v1/plugins/:name` get the details of a plugin
- PATCH `/api/v1/plugins/:name` update configuration (environment variable) for the plugin
```
curl -H "Authorization: $(cf oauth-token)" -X PATCH https://host:port/api/v1/plugins/sample-plugin?GREETING=hi
"config applied, need to disable/enable the plugin to see the effect"
```
- DELETE `/api/v1/plugins/:name` delete the plugin from plugin-manager
- POST `/api/v1/plugins/:name/enable` enable the plugin
- POST `/api/v1/plugins/:name/disable` disable the plugin
## Reference:
BOSH VM: https://bosh.io/docs/vm-config/
BPM: https://github.com/cloudfoundry/bpm-release/blob/master/docs/config.md
Monit: https://mmonit.com/monit/documentation/monit.html