You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by jordan j <yo...@gmail.com> on 2023/04/06 12:57:56 UTC

Cloudmonkey without default config

Do you know if it is possible and what is the syntax to use cloudmonkey
commands without configuring profile? I dont want to have credentials or
keys on the server disk.

Is it possible to do something like this?

cmk list instances -key my_key -secret my_secret

I see no such arguments in the documentation.

Regards,
Jordan

Re: Cloudmonkey without default config

Posted by jordan j <yo...@gmail.com>.
Thank you Nux! :)

On Thu, Apr 6, 2023 at 4:24 PM Nux <nu...@li.nux.ro> wrote:

> It'd be nice if cmk could read this stuff from env vars, but alas it
> doesn't seem to be the case. Ask for a feature. :)
>
> Otherwise, what you can do is set stuff up temporarily then delete it
> when done, for example:
> (let's use a non-default config path, so it's extra disposable)
>
> cmkconfig=$(mktemp -p .)
> cmk -c "$cmkconfig" set url cloud:8080/client/api
> cmk -c "$cmkconfig" set apikey lalala
> cmk -c "$cmkconfig" set secretkey skeylalala
>
> Then do you stuff with cmk:
> cmk -c "$cmkconfig" list virtualmachines etc
>
> And when you are done just delete the file:
> rm -f "$cmkconfig"
>
> HTH
>
> On 2023-04-06 13:57, jordan j wrote:
> > Do you know if it is possible and what is the syntax to use cloudmonkey
> > commands without configuring profile? I dont want to have credentials
> > or
> > keys on the server disk.
> >
> > Is it possible to do something like this?
> >
> > cmk list instances -key my_key -secret my_secret
> >
> > I see no such arguments in the documentation.
> >
> > Regards,
> > Jordan
>

Re: Cloudmonkey without default config

Posted by Nux <nu...@li.nux.ro>.
It'd be nice if cmk could read this stuff from env vars, but alas it 
doesn't seem to be the case. Ask for a feature. :)

Otherwise, what you can do is set stuff up temporarily then delete it 
when done, for example:
(let's use a non-default config path, so it's extra disposable)

cmkconfig=$(mktemp -p .)
cmk -c "$cmkconfig" set url cloud:8080/client/api
cmk -c "$cmkconfig" set apikey lalala
cmk -c "$cmkconfig" set secretkey skeylalala

Then do you stuff with cmk:
cmk -c "$cmkconfig" list virtualmachines etc

And when you are done just delete the file:
rm -f "$cmkconfig"

HTH

On 2023-04-06 13:57, jordan j wrote:
> Do you know if it is possible and what is the syntax to use cloudmonkey
> commands without configuring profile? I dont want to have credentials 
> or
> keys on the server disk.
> 
> Is it possible to do something like this?
> 
> cmk list instances -key my_key -secret my_secret
> 
> I see no such arguments in the documentation.
> 
> Regards,
> Jordan