[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Add support for br --endpoint?


Hi all,

TL;DR: I want to add `--endpoint` to the br command, because `br login` has global scope.

We at Cloudsoft use `br` in our qa jenkins jobs. However, the `br login` command has global scope. This means that two jobs run on the same jenkins slave (both running as user `jenkins`) will interfere if their `br login ...; br catalog add ...` commands become interleaved.

I propose that we add support for a `--endpoint` argument in br commands. For example:

    br login https://localhost:8443 admin pa55w0rd
    br --endpoint https://localhost:8443 catalog add /path/to/mybundle/

Note that `br login` stores the credentials in ~/.brooklyn_cli, along with a "target" for the endpoint that is currently active.

---
Alternative approaches include:

1. Custom configuration file, such as:

    br --config /path/to/.brooklyn_cli login https://localhost:8443 admin pa55w0rd
    br --config /path/to/.brooklyn_cli catalog add /path/to/mybundle/

2. Introduce the notion of "profiles", such as:

    br login --profile staging https://localhost:8443 admin pa55w0rd
    br --profile staging catalog add /path/to/mybundle/

But profiles would be more complex to implement - it implies support for multiple logins to the same endpoint with different user:credentials.

Thoughts?

Aled