How best to automate a JAAS hosted model? libjuju works with my auth?

I have a challenge for myself… I utilize JAAS in order to stand up services in AWS… everything there works great… BUT

I have a custom webapp of my own which I want to eventually push commands to JAAS in order to run certain actions (first in a dev, then in a prod model)

I see the JS and Python libjuju … but nowhere do I see utilization of those to connect to something remotely hosted like the JAAS controller… in order to use these must I have whatever system I am using to run my webapp ALSO connected to and running Juju on the JAAS controller already? I noticed theres an authentication step so will libjuju somehow bypass this like a service user or…? will it not work at all?

Maybe I missed it but this is where I was looking at examples so far



According to these posts, others are indeed attempting to do this exact same flow… (cannot upload local charms, not an issue for me but good to know) (calls out need for support for JAAS specific commands, this might be answering my last question above if this is working smoothly)

Seems I just need to try it… and see if the patches mentioned in 2020 have made it into the mix (I imagine they have)

So I guess js-libjuju should in theory be perfect if I am in my webapp and want to orchestrate on JAAS?

1 Like

@emcp I think this is a super hot topic as I’ve failed alot of times to use this feature of juju and the most recent attempt failed miserably.

I’ve also had a very experienced engineer working on this, but he also failed.

I would very much like to have some easy to follow use cases. I mean, the very most basic.

  • Create a model, deploy a machine and a charm.
  • Destroy a charm, machine, model.
  • Set model configs.
  • Set charm configs.
  • Run actions and retrieve their output. == Advanced ==
  • Deploy bundles.
  • Add/remove storage
  • Using this in CI/CD pipelines to run automated tests at scale.

@tmihoc @ppasotti - this is absolutely a topic that I would see have a big value since many DevOps teams would be able to use it.

Use-case: “The DevOps team wants to automate large scale testing of their complete system. Automating this process with Juju would improve the quality of the testing and test procedures.”

i tested briefly the examples of py-libjuju against my local LXD controller… seemed to work just fine to create an ubuntu machine locally. When you say they failed are you saying it was against the JAAS controller? AWS? or ?

1 Like

Not sure. It was some time ago I did this and last time it was a college of mine who failed and gave up.