juxt

jonpither 2017-09-08T05:13:34.000009Z

The ami used is a bog standard Ubuntu server instance @steveb8n. Maybe Roll could auto determine the AMI if one is not supplied.. that could be handy.

jonpither 2017-09-08T05:14:35.000049Z

Sorry, didn't realise the one in Roll is only for eu-west-1 !

steveb8n 2017-09-08T05:15:56.000056Z

true although maybe just adding that to the docs for now would be enough to avoid my issue

steveb8n 2017-09-08T05:17:14.000022Z

I already tried a pretty basic Ubuntu AMI and it failed on jdk install (see above). It could have been specific to the one I tried

steveb8n 2017-09-08T05:17:38.000082Z

either way, I’ll try copying your AMI into my region, to keep moving.

steveb8n 2017-09-08T05:18:57.000035Z

while you are here. Is there any sample code in edge for reading/decrypting KMS secrets? The doc’s mention KMS and I liked it (after learning about it) but it would be good to reference an example somewhere

jonpither 2017-09-08T05:53:29.000014Z

Sure. Not sure we have any docs.. there is a blog post in the works! I will see what we have. It is very cool and worth it. Roll does some KMS stuff but I need to verify.

dominicm 2017-09-08T06:03:10.000033Z

@steveb8n I'm gonna have a go at writing a script to get the Ubuntu image for the given region today.

dominicm 2017-09-08T06:03:34.000020Z

I'll try and port it to pack-datomic too

dominicm 2017-09-08T06:04:02.000145Z

Pass. /cc @jonpither

steveb8n 2017-09-08T06:04:11.000227Z

cool. I’ll hold off until you’ve tried. BTW there was no good vanilla Ubuntu image in the Sydney region. one mo and and paste in the list

steveb8n 2017-09-08T06:06:59.000018Z

it’s 50 items so maybe I won’t paste in. but they are all php servers so probably not ideal

steveb8n 2017-09-08T06:07:19.000063Z

that means that your script will not work in my region regardless. do you care?

steveb8n 2017-09-08T06:07:49.000027Z

I can still copy the Edge AMI into my region to workaround this

dominicm 2017-09-08T06:30:38.000216Z

@steveb8n https://cloud-images.ubuntu.com/locator/ec2/ apparently there's official ones? Did you try them?

steveb8n 2017-09-08T06:40:19.000227Z

hmm, I missed those somehow. thanks for the correction

steveb8n 2017-09-08T06:40:37.000024Z

I’ve gotta pop out for an hour but I’ll try one of those right after I get back

raymcdermott 2017-09-08T06:40:49.000165Z

I have checked the original repo that @jonpither mentions in the README from @robert-stuttaford and that one includes the DDB storage provisioning so I will go ahead and adapt that one

dominicm 2017-09-08T06:45:48.000179Z

@steveb8n let me know how you get on, because I'd love to use this list to automatically determine the correct AMI for people.

stijn 2017-09-08T07:31:05.000195Z

@dominicm how do you capture the resulting ami name for use in terraform afterwards?

dominicm 2017-09-08T07:33:37.000098Z

@stijn for pack datomic? Currently it's a manual process. I wonder if it needs to be though.

stijn 2017-09-08T07:38:08.000108Z

well, the use case for pack-datomic for us is that I want to have some code on the datomic transactor classpath

stijn 2017-09-08T07:39:01.000152Z

we're running into trouble using rules inside a transactor function, and the only way I've been able to make it work is by putting the rules in a clojure file that is visible to the transactor jvm

stijn 2017-09-08T07:39:28.000136Z

but, if these rules change (not very often), I need to rebuild the ami

stijn 2017-09-08T07:45:52.000028Z

i need to think about this, if doing it automatically is even a good idea 🙂

dominicm 2017-09-08T08:00:45.000045Z

Agreed. The other option is that user data launches the datomic instance, and it does that after uploading the clojure files.

steveb8n 2017-09-08T08:24:27.000204Z

@dominicm I’m trying to re-deploy using that AMI but having trouble with existing deployed stuff. I’ve manually deleted all but one but can’t find where to delete the “instance profile”

steveb8n 2017-09-08T08:24:28.000306Z

aws_iam_instance_profile.nextdoc: Error creating IAM instance profile dev-nextdoc: EntityAlreadyExists: Instance Profile dev-nextdoc already exists. status code: 409, request id: c8e259dc-946e-11e7-9e63-637aa216adbb

steveb8n 2017-09-08T08:24:37.000082Z

any suggestions?

dominicm 2017-09-08T08:26:49.000323Z

@steveb8n I'd try under a credentials section. I'll be in the office in 5m and can be more precise.

dominicm 2017-09-08T08:27:11.000233Z

Iam is a security thing though

dominicm 2017-09-08T08:27:29.000371Z

I think terraform destroy will work actually

dominicm 2017-09-08T08:27:32.000080Z

That's easier

steveb8n 2017-09-08T08:27:34.000183Z

yep, docs say that an “instance profile” is just an IAM role but nothing with that name is present

steveb8n 2017-09-08T08:27:45.000088Z

ok I’ll try destroy

steveb8n 2017-09-08T08:34:38.000250Z

no joy. destroy worked cleanly but still blocked by the “instance profile”

steveb8n 2017-09-08T08:35:08.000015Z

I wonder if some kind of eventual consistency is in play here

steveb8n 2017-09-08T08:35:20.000084Z

because there’s no such IAM role

dominicm 2017-09-08T08:36:55.000190Z

I once got locked out of aws for a couple hours because my password reset was eventually consistent. Too slowly consistent.

steveb8n 2017-09-08T08:38:46.000213Z

I can see it using CLI, just don’t know where to look in console

steveb8n 2017-09-08T08:38:53.000246Z

I’ll try deleting using CLI

dominicm 2017-09-08T08:39:56.000274Z

okay, 😆

dominicm 2017-09-08T08:40:00.000138Z

this is strange indeed

steveb8n 2017-09-08T08:43:11.000391Z

success! at least I’m past the “instance profile”. EC2 instance now booting so I can check the AMI… finally

steveb8n 2017-09-08T08:43:33.000332Z

strange that “instance profile” in AWS is not an easy cleanup via console

steveb8n 2017-09-08T08:45:33.000108Z

more success. that AMI shows no apt-get errors in user-data.log so looks good

steveb8n 2017-09-08T08:46:57.000171Z

jdk installed as well so I’d say this AMI is good. Now I need to spend some time matching my uberjar to the shape of the Edge uberjar.

steveb8n 2017-09-08T08:47:27.000180Z

but that will have to wait till my morning as it’s dinner time. thanks again!

🦜 2
steveb8n 2017-09-08T08:49:09.000057Z

happy days 🙂

steveb8n 2017-09-08T10:46:04.000204Z

I fixed the uberjar and my app is now running and accessible via http. That's a win. I'll work on using KMS keys over the weekend and will sync up for next steps on your Monday

steveb8n 2017-09-08T10:46:19.000028Z

In the meantime, have a great weekend

jonpither 2017-09-08T10:48:54.000034Z

well done @steveb8n! I will review all text in this thread and github issues soon. I really appreciate your efforts in testing all this out

steveb8n 2017-09-08T10:52:59.000340Z

Likewise. A great team effort. This is a really valuable library.

👏 1