Improve add MAAS process
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Medium
|
Unassigned |
Bug Description
When trying to add a MAAS instance to juju the boostrap process is not very user friendly. I've done this before, and was trying to add a new MAAS and was surprised how hard it is to get Juju to add MAAS as a new cloud.
This is the full terminal output from my attempts to add MAAS to juju.
$ juju add-cloud
This operation can be applied to both a copy on this client and to the one on a controller.
Do you want to add cloud to:
1. client only (--client)
2. controller "prod-maas" only (--controller prod-maas)
3. both (--client --controller prod-maas)
Enter your choice, or type Q|q to quit: 1
Cloud Types
lxd
maas
manual
openstack
vsphere
Select cloud type: maas
Enter a name for your maas cloud: k8s-maas
Enter the API endpoint url: 192.168.1.187
Can't validate endpoint: No MAAS server running at 192.168.1.187
Enter the API endpoint url: 192.168.1.187:5240
Can't validate endpoint: No MAAS server running at 192.168.1.187:5240
Enter the API endpoint url: 192.168.
Can't validate endpoint: No MAAS server running at 192.168.
Enter the API endpoint url: http://
Can't validate endpoint: No MAAS server running at http://
I've done this before, and after 4 attempts I couldn't get Juju to talk to MAAS at a known IP address. Surly *any* of these 4 attempts should be recognized and currently none of them are. From a pure usability standpoint, juju should take several of these inputs and try to contact MAAS. You can easily assume many of these things from the given input.
Even an error message that simply stated the standard default expected MAAS format would have been sufficient to get me through the addition process.
I believe that the default API port is 17070, so 192.168.1.187:17070 should work. With the second and further attempts, you were explicitly telling Juju to call on the wrong port.
I agree that, given a bare IP or domain, Juju should make some guesses about the port, however, or at least include this information in an error message. (The latter is probably safer.)