[uyuni-users] Re: Aw: [uyuni-devel] Looking for a way to automate the first organization creation
Hi Christian and Robert. AFAIK, /root/setup_env.sh will not allow you to specify data for the first org and user. But you can use curl to fill in the form with a call like this one: curl -k -X POST -d "submitted=true&orgName=MYORGNAME&login=MYADMINUSER&desiredpassword=MYADMINPASSWORD&desiredpasswordConfirm=MYADMINPASSWORD&email=MYADMINEMAIL&firstNames=MYADMINFIRSTNAME&lastName=MYADMINLASTNAME" https://UYUNISERVERHOSTNAME/rhn/newlogin/CreateFirstUser.do Just replace the stuff in caps with the data you want for your first organization and user, and UYUNISERVERHOSTNAME with the hostname/IP for the server. Needless to say, the call could change a little if the webUI changes at some point, but this was working when I prepared the workshop for Uyuni at the openSUSE Conference 2018, and I am not aware we changed this part of the WebUI. BTW: Since the last week we already have uyuni-users@opensuse.org [1] available for user related discussion. I am adding this to CC so we can have record of this thread there. Best regards. [1] You can subscribe at https://lists.opensuse.org/uyuni-users/ On miércoles, 14 de noviembre de 2018 0:28:32 (CET) Robert Paschedag wrote:
I think, currently there is no way. This has been removed in 2015. See https://www.redhat.com/archives/spacewalk-devel/2015-December/msg00000.html .
Currently, I could only think of manual SQL to first create the user and then, create the org.
Good luck.
Robert
Gesendet: Dienstag, 13. November 2018 um 23:30 Uhr Von: "Stankowic, Christian" <Christian.Stankowic@sva.de> An: "uyuni-devel@opensuse.org" <uyuni-devel@opensuse.org> Betreff: [uyuni-devel] Looking for a way to automate the first organization creation
Hello Uyuni team!
I'm currently writing a Chef cookbook for automating Uyuni test deployments. After installing Uyuni, the first organization still needs to be created using the web page.
I understand that there is an automation tool spacecmd, but this seems not to work if no organization or admin user exist:
# spacecmd org_create Spacewalk Username: Spacewalk Password: ERROR: Invalid credentials
I figured out that entering no username/password does not work (also not via the .spacecmd/config file) - so therefore the error message seems legit.
My question is now: how can I automate this? I cannot used the web page in an automated manner. Is there an option for the /root/setup_env.sh file?
Thanks a lot in advance - also keep up the good work!
Best wishes, Christian Stankowic
-- Julio González Gil <jgonzalez@suse.com> Release Engineer SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/ SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
Hello Julio, thanks for the feedback and the hint about the uyuni-users mailing list! I also created an issue on GitHub[1], IMHO this would be a great feature enhancement. [1]: https://github.com/uyuni-project/uyuni/issues/296 Best regards, Christian. -----Ursprüngliche Nachricht----- Von: Julio González Gil <jgonzalez@suse.com> Gesendet: Mittwoch, 14. November 2018 00:51 An: uyuni-devel@opensuse.org Cc: Robert Paschedag <robert.paschedag@web.de>; Stankowic, Christian <Christian.Stankowic@sva.de>; uyuni-users@opensuse.org Betreff: Re: Aw: [uyuni-devel] Looking for a way to automate the first organization creation Hi Christian and Robert. AFAIK, /root/setup_env.sh will not allow you to specify data for the first org and user. But you can use curl to fill in the form with a call like this one: curl -k -X POST -d "submitted=true&orgName=MYORGNAME&login=MYADMINUSER&desiredpassword=MYADMINPASSWORD&desiredpasswordConfirm=MYADMINPASSWORD&email=MYADMINEMAIL&firstNames=MYADMINFIRSTNAME&lastName=MYADMINLASTNAME" https://UYUNISERVERHOSTNAME/rhn/newlogin/CreateFirstUser.do Just replace the stuff in caps with the data you want for your first organization and user, and UYUNISERVERHOSTNAME with the hostname/IP for the server. Needless to say, the call could change a little if the webUI changes at some point, but this was working when I prepared the workshop for Uyuni at the openSUSE Conference 2018, and I am not aware we changed this part of the WebUI. BTW: Since the last week we already have uyuni-users@opensuse.org [1] available for user related discussion. I am adding this to CC so we can have record of this thread there. Best regards. [1] You can subscribe at https://lists.opensuse.org/uyuni-users/ On miércoles, 14 de noviembre de 2018 0:28:32 (CET) Robert Paschedag wrote:
I think, currently there is no way. This has been removed in 2015. See https://www.redhat.com/archives/spacewalk-devel/2015-December/msg00000 .html .
Currently, I could only think of manual SQL to first create the user and then, create the org.
Good luck.
Robert
Gesendet: Dienstag, 13. November 2018 um 23:30 Uhr Von: "Stankowic, Christian" <Christian.Stankowic@sva.de> An: "uyuni-devel@opensuse.org" <uyuni-devel@opensuse.org> Betreff: [uyuni-devel] Looking for a way to automate the first organization creation
Hello Uyuni team!
I'm currently writing a Chef cookbook for automating Uyuni test deployments. After installing Uyuni, the first organization still needs to be created using the web page.
I understand that there is an automation tool spacecmd, but this seems not to work if no organization or admin user exist:
# spacecmd org_create Spacewalk Username: Spacewalk Password: ERROR: Invalid credentials
I figured out that entering no username/password does not work (also not via the .spacecmd/config file) - so therefore the error message seems legit.
My question is now: how can I automate this? I cannot used the web page in an automated manner. Is there an option for the /root/setup_env.sh file?
Thanks a lot in advance - also keep up the good work!
Best wishes, Christian Stankowic
-- Julio González Gil <jgonzalez@suse.com> Release Engineer SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/ SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
participants (2)
-
Julio González Gil
-
Stankowic, Christian