[GitHub] brooklyn-client issue #29: Usability improvements and better catalog support
Github user neykov commented on the issue: https://github.com/apache/brooklyn-client/pull/29 Need to use "br catalog delete entity vanilla-bash-server:0.10.0-SNAPSHOT" which works. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-client issue #29: Usability improvements and better catalog support
Github user neykov commented on the issue: https://github.com/apache/brooklyn-client/pull/29 Tried deleting a catalog item and got an error: D:\Junk>br catalog delete vanilla-bash-server:0.10.0-SNAPSHOT command requires arguments TYPE ITEM_ID:VERSION --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-client issue #29: Usability improvements and better catalog support
Github user geomacy commented on the issue: https://github.com/apache/brooklyn-client/pull/29 Docs updates are in https://github.com/apache/brooklyn-docs/pull/118. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-client issue #29: Usability improvements
Github user geomacy commented on the issue: https://github.com/apache/brooklyn-client/pull/29 Update: catalog list and delete now take arguments as such, rather than as flags. Args are from `( application | entity | location | policy ) ` and may be abbreviated: ``` br catalog list app Id | Name | Description CassandraDatacenter:4.1.0-SNAPSHOT | Cassandra Datacenter | A group of CassandraNodes -- based on Brooklyn's DynamicCluster The Datacenter can be resized, manually or by policy if required. Tokens are selected intelligently. ... ``` Tables are now displayed with each row on a single line, and with vertical bar separators for ease of scripting with e.g. `cut -f 1 -d'|'`. `add-catalog` is restored for backwards compatibility but is marked deprecated in its help text. Help texts no longer refer to `BROOKLYN_NAME`. Better error messages when file arguments are not found or url arguments give a 404 or other error: ``` $ br deploy http://example.com/foo/bar Error retrieving http://example.com/foo/bar (404 Not Found) ``` `br tree` fixed Regarding `locations` versus `catalog locations`, they aren't quite the same thing - the former is API call `/v1/locations` and lists all known locations including from brooklyn.properties, the latter is `/v1/catalog/locations` and lists specifically `brooklyn.catalog` locations. brooklyn-docs changes on the way. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-client issue #29: Usability improvements
Github user geomacy commented on the issue: https://github.com/apache/brooklyn-client/pull/29 Re. scripting the output of tables: I've replaced newlines so they all come out one per line (PR shortly) but you can't use tab characters as that will throw off the line length calculations. Space character is also not helpful as some applications contains spaces in the name e.g. `ElasticSearch Node:4.1.0-SNAPSHOT`. I have therefore added a vertical bar separator, so you can do `cut -f 1 -d '|'`. e.g. ``` Id | Name | Description amp-qa-framework:1.0.0-SNAPSHOT | AMP QA Framework | Deploys all th... ca-server-template:2.1.0-SNAPSHOT | Certificate Authority Server | An X.509 Certi... docker-and-swarm-engine-tests:2.1.0-SNAPSHOT| Docker Engine and Swarm Tests| Tests on Docke... docker-engine-template:2.1.0-SNAPSHOT | Docker Engine | Creates a sing... docker-swarm-template:2.1.0-SNAPSHOT| Docker Swarm with Discovery and CA | Creates a Swar... etcd-cluster-template:2.3.0-SNAPSHOT| etcd-cluster | A cluster of e... haproxy-load-balancer-template:2.1.0-SNAPSHOT | HAProxy Load Balancer | HAProxy load b... ``` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-client issue #29: Usability improvements
Github user geomacy commented on the issue: https://github.com/apache/brooklyn-client/pull/29 Note, regarding 'locations' versus 'catalog locations', the former is API call /v1/locations and lists all known locations including from brooklyn.properties, the latter is /v1/catalog/locations and lists specifically `brooklyn.catalog` locations. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-client issue #29: Usability improvements
Github user geomacy commented on the issue: https://github.com/apache/brooklyn-client/pull/29 Thanks for the comments @neykov, @drigodwin. Some notes below, where if I haven't commented on a point I will just make the changes suggested. - How do I discover the -a, -l, etc. flags? On its own `catalog` gives you ``` $ br catalog 'catalog' requires one of (list | add | delete) ``` and help text for `catalog list` gives ``` $ br catalog list --help NAME: list - * List the available catalog applications USAGE: BROOKLYN_NAME catalog list OPTIONS: --applications, -a list applications (default) --entities, -e list entities --locations, -l list locations --policies, -p list policies ``` I though about `catalog list` _not_ defaulting to applications, but I think it's better for it to do so. - Can you keep the old way of doing things for a release (with a deprecation warning) - I'll update so deprecated command are retained but marked as deprecated in their help text. - Can't combine -a, -l flags, only first one is used. If that's the intended behaviour then would it be better if we promote the flags to keywords? - It is deliberate, I have a _slight_ preference toward this rather than listing multiple things at once, but don't feel strongly about it. The long form does exist, e.g. --locations, I thought it was maybe handy to have the short form too. - Nice yaml validation with line numbers :) - This is just coming from the REST API, I am just passing the error message through now. - Can you update the docs (http://brooklyn.apache.org/v/latest/ops/cli/cli-ref-guide.html and elsewhere?) - Will do, wanted to get the form of this fixed first. - When listing catalog items some of the descriptions contain new lines, getting in the way of scripting the output. Either replacing the separator with tabs or forcing no line breaks (i.e. replacing them with space) ... - I'll replace newlines - re `br tree` I have created https://issues.apache.org/jira/browse/BROOKLYN-365 - Would it be worth keeping both add and add-catalog and depreciating the latter rather than just removing it? This will presumably break a few scripts round the place. - will do --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-client issue #29: Usability improvements
Github user neykov commented on the issue: https://github.com/apache/brooklyn-client/pull/29 Probably not related, but including it just in case. Shall I create a Jira issue for it? ``` $ ./br tree json: cannot unmarshal object into Go value of type string ``` ``` curl /v1/applications/fetch ``` ``` > GET /v1/applications/fetch HTTP/1.1 > Host: 10.102.0.127:8081 > Authorization: Basic YWRtaW46YWRtaW4= > User-Agent: curl/7.49.1 > Accept: */* > < HTTP/1.1 200 OK < Date: Mon, 17 Oct 2016 11:01:59 GMT < Content-Type: application/json < Date: Mon, 17 Oct 2016 11:01:59 GMT < Cache-Control: no-cache, no-store < Pragma: no-cache < Expires: 0 < Transfer-Encoding: chunked < Server: Jetty(9.2.14.v20151106) < [{"applicationId":"eunpswlau5","id":"eunpswlau5","parentId":null,"name":"Kubernetes Cluster","type":"org.apache.brooklyn.entity.stock.BasicApplication","serviceUp":false,"serviceState":"ON_FIRE","iconUrl":null,"catalogItemId":"kubernetes-cluster-template:2.1.0-SNAPSHOT","children":[{"applicationId":"eunpswlau5","id":"uitb7mwoc3","parentId":"eunpswlau5","name":"brooklyn-dns-etc-hosts-generator","type":"org.apache.brooklyn.entity.group.DynamicGroup","serviceUp":true,"serviceState":"ON_FIRE","iconUrl":null,"catalogItemId":"kubernetes-hosts-file-generator:2.1.0-SNAPSHOT","groupIds":[],"members":[{"id":"p258is94l3","name":"kubernetes-worker"},{"id":"i7nbg3wcy6","name":"kubernetes-worker"},{"id":"rpma8i6jwv","name":"kubernetes-worker"},{"id":"yb9ormexqm","name":"kubernetes-worker"},{"id":"knizluegbo","name":"kubernetes-master"},{"id":"zpjsahz7c0","name":"kubernetes-worker"},{"id":"k6omxyzjz0","name":"kubernetes-worker"},{"id":"gdk5ykst33","name":"kubernetes-master"},{"id":"siuxazzl2q", "name":"kubernetes-master"}],"links":{}},{"applicationId":"eunpswlau5","id":"d2tq19u43n","parentId":"eunpswlau5","name":"ca-server","type":"org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess","serviceUp":true,"serviceState":"RUNNING","iconUrl":null,"catalogItemId":"ca-server:2.1.0-SNAPSHOT","groupIds":[],"members":[],"links":{}},{"applicationId":"eunpswlau5","id":"aarvqwg9y9","parentId":"eunpswlau5","name":"etcd-cluster","type":"io.brooklyn.entity.nosql.etcd.EtcdCluster","serviceUp":true,"serviceState":"RUNNING","iconUrl":"https://s3.amazonaws.com/cloud.ohloh.net/attachments/85177/etcd-glyph-color_med.png","catalogItemId":"etcd-cluster:2.3.0-SNAPSHOT","children":[{"applicationId":"eunpswlau5","id":"v84vbtcry4","parentId":"aarvqwg9y9","name":"quarantine","type":"org.apache.brooklyn.entity.group.QuarantineGroup","serviceUp":null,"serviceState":null,"iconUrl":null,"catalogItemId":"etcd-cluster:2.3.0-SNAPSHOT","groupIds":[],"members":[],"links":{}},{"applicationId":"eunpswl au5","id":"q25xpqd9aw","parentId":"aarvqwg9y9","name":"etcd-node","type":"io.brooklyn.entity.nosql.etcd.EtcdNode","serviceUp":true,"serviceState":"RUNNING","iconUrl":null,"catalogItemId":"etcd-node:2.3.0-SNAPSHOT","groupIds":["aarvqwg9y9"],"members":[],"links":{}},{"applicationId":"eunpswlau5","id":"opi6njsvdj","parentId":"aarvqwg9y9","name":"etcd-node","type":"io.brooklyn.entity.nosql.etcd.EtcdNode","serviceUp":true,"serviceState":"RUNNING","iconUrl":null,"catalogItemId":"etcd-node:2.3.0-SNAPSHOT","groupIds":["aarvqwg9y9"],"members":[],"links":{}},{"applicationId":"eunpswlau5","id":"ezmg4er53l","parentId":"aarvqwg9y9","name":"etcd-node","type":"io.brooklyn.entity.nosql.etcd.EtcdNode","serviceUp":true,"serviceState":"RUNNING","iconUrl":null,"catalogItemId":"etcd-node:2.3.0-SNAPSHOT","groupIds":["aarvqwg9y9"],"members":[],"links":{}}],"groupIds":[],"members":[{"id":"q25xpqd9aw","name":"etcd-node"},{"id":"opi6njsvdj","name":"etcd-node"},{"id":"ezmg4er53l","name":"etcd-node"}],"links": {}},{"applicationId":"eunpswlau5","id":"sum00mmq3f","parentId":"eunpswlau5","name":"kubernetes-cluster","type":"org.apache.brooklyn.entity.stock.BasicStartable","serviceUp":null,"serviceState":"ON_FIRE","iconUrl":null,"catalogItemId":"kubernetes-cluster:2.1.0-SNAPSHOT","children":[{"applicationId":"eunpswlau5","id":"vacguay31u","parentId":"sum00mmq3f","name":"kubernetes-manager-load-balancer","type":"org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess","serviceUp":true,"serviceState":"RUNNING","iconUrl":null,"catalogItemId":"haproxy-load-balancer:2.1.0-SNAPSHOT","groupIds":[],"members":[],"links":{}},{"applicationId":"eunpswlau5","id":"l14tkh4065","parentId":"sum00mmq3f","name":"kubernetes-master-cluster","type":"org.apache.brooklyn.entity.group.DynamicCluster","serviceUp":true,"serviceState":"ON_FIRE","iconUrl":null,"catalogItemId":"kubernetes-cluster:2.1.0-SNAPSHOT","children":[{"applicationId":"eunpswlau5","id":"l2lpi004qv","parentId":"l14tkh4065","name":"quarantine",
[GitHub] brooklyn-client issue #29: Usability improvements
Github user neykov commented on the issue: https://github.com/apache/brooklyn-client/pull/29 * `catalog add ` will pass through the content even for 404 URLs --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] brooklyn-client issue #29: Usability improvements
Github user neykov commented on the issue: https://github.com/apache/brooklyn-client/pull/29 I've built the changes and currently testing them. Here are some comments: * How do I discover the `-a, -l`, etc. flags? * Can you keep the old way of doing things for a release (with a deprecation warning) * Can't combine `-a`, `-l` flags, only first one is used. If that's the intended behaviour then would it be better if we promote the flags to keywords? * Nice yaml validation with line numbers :) * Can you add a message before the listing of added items, something in the lines of "Successfully added xxx items to the catalog" * Can you update the docs (http://brooklyn.apache.org/v/latest/ops/cli/cli-ref-guide.html and elsewhere?) * When listing catalog items some of the descriptions contain new lines, getting in the way of scripting the output. Either replacing the separator with tabs or forcing no line breaks (i.e. replacing them with space) would help in this regard. Used this to filter unwanted lines which btw is a huge improvements - `./br catalog list -e | cut -f1 -d' ' | grep ':' | xargs -n1 ./br catalog delete` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---