Skip to content

Instantly share code, notes, and snippets.

@wkalt
Created September 25, 2014 00:05
Show Gist options
  • Select an option

  • Save wkalt/e18a03a6a8446ced1f5e to your computer and use it in GitHub Desktop.

Select an option

Save wkalt/e18a03a6a8446ced1f5e to your computer and use it in GitHub Desktop.
curl -X PUT -H 'Content-Type: application/json' \
-d '{ "name": "apache",
"environment": "production",
"parameters": {
"confd_dir": "/etc/apache2",
"mod_dir": "/etc/apache2/mods-available",
"logroot": "/var/log/apache2"
}
}' \
--key ./dev-resources/ssl/key.pem --cert ./dev-resources/ssl/cert.pem -k \
https://localhost:1262/classifier/v1/environments/production/classes/apache
curl -X PUT -H 'Content-Type: application/json' \
-d '{
"id": "ddab2071-26ea-4261-af09-7b6b97fa04c2",
"name": "webservers",
"environment": "production",
"parent": "00000000-0000-4000-8000-000000000000",
"rule": ["~", "name", "\\.www\\.example\\.com$"],
"classes": {
"apache": {
"confd_dir": "/opt/mywebapp/etc/apache2",
"logroot": "/opt/mywebapp/log"
}
}
}' \
--key ./dev-resources/ssl/key.pem --cert ./dev-resources/ssl/cert.pem -k \
https://localhost:1262/classifier/v1/groups/ddab2071-26ea-4261-af09-7b6b97fa04c2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment