Issue with managing jenkins - jenkins

I have installed jenkins on my ubunut 14.10 as mentioned on this page install jenkins on ubunutu, after installation I started it by accessing port 8080.
I can not see any link to create new job or manage jenkins. I am not sure if there any change or do I have to do any other kind of setting, please help. This is my screen now.

I am quite sure this is due to the fact, that the user you used for login has not the permission to create new jobs. You have to login as admin and create a user with the correct permissions or add them to your existing user. Also you may need to install plugins if you want to use maven jobs for example. A standard security setup is explained here

Related

Run jenkins with service account on windows

Is there a way i can change the user the jenkins run without losing existing jenkins data/cofig. I tried changing the user in services.msc, however it crashed jenkins and was not able to load jenkins after changing user.
ps. Actually there are couple of jobs in which clone(git, tfs) happening with some user, however when it comes to running scripts/commands i get permission and attribute(readonly) issues as Jenkins is not running with same account that was used to clone repositories
Maybe your new user has not privileges on Jenkins home folder (C:\Program Files (x86)\Jenkins in my case). Just check rights on this folder.

Using Jenkins CLI to configure plugins

I am working on installing and configuring Jenkins automatically using the Jenkins CLI. I am able to install plugins such as the Active Directory plugin, but haven't figured out how to configure it. Is it possible to perform such tasks from the CLI? From a Jenkins GUI standpoint, I'd like to check the Enable security checkbox under Security Realm check the Active Directory option, provide parameters to Active Directory, and under Authorization check the Anyone can do anything option.
I'm using a Puppet module (https://forge.puppetlabs.com/rtyler/jenkins) for the automation.
Greetings,
Kenneth
If you want to modify their configuration files manually using scripts called from the CLI, then yes.
Else, I don't believe there is. At least, not a general way for all plugins. Plugins are capable of adding CLI commands, as per this documentation page:
https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI
Extending CLI
Plugins installed on Jenkins server can add custom CLI commands. See Writing CLI commands for more details.
So, some of the plugins you're using may have specific commands to configure them from the CLI.
So as far as I know those are your options. Manual configuration through editing their config files, or hoping your plugin includes some commands in the CLI that is specific to it.
There is currently a new Plugin in development called "Configuration as Code Plugin" to provide a way for configuration of plugins using YAML: https://github.com/jenkinsci/configuration-as-code-plugin/
They are currently in an early development stage but this could help solve this kind of problem.

How to automatically login to Jenkins on Active Directory?

I have an Active Directory plugin installed that allows logging in to Jenkins portal with my directory credentials by typing them in on the Login page.
But is there a way to automatically log in users if they are on a domain-joined machine? (Obviously, given the browser is configured to allow providing credentials to the site.)
There's a thread on Jenkins Dev group in which a guy mentions that he developed an SSO plugin that worked for him on Windows. He posted it on GitHub under name NegotiateSSO.
First you need to build it to get the hpi file. (Clone the project to your machine, cd into the directory and run mvn (Maven) in it).
The problem is that when I tried to install it, it broke my Jenkins configuration section/page. There's an exception happening inside the plugin that breaks the entire page.
So it didn't work for me, but hopefully it will get fixed at some point and we'll be able to use it.

How to deploy java application(war) to EC2 using jenkins?

I am setting up develop environment for java project.
And my team decide to use Jenkins for CI, and AWS EC2(linux) for server.
I succeeded to make an war file by jenkins job.
But, I can't find a way how to copy war file to EC2, and restart tomcat server on EC2.
I googled about it using "jenkins ec2 deploy", but in fail.
somebody help me!
Step 1. Install Jenkins plugin
Open your favorite browser and navigate to Jenkins. Log in and select “Manage Jenkins” followed by “Manage Plugins”. Select the “Available” tab, locate the “Deploy to container” plugin and install it.
Step 2. Edit tomcat-users.xml
In order for Tomcat to accept remote deployments, you have to add a user with the role manager-script. To do so, edit the file ../conf/tomcat-users.xml and add the following line:
<user username="deployer" password="deployer" roles="manager-script" />
Step 3. Edit the Jenkins job
Back in Jenkins, go to your job and select “Configure”. Next, scroll down to the bottom of the page to the “Post-build Actions”. Select the option “Deploy war/ear to a container” from the “Add post-build action” dropdown button. Fill in the new fields.
Step 4. Run the Job project and verify the end results
Schedule a build for your job in Jenkins. If you check out the log file you should see one or more lines near the end indicating that the war file has been deployed.
If you check the logfiles in Tomcat (catalina.out) you should also see that your application has been succesfully deployed.
Lastly, if you point your browser to the URL and context path you’ve specified in the job configuration in Jenkins (e.g., http://your-server:8080/mywebapp), you should be able to open your freshly deployed application.
Credits to Jdev.it
More info can be found here
With EC2 (or any other deployment practice too), first determine your production servers are going to be mutable or immutable.
[Mutable]
The servers will be running forever, and you perform on-going updates as explained in the blogpost mentioned above (elizabetht) for Java war, or many other ways for different languages/platform.
[Immutable]
The servers are re-created (vs. upgraded) by automation mechanism such as scripting, or using config. mgmt tools like Puppet/Chef/Ansible or vendor specific initialization mechanism like AWS Userdata/Docker dockerfile/Vagrant vagrantfile, or using many other provisioning tools.
Generally speaking databases or queues should be Mutable category, and all other compute nodes are better be Immutable category. The benefits of Immutable category are a lot including easy HA, disaster recovery and also enables Blue/Green deployment and much more.

Jenkins Crashes after installing GitHub Plugin

I have a question about updating GitHub plugin.
Everytime I do an update plugin such as GitHub and restart the jenkins, Jenkins start crashing. when I try to access jenkins through URL in my browser, the error page shows up with some exception "class not found jenkins/model jenkins" . and then in order to make jenkins working again , I have to delete the plugin entirely from the plugins directory. I wish someone has an answer for this because I really need to make my github projects available to jenkins for build. Thanks
It is a very usual problem with Jenkins. My workaround was to either update the jenkins (where ever it is installed) and restarting the hudson service.
sometimes even restarting the service works.
often you might need to remove those plugins from within (/var/lib/hudson/plugins/) and restart the service.

Resources