openzipkin / openzipkin.github.io

content for https://zipkin.io
https://zipkin.io
Apache License 2.0
38 stars 63 forks source link

Quickstart/improvements #114

Closed abesto closed 5 years ago

abesto commented 5 years ago

Best part of being on vacation is I get to not feel guilty for tricking out shell scripts.

This PR makes the output of quickstart.sh more human-friendly, I think, by adding colors and slightly more words. Also, it fixes warnings issued by shellcheck.

Since this is a UI change (HAH!), below are some screenshots. First, one from a “perfect” run:

2018-08-31-133538_1819x1226

Here's one with a few warnings:

2018-08-31-134503_1823x1231

And here's one that fails due to PEBKAC:

2018-08-31-133820_1727x654

codefromthecrypt commented 5 years ago

yep probably better example is scribe

On Fri, Aug 31, 2018 at 7:40 PM Zoltán Nagy notifications@github.com wrote:

@abesto commented on this pull request.

In quickstart.sh https://github.com/openzipkin/openzipkin.github.io/pull/114#discussion_r214326520 :

Downloads the "VERSION" version of GROUP:ARTIFACT with classifier "CLASSIFIER" to path "TARGET" on the local file system. "VERSION" can take the special value "LATEST", in which case the latest Zipkin release will be used. For example:

-$0 io.zipkin.java:zipkin-autoconfigure-collector-kafka10:LATEST:module kafka10.jar

The kafka10 collector seems to be dead (?), so updating this seems to make sense.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openzipkin/openzipkin.github.io/pull/114#pullrequestreview-151360068, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD615hEp2XPvWhgQIaoAcMi7eaKzGG0ks5uWSCsgaJpZM4WVEdS .

abesto commented 5 years ago

Your wish is my command.

codefromthecrypt commented 5 years ago

thank you for all the informative commits! I shall rebase them so history becomes a good shell teacher!

marcingrzejszczak commented 5 years ago

I've executed curl -sSLv https://zipkin.io/quickstart.sh | bash -sx and I got the following output

13:23:10 *   Trying 104.31.81.89...
13:23:10 * TCP_NODELAY set
13:23:10 * Connected to zipkin.io (104.31.81.89) port 443 (#0)
13:23:10 * ALPN, offering h2
13:23:10 * ALPN, offering http/1.1
13:23:10 * successfully set certificate verify locations:
13:23:10 *   CAfile: /etc/ssl/certs/ca-certificates.crt
13:23:10   CApath: /etc/ssl/certs
13:23:10 } [5 bytes data]
13:23:10 * TLSv1.2 (OUT), TLS handshake, Client hello (1):
13:23:10 } [207 bytes data]
13:23:10 * TLSv1.2 (IN), TLS handshake, Server hello (2):
13:23:10 { [100 bytes data]
13:23:10 * TLSv1.2 (IN), TLS handshake, Certificate (11):
13:23:10 { [4889 bytes data]
13:23:10 * TLSv1.2 (IN), TLS handshake, Server key exchange (12):
13:23:10 { [115 bytes data]
13:23:10 * TLSv1.2 (IN), TLS handshake, Server finished (14):
13:23:10 { [4 bytes data]
13:23:10 * TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
13:23:10 } [37 bytes data]
13:23:10 * TLSv1.2 (OUT), TLS change cipher, Client hello (1):
13:23:10 } [1 bytes data]
13:23:10 * TLSv1.2 (OUT), TLS handshake, Finished (20):
13:23:10 } [16 bytes data]
13:23:10 * TLSv1.2 (IN), TLS handshake, Finished (20):
13:23:10 { [16 bytes data]
13:23:10 * SSL connection using TLSv1.2 / ECDHE-ECDSA-CHACHA20-POLY1305
13:23:10 * ALPN, server accepted to use h2
13:23:10 * Server certificate:
13:23:10 *  subject: OU=Domain Control Validated; OU=PositiveSSL Multi-Domain; CN=sni231464.cloudflaressl.com
13:23:10 *  start date: Sep  4 00:00:00 2018 GMT
13:23:10 *  expire date: Mar 13 23:59:59 2019 GMT
13:23:10 *  subjectAltName: host "zipkin.io" matched cert's "zipkin.io"
13:23:10 *  issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA Limited; CN=COMODO ECC Domain Validation Secure Server CA 2
13:23:10 *  SSL certificate verify ok.
13:23:10 * Using HTTP2, server supports multi-use
13:23:10 * Connection state changed (HTTP/2 confirmed)
13:23:10 * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
13:23:10 } [5 bytes data]
13:23:10 * Using Stream ID: 1 (easy handle 0x55807ab90880)
13:23:10 } [5 bytes data]
13:23:10 > GET /quickstart.sh HTTP/2
13:23:10 > Host: zipkin.io
13:23:10 > User-Agent: curl/7.58.0
13:23:10 > Accept: */*
13:23:10 > 
13:23:10 { [5 bytes data]
13:23:10 * Connection state changed (MAX_CONCURRENT_STREAMS updated)!
13:23:10 } [5 bytes data]
13:23:10 < HTTP/2 200 
13:23:10 < date: Thu, 06 Sep 2018 13:23:10 GMT
13:23:10 < content-type: application/x-sh
13:23:10 < set-cookie: __cfduid=dce5ec8e288eba498ccaadf8a9e8c70711536240190; expires=Fri, 06-Sep-19 13:23:10 GMT; path=/; domain=.zipkin.io; HttpOnly; Secure
13:23:10 < last-modified: Sun, 02 Sep 2018 00:35:26 GMT
13:23:10 < etag: W/"5b8b304e-255e"
13:23:10 < access-control-allow-origin: *
13:23:10 < expires: Thu, 06 Sep 2018 12:35:30 GMT
13:23:10 < cache-control: max-age=600
13:23:10 < x-github-request-id: 71DC:4D08:1551E41:17AAB36:5B911CB6
13:23:10 < via: 1.1 varnish
13:23:10 < age: 0
13:23:10 < x-served-by: cache-pao17449-PAO
13:23:10 < x-cache: HIT
13:23:10 < x-cache-hits: 1
13:23:10 < x-timer: S1536240191.775419,VS0,VE24
13:23:10 < vary: Accept-Encoding
13:23:10 < x-fastly-request-id: 8b5432702ae7a3e1de91be53f81af7261c329a64
13:23:10 < expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
13:23:10 < server: cloudflare
13:23:10 < cf-ray: 45613fa81d9328a6-SJC
13:23:10 < 
13:23:10 { [838 bytes data]
13:23:10 * Connection #0 to host zipkin.io left intact
13:23:10 + set -euo pipefail
13:23:10 + DO_CLEANUP=0
13:23:10 ++ tput setaf 7
13:23:10 ++ tput bold
13:23:10 + color_title=

The command has failed.

abesto commented 5 years ago

Hwell. The script uses -e, and tput bold seems to fail under CI / non-interactive environments. Let me look into a proper fix for this.