Bug 1323885 - bkr command to add and configure systems
Summary: bkr command to add and configure systems
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: develop
Hardware: All
OS: Linux
unspecified
high
Target Milestone: 23.0
Assignee: matt jia
QA Contact: tools-bugs
URL:
Whiteboard:
: 1212227 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-05 01:25 UTC by jiazhan
Modified: 2016-07-07 23:10 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-07-07 23:10:36 UTC
Embargoed:


Attachments (Terms of Use)
2 bkr command files (6.98 KB, text/plain)
2016-05-10 02:07 UTC, jiazhan
no flags Details

Description jiazhan 2016-04-05 01:25:17 UTC
Description of problem:
Hi team:
At present we use the beaker Web GUI  [1]to add a new system and attributes to beaker,which includs several steps as below . I am trying to use bkr client to automate the process with CLI, but it seems there is no such option for bkr command now. And I talked with Dan and he suggested me to open an RFE here to add the option in bkr command.Can you kindly help on this?

1. add system in beaker (at present, I added it via webui interface , e.g. adding system attributes such as fqdn,lab controller,  ipmi or pdu device and credentials ,etc. I checked 'bkr' command and it seems to me there is on option for bkr to accomplish it. is that right?  do you know Is there other ways to accomplish it?)
2. provision a system. ( we can use bkr workflow-simple to complete the provision process and system details info push back , I think it's great

[1] https://beaker.engineering.redhat.com/


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Dan Callaghan 2016-04-05 04:46:20 UTC
We could add a new command bkr system-create, for creating a new system in Beaker.

We already have bkr system-modify but it only allows changing a very small subset of the important attributes of a system. It seems like the important ones needed here are:

* lab controller
* supported architectures
* location
* power settings

Possibly also install options and excluded families?

Comment 2 jiazhan 2016-04-11 09:25:48 UTC
Hi Dan:
thanks a lot, I have been reading the codes you showed me last time. I got to understand some , but it's a far long way for me to go to integrate it into mine. I will ask questions on the code that I don't understand in the future. 
At the same time, Can I know when the bkr system-create can be made. It's very appreciated if the 'bkr system-modify 'command  can help us  update the settings in 'power-settings' ,'essentials' and 'access-policy' which we can only do on the webui now. It's mostly needed for automation work in daily operations.
Thanks a lot for your great support.

Comment 3 jiazhan 2016-05-10 02:07:09 UTC
Created attachment 1155503 [details]
2 bkr command files

Comment 4 jiazhan 2016-05-10 02:07:30 UTC
Hi Dan:
Thanks a lot for your guide and It took me some time to read the beaker doc and the code. Although I did not have make full idea of the code, but I have found ways to modify current code. I attached 2 files . 
cmd_system_create.py: I made it with based on template of other bkr command file
cmd_system_modify.py: I modified it and add some options , so we can add more attributes based on our needs.
I tried to integrate them into my script and it seems that they works fine on test system and  save quite a few time when register boxes in beaker.
Can you kindly have a check ?

Comment 5 Roman Joost 2016-05-16 02:40:32 UTC
*** Bug 1212227 has been marked as a duplicate of this bug. ***

Comment 6 matt jia 2016-05-16 05:44:31 UTC
(In reply to Dan Callaghan from comment #1)
> We could add a new command bkr system-create, for creating a new system in
> Beaker.
> 
> We already have bkr system-modify but it only allows changing a very small
> subset of the important attributes of a system. It seems like the important
> ones needed here are:
> 
> * lab controller
> * supported architectures
> * location
> * power settings
> 
> Possibly also install options and excluded families?

I think it would be easier to add install options and excluded families after we port 'Install Options' and 'Excluded Families' tabs to Backbone on the system page. For the initial version, we could just allow setting the important ones mentioned above first.

Comment 7 matt jia 2016-05-18 05:20:34 UTC
> We could add a new command bkr system-create, for creating a new system in
> Beaker.
> 
> We already have bkr system-modify but it only allows changing a very small
> subset of the important attributes of a system. It seems like the important
> ones needed here are:
> 
> * lab controller
> * supported architectures
> * location
> * power settings
> 

On Gerrit:

   https://gerrit.beaker-project.org/#/c/4900/

Comment 8 Dan Callaghan 2016-06-13 01:02:40 UTC
This bug fix is included in beaker-client-23.0-0.git.244.0980974 which is currently available for download here:

https://beaker-project.org/nightlies/develop/

Comment 10 Dan Callaghan 2016-07-07 23:10:36 UTC
Beaker 23.0 has been released.


Note You need to log in before you can comment on or make changes to this bug.