Fork me on GitHub
#immutant
<
2016-08-15
>
tcrawley17:08:09

@cap10morgan: do you have a link to docs for what you are trying to do?

cap10morgan17:08:29

WildFly docs are 😢

tcrawley17:08:40

We use https://github.com/immutant/jboss-as-management for deploying to WildFly for our integ tests

tcrawley17:08:48

that may be helpful

cap10morgan17:08:12

At a higher level, I'm trying to tell when I already have a given version of a war file deployed to WildFly and skip re-deploying it if so (in a deploy script).

cap10morgan17:08:26

cool, I'll check out that library

tcrawley17:08:50

let us know if you haven any questions about it

tcrawley17:08:01

@jcrossley3 is our WF API expert

tcrawley17:08:13

or he has more expertise than I do, at least

cap10morgan17:08:12

At this point I would love to just know how that hash is computed and encoded there so I could compute my own in my deploy script and compare the two hashes.

cap10morgan17:08:05

But the level of detail in the WildFly docs isn't even in that zipcode. And I can't find the source code for the management API in the wildfly github repo's forests and forests of java boilerplate.

tcrawley17:08:10

are you querying the api and getting back a hash value for the deployment, and want to compare against that?

tcrawley17:08:29

my knowledge of the api is lacking

tcrawley17:08:41

but I may be able to find it

tcrawley17:08:45

or know who to ask

tcrawley17:08:10

looking now

cap10morgan17:08:14

cool, thanks!

jcrossley317:08:43

tcrawley: expert? is he? really?

tcrawley17:08:04

"expert". Compared to me, yes :)

jcrossley317:08:40

cap10morgan: you may see it in the output from (api/request uri :operation "read-children-names" :child-type "deployment")

jcrossley317:08:11

or maybe "read-children"

jcrossley317:08:31

that api is so dreadfully awful

tcrawley17:08:41

I think the issue is knowing how the hash is calculated, not finding it

cap10morgan17:08:43

@jcrossley3: Yeah, I can get it from the API. I need to know how to calculate & encode it from my own WAR to answer the question, "Is this WildFly deployment the same WAR as the one I'm about to deploy?"

tcrawley17:08:09

do you have a curl command to get that info?

cap10morgan17:08:51

I've just been mucking around in the admin CLI so far. Was going to convert it to HTTP API call once I got something working.

tcrawley17:08:39

is this what you are trying to compare against? content=[{"hash" => bytes { 0x8b, 0x7a, 0x17, 0x7f, 0xb3, 0x41, 0x45, 0x35, 0x88, 0x39, 0x24, 0xb0, 0xf6, 0x38, 0xe1, 0x87, 0x9a, 0xf9, 0xde, 0xad }}]

tcrawley17:08:38

asking the WF devs now

jcrossley317:08:02

is it not just md5?

cap10morgan17:08:29

@jcrossley3: might be; I need to spit out the bytes of the md5 and compare that

cap10morgan17:08:47

md5sum is base64 encoding of those bytes by default, IIRC?

tcrawley17:08:03

hey, good idea jcrossley3. It's actually sha1 though: 8b7a177fb3414535883924b0f638e1879af9dead target/demo.war

tcrawley17:08:16

compare that to my hash above

cap10morgan17:08:18

ohh... there you go

tcrawley17:08:37

that was from gsha1sum on my mac

cap10morgan17:08:51

I was trying to first match it to the other content address wildfly spits out on deployment, but maybe that was a red herring.

tcrawley17:08:17

much of what wildfly gives you is a red herring :)

cap10morgan17:08:54

OK, I have a local testing deploy about to happen here, I'll compare to the sha1 of the war

cap10morgan21:08:37

yep, sha1 seems to match up perfectly. thanks guys!

tcrawley21:08:03

our pleasure