openzipkin / openzipkin.github.io

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

Extend quickstart.sh to download any artifact #94

Closed abesto closed 6 years ago

abesto commented 6 years ago

As discussed in #93. Example session:


$ ./quickstart.sh -h
./quickstart.sh
Downloads the latest version of the Zipkin Server executable jar

./quickstart.sh GROUP:ARTIFACT:CLASSIFIER TARGET
Downloads the latest version of GROUP:ARTIFACT with classifier "CLASSIFIER"
to path "TARGET" on the local file system. For example:

./quickstart.sh io.zipkin.java:zipkin-autoconfigure-collector-kafka10:module kafka10.jar
downloads the latest version of the artifact with group "io.zipkin.java",
artifact id "zipkin-autoconfigure-collector-kafka10", and classifier "module"
to PWD/kafka10.jar
$ ./quickstart.sh
Thank you for trying OpenZipkin!

This installer is provided as a quick-start helper, so you can try Zipkin out
without a lengthy installation process.

Fetching version number of latest Zipkin release...
Downloading io.zipkin.java:zipkin-server:2.4.0:exec to zipkin.jar...
https://dl.bintray.com/openzipkin/maven/io/zipkin/java/zipkin-server/2.4.0/zipkin-server-2.4.0-exec.jar -> zipkin.jar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 48.9M  100 48.9M    0     0  2786k      0  0:00:18  0:00:18 --:--:-- 3012k

Verifying checksum...
zipkin.jar: OK

Verifying signature of zipkin.jar...
gpg: Signature made Mon 27 Nov 2017 11:52:09 AM CET
gpg:                using RSA key 379CE192D401AB61
gpg: Good signature from "Bintray (by JFrog) <bintray@bintray.com>" [ultimate]

Verifying signature of zipkin.jar.md5...
gpg: Signature made Mon 27 Nov 2017 11:52:10 AM CET
gpg:                using RSA key 379CE192D401AB61
gpg: Good signature from "Bintray (by JFrog) <bintray@bintray.com>" [ultimate]

You can now run the downloaded executable jar:

    java -jar zipkin.jar

$ ls -lh zipkin.jar
-rw-rw-r-- 1 abesto abesto 49M Nov 27 21:30 zipkin.jar
$ ./quickstart.sh io.zipkin.java:zipkin-autoconfigure-collector-kafka10:module kafka10.jar
Thank you for trying OpenZipkin!

This installer is provided as a quick-start helper, so you can try Zipkin out
without a lengthy installation process.

Fetching version number of latest Zipkin release...
Downloading io.zipkin.java:zipkin-autoconfigure-collector-kafka10:2.4.0:module to kafka10.jar...
https://dl.bintray.com/openzipkin/maven/io/zipkin/java/zipkin-autoconfigure-collector-kafka10/2.4.0/zipkin-autoconfigure-collector-kafka10-2.4.0-module.jar -> kafka10.jar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 2667k  100 2667k    0     0  2667k      0  0:00:01  0:00:01 --:--:-- 3124k

Verifying checksum...
kafka10.jar: OK

Verifying signature of kafka10.jar...
gpg: Signature made Mon 27 Nov 2017 11:52:40 AM CET
gpg:                using RSA key 379CE192D401AB61
gpg: Good signature from "Bintray (by JFrog) <bintray@bintray.com>" [ultimate]

Verifying signature of kafka10.jar.md5...
gpg: Signature made Mon 27 Nov 2017 11:52:41 AM CET
gpg:                using RSA key 379CE192D401AB61
gpg: Good signature from "Bintray (by JFrog) <bintray@bintray.com>" [ultimate]

The downloaded artifact is now available at kafka10.jar.
$ ls -lh kafka10.jar
-rw-rw-r-- 1 abesto abesto 2.7M Nov 27 21:31 kafka10.jar
abesto commented 6 years ago

Possible alternative to the current artifact notation: we could define LATEST as the version to mean the latest version, and include the version in the artifact definition. So instead of

./quickstart.sh io.zipkin.java:zipkin-autoconfigure-collector-kafka10:module kafka10.jar

One would write

./quickstart.sh io.zipkin.java:zipkin-autoconfigure-collector-kafka10:LATEST:module kafka10.jar

This has the advantages of matching the Gradle artifact notation more closely, as well as allowing use of non-latest versions (you could write, say, 2.4.0 instead of LATEST). All this at the cost of a slightly longer command.

Want?

codefromthecrypt commented 6 years ago

Will be pasted anyway.. want!

On 28 Nov 2017 5:18 am, "Zoltán Nagy" notifications@github.com wrote:

Possible alternative to the current artifact notation: we could define LATEST as the version to mean the latest version. So instead of

./quickstart.sh io.zipkin.java:zipkin-autoconfigure-collector-kafka10:module kafka10.jar

One would write

./quickstart.sh io.zipkin.java:zipkin-autoconfigure-collector-kafka10:LATEST:module kafka10.jar

This has the advantages of matching the Gradle artifact notation more closely, as well as allowing use of non-latest versions (you could write, say, 2.4.0 instead of LATEST). All this at the cost of a slightly longer command.

Want?

— 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/94#issuecomment-347331080, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD61_-N3E0_rQgRqtcTYmR85sswoNkBks5s6ycMgaJpZM4QsQ-H .

abesto commented 6 years ago

It's ready to go I think.

codefromthecrypt commented 6 years ago

thanks! will update the readme PR

shakuzen commented 6 years ago

@abesto I just tried this on OSX and got the following:

$ curl -sSL https://zipkin.io/quickstart.sh | bash -s
Thank you for trying OpenZipkin!

This installer is provided as a quick-start helper, so you can try Zipkin out
without a lengthy installation process.

bash: line 177: ${artifact_version,,}: bad substitution
abesto commented 6 years ago

Thanks for reporting! At first glance it looks like a bash version issue. I'll fix up the script to work on the osx default bash version (or whatever else this turns out to be)

On Nov 29, 2017 1:42 PM, "Tommy Ludwig" notifications@github.com wrote:

@abesto https://github.com/abesto I just tried this on OSX and got the following:

$ curl -sSL https://zipkin.io/quickstart.sh | bash -s Thank you for trying OpenZipkin!

This installer is provided as a quick-start helper, so you can try Zipkin out without a lengthy installation process.

bash: line 177: ${artifact_version,,}: bad substitution

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openzipkin/openzipkin.github.io/pull/94#issuecomment-347849142, or mute the thread https://github.com/notifications/unsubscribe-auth/AADqTlCpYMM8n20aJsTvged16x0s7r9Pks5s7VEsgaJpZM4QsQ-H .

abesto commented 6 years ago

@shakuzen I've uploaded a version that works on the machine where I managed to reproduce the issue (openzipkin/openzipkin.github.io@d114d9a). It'd be great if you could re-run the same command you used originally and let me know the results.

shakuzen commented 6 years ago

@abesto works well now. thank you for the quick turnaround!