juxt

steveb8n 2017-08-18T07:42:10.000275Z

Hi team, I’ve started testing Roll with Jons help and have reached a blocker (I think). Can someone point me in the right direction?

steveb8n 2017-08-18T07:43:29.000152Z

to sanity check mach/roll I first ran “mach info” and that was fine. Then I ran “mach roll-info” based on seeing that in the machfile, and then I see…

steveb8n 2017-08-18T07:43:50.000207Z

➜ edge git:(master) ✗ mach roll-info $ git describe --dirty --long --tags --match [0-9]* 0.0.1-66-g054ed48-dirty Error whilst performing shell command.

steveb8n 2017-08-18T07:44:32.000136Z

am I on the right track or is this something that needs debugging. BTW I’m in no hurry on this but grateful for any help

jonpither 2017-08-18T07:45:31.000314Z

What is the error?

jonpither 2017-08-18T07:46:32.000235Z

That git output line is normal

steveb8n 2017-08-18T07:57:18.000217Z

more context. mach uberjar works fine

steveb8n 2017-08-18T07:57:31.000049Z

this is all within the edge project BTW

steveb8n 2017-08-18T07:57:47.000265Z

no modifications except changing my own AWS ids

steveb8n 2017-08-18T07:58:45.000207Z

but “mach tfjson” fails with same as “mach roll-info”

steveb8n 2017-08-18T07:58:55.000165Z

i.e. Error whilst performing shell command.

steveb8n 2017-08-18T07:59:27.000234Z

I’m wondering if there is a verbose/debug mode for mach that will tell us more?

dominicm 2017-08-18T08:22:29.000234Z

@steveb8n just to check (coming into this late), are you on master of mach?

steveb8n 2017-08-18T08:24:41.000169Z

@dominicm I installed yesterday using “sudo npm install -g @juxt/mach” so I presume yes

steveb8n 2017-08-18T08:24:51.000053Z

how can I tell from an npm install?

dominicm 2017-08-18T08:25:45.000111Z

d/w, you're probably up to date. I thought edge was more experimental than it is. So all is good there.

dominicm 2017-08-18T08:29:14.000123Z

@steveb8n

~/src/github.com/juxt/edge master*
❯ mach roll-info 
$ git describe --dirty --long --tags --match [0-9]*
0.0.1-66-g054ed48

evalmachine.<anonymous>:98
throw ex;
^

Error: Error whilst performing shell command.
    at roll$core$sh (evalmachine.<anonymous>:171:8)
    at roll$core$resolve_region (evalmachine.<anonymous>:235:122)
    at evalmachine.<anonymous>:526:42
    at cljs.core.PersistentVector.cljs$core$IReduce$_reduce$arity$3 (<embedded>:1106:284)
    at Function.cljs.core.reduce.cljs$core$IFn$_invoke$arity$3 (<embedded>:577:181)
    at cljs.core.reduce (<embedded>:574:174)
    at Function.roll.core.preprocess.cljs$core$IFn$_invoke$arity$variadic (evalmachine.<anonymous>:524:35)
    at roll$core$preprocess (evalmachine.<anonymous>:500:29)
    at evalmachine.<anonymous>:47:36
    at evalmachine.<anonymous>:70:43
Is this your full error? ^^

steveb8n 2017-08-18T08:30:14.000105Z

no, I just get the Error msg. I’ll paste exact….

steveb8n 2017-08-18T08:30:34.000091Z

➜ edge git:(master) ✗ mach roll-info $ git describe --dirty --long --tags --match [0-9]* 0.0.1-66-g054ed48-dirty Error whilst performing shell command. ➜ edge git:(master) ✗

dominicm 2017-08-18T08:31:11.000319Z

Odd that you don't get a stack, but it's the same error I think 🙂. I wondered if you were cutting it off.

dominicm 2017-08-18T08:31:18.000279Z

I can improve that error message I think, one sec.

steveb8n 2017-08-18T08:32:04.000346Z

odd indeed 🙂 holding…

dominicm 2017-08-18T08:34:00.000017Z

@steveb8n https://github.com/SevereOverfl0w/roll/tree/sherrormsg can you try this branch/fork? Just:

git clone <https://github.com/SevereOverfl0w/roll.git>
cd roll
git checkout sherrormsg
lein install
then try run mach roll-info from edge again

steveb8n 2017-08-18T08:36:40.000095Z

➜ edge git:(master) ✗ mach roll-info $ git describe --dirty --long --tags --match [0-9]* 0.0.1-66-g054ed48-dirty Error whilst performing shell command: [“aws” “configure” “get” “region”] ➜ edge git:(master) ✗

steveb8n 2017-08-18T08:37:06.000211Z

can I try that aws cli command on it’s own?

dominicm 2017-08-18T08:37:10.000056Z

yep

steveb8n 2017-08-18T08:37:17.000146Z

maybe a problem with my awscli

dominicm 2017-08-18T08:37:41.000014Z

@steveb8n pro-tip: AWS_PROFILE=profilenameforaws aws configure get region

steveb8n 2017-08-18T08:38:41.000161Z

bear with me, need to swot up on awscli

dominicm 2017-08-18T08:39:30.000173Z

https://github.com/juxt/edge/blob/054ed4879ba113ca3e52a732cb648e24ddc66921/resources/config.edn#L36 you can change this line to be your expected AWS profile for people if you don't want to use environment variable. You can cat ~/.aws/credentials to figure out which profiles you have.

jonpither 2017-08-18T08:40:11.000250Z

Ah. Ensure u have a default aws region set in your aws cli setup

jonpither 2017-08-18T08:40:57.000285Z

Or a region set for the profile u are using

dominicm 2017-08-18T08:49:03.000050Z

@jonpither https://github.com/SevereOverfl0w/roll/commit/ddd5471d1581f7afa11952a825d3aeb4a3f9663b here's my patch, it's a bit crap because it just prints out the vector. You might want to do something a bit fancier similar to mach.

steveb8n 2017-08-18T08:52:00.000127Z

ok, that was it. I had no default region configured for the cli

steveb8n 2017-08-18T08:52:05.000173Z

now getting Error whilst performing shell command: [“aws” “s3api” “head-object” “--bucket” “roll-deployment-artifacts” “--key” “”]

steveb8n 2017-08-18T08:52:24.000028Z

but I suspect I need to follow the edge script a little further

steveb8n 2017-08-18T08:53:04.000259Z

that’s my bucket name but it looks like I need a key somewhere

steveb8n 2017-08-18T08:54:19.000164Z

either way, might be worth handling empty region in roll mach script for future noobs

1👍
dominicm 2017-08-18T08:54:58.000235Z

https://github.com/juxt/edge/blob/054ed4879ba113ca3e52a732cb648e24ddc66921/resources/config.edn#L57 I think this is the key, or supposed to be. Haven't followed the code fully yet, but you might know what's wrong already based on that line

dominicm 2017-08-18T08:56:45.000133Z

@steveb8n I did the same thing 😉 Repeatedly. Agree with what you're saying.

1👍
dominicm 2017-08-18T08:59:53.000116Z

@steveb8n Did you set AWS_PROFILE or did you make your profile the default one?

steveb8n 2017-08-18T09:00:17.000281Z

I just used “aws configure”

dominicm 2017-08-18T09:01:19.000183Z

https://github.com/juxt/edge/blob/054ed4879ba113ca3e52a732cb648e24ddc66921/resources/config.edn#L36 roll needs this key set, you can change it to #or [#env AWS_PROFILE "default"]. Uncertain whether making default the default is a good idea rn, but under consideration.

steveb8n 2017-08-18T09:01:55.000355Z

roger that, trying now

dominicm 2017-08-18T09:02:21.000175Z

(it probably is a good idea, I just have no idea how people use awscli in practice, I use it by not using it and just having the config file saying it's there.)

steveb8n 2017-08-18T09:04:05.000246Z

Error whilst performing shell command: [“aws” “s3api” “head-object” “--bucket” “roll-deployment-artifacts” “--key” “” “--profile” “default”]

steveb8n 2017-08-18T09:04:14.000125Z

still missing a “key” somewhere

dominicm 2017-08-18T09:05:46.000406Z

yeah, looks like I was wrong :thinking_face:

dominicm 2017-08-18T09:05:54.000294Z

You know what, this might be normal.

dominicm 2017-08-18T09:06:05.000009Z

Do you have any artifacts released?

dominicm 2017-08-18T09:07:52.000276Z

Try mach upload first @steveb8n

steveb8n 2017-08-18T09:08:46.000311Z

that worked. apparently I need to RTFM

dominicm 2017-08-18T09:09:06.000149Z

I didn't know there was a manual, I'm reading the source code 😜

steveb8n 2017-08-18T09:09:31.000240Z

tfjson now works as well

dominicm 2017-08-18T09:09:34.000081Z

problem was that it tries to resolve latest artifact (of which there was none), and tries to continue.

dominicm 2017-08-18T09:09:39.000147Z

Gonna open issue on roll for this stuff

steveb8n 2017-08-18T09:09:57.000224Z

cool. good to avoid this in future

dominicm 2017-08-18T09:13:38.000463Z

Feel free to @ me if you have any more problems. I've opened issues on github.

steveb8n 2017-08-18T09:16:15.000060Z

will do, thanks. It’s dinner time so I’ll stop for now.

steveb8n 2017-08-18T09:16:31.000338Z

I’ll update with progress when I resume

steveb8n 2017-08-18T09:16:46.000078Z

have a good Friday