Disabling Jenkins security during chef provisioning

58 views
Skip to first unread message

Farrukh Najmi

unread,
Feb 22, 2017, 4:24:03 PM2/22/17
to Jenkins Users
Hi Guys, I am trying to setup Jenkins using the chef recipe at https://supermarket.chef.io/cookbooks/jenkins

I would like to provision jenkins plugins using the CLI but have run into a bootstrapping issue. 

Seems the default installation uses a strict config.xml that requires <useSecurity>true</useSecurity>. 
This means I cannot use the CLI to install plugins during provisioning because I cannot do so as anonymous user. 

I tried updating the config.xml file to have:

 <useSecurity>false</useSecurity> 

But it seems that upon "service jenkins restart" my config.xml file gets reverted to its original value. Any suggestions on how top work around this?

Farrukh Najmi

unread,
Feb 27, 2017, 1:24:03 PM2/27/17
to Jenkins Users

I would be grateful if someone that knows Jenkins internals could comment on this post. I need to know how to avoid Jenkins setting "<useSecurity>true</useSecurity>" on first startup. If there is a known issue here I would appreciate a issue link. If there should be an issue filed please let me know and I will do so. Thanks.

Daniel Beck

unread,
Feb 27, 2017, 1:29:14 PM2/27/17
to jenkins...@googlegroups.com
Try setting the system property jenkins.install.runSetupWizard to false.

https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/99f11d26-b9c2-466a-b7cb-655705b7e8dd%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Farrukh Najmi

unread,
Feb 28, 2017, 9:46:53 AM2/28/17
to jenkins...@googlegroups.com
Confirming that "setting the system property jenkins.install.runSetupWizard to false" did the trick for me. Thanks very much Daniel Beck for helping me out.

On Mon, Feb 27, 2017 at 1:28 PM, Daniel Beck <m...@beckweb.net> wrote:
Try setting the system property jenkins.install.runSetupWizard to false.

https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties

> On 22.02.2017, at 22:24, Farrukh Najmi <farruk...@gmail.com> wrote:
>
> Hi Guys, I am trying to setup Jenkins using the chef recipe at https://supermarket.chef.io/cookbooks/jenkins.
>
> I would like to provision jenkins plugins using the CLI but have run into a bootstrapping issue.
>
> Seems the default installation uses a strict config.xml that requires <useSecurity>true</useSecurity>.
> This means I cannot use the CLI to install plugins during provisioning because I cannot do so as anonymous user.
>
> I tried updating the config.xml file to have:
>
>  <useSecurity>false</useSecurity>
>
> But it seems that upon "service jenkins restart" my config.xml file gets reverted to its original value. Any suggestions on how top work around this?
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/OICUwtY8IyI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CE96F7BE-8373-4ADA-80BB-2747FD106BFD%40beckweb.net.

For more options, visit https://groups.google.com/d/optout.



--
Regards,
Farrukh
Reply all
Reply to author
Forward
0 new messages