Hot answers tagged

35

There are many ways to do this but the easiest way I can think is doing a backup of the Jenkins Home folder. You can see where is your Jenkins home with: echo $JENKINS_HOME And for example, if you only want to backup the jobs you can go to: cd $JENKINS_HOME/jobs And make a backup for that folder. All that configuration will be a bunch of XML files. If ...


33

All jobs (jobs/) and master config files (config.xml) can be found in Jenkins home folder (JENKINS_HOME) in the following structure: JENKINS_HOME +- config.xml (jenkins root configuration) +- *.xml (other site-wide configuration files) +- userContent (files in this directory will be served under your http://server/userContent/) +- ...


11

If your Jenkins jobs are defined in a Jenkinsfile you can store it in a git repository and have it loaded up by using Pipeline. Unfortunately, since not all Jenkins plugins support Jenkinsfile and Pipeline, you will need to manually create new Jenkinsfiles if you wish to move existing jobs to this format.


9

The SCM Sync Configuration Plugin does exactly what you wish. Works with either svn or git to backup your jenkins core and job configuration, so gives you easy tracking as to who made changes, as well as a backup.


9

There are options you can pass through apt-get to dpkg that will handle the config choices. We usually do something like: apt-get install -y --no_install_recommends -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' <package_name> When using ansible you can do: apt: pkg: "{{ item }}" only_upgrade: yes ...


8

Well, the extra bells and whistles is called process isolation, a container gets its own namespace from the host kernel, that means the program in the container can't try to read kernel memory or eat more RAM than allowed. It also isolate network stacks, so two process can listen on port 8080 for exemple, you'll have to handle the routing at host level, ...


7

I'll put in an answer although I'm not 100% sure. I think that you got the permissions wrong on ~/.ssh and it should be 0700 instead of 0600, otherwise the user cannot access it. Another tip which is unrelated to your problem, the user resource has a property manage_home (https://docs.chef.io/resource_user.html#properties) which will create the home ...


6

Docker is a specific implementation of Linux containers, or if you want to be more precise Docker is a distribution of tools that includes runc which is an implementation of Linux containers. Other implementations include rkt, LXC, LXD, and (I think) Snappy from Ubuntu.


6

Does the Docker engine abstract away the OS such that this configuration will run both apps? No, it does not. Docker uses containerisation as a core technology, which relies on the concept of sharing a kernel between containers. If one Docker image relies on a Windows kernel and another relies on a Linux kernel, you cannot run those two images on the same ...


5

As you can't build a docker image for an arm kernel from a x86 one neither. Nor can't you build an image with a glibc lib targetting a 4.x kernel on a host running a 3.X kernel. Docker isolate processes and give a virtual filesystem but that's still the host kernel who own the process, so obviously without a layer of hardware virtualization like virtualbox,...


5

Your python problem is the \n after the commands, write already append a newline, so your script does the following: $cred = Get-Credential # Start the command # This line is ignored as extraneous after Get-Credential, but you can see it in your output. Administrator # Send proprely to the User: prompt # Sent to the Password: prompt Password # Send to the ...


5

My solution to this problem was to rework my Services. The setup in my question had one K8s Service with ~10 ports. I reworked the setup to use one port per Service. The problem went away. I don't know why though. This makes me suspect something on the nodes themselves or some complexity in routing connections to the correct node port. I'm cautious of ...


5

There are few ways to backup jenkins data and master configurations. The best way for backup is to use the Thinbackup plugin. You can schedule timely backups using cron expressions. You can configure full backup and incremental backup as well. Another way to backup data and config is to take the disk snapshot of your jenkins master server. The ideal way to ...


5

Yes, there absolutely is more to it than chroot to the point that they have little to nothing in common. A standardized script file format including semantics relating to the task a hand Images (including anonymous in-between images), caching, naming, downloading etc. including powerful management (docker image prune ...) Containers (including their own ...


5

TL;DR Pick software that focuses on long-term support. Use containers so that you can separate the runtime you need for your app from the security patching of the underlying infrastructure. Long Answer: I used to run some old PHP sites running popular content management systems. The plugins would fall out of support such that I could not upgrade the ...


4

As Tensibai mentioned, you can extract this info from the /proc filesystem, but in most cases you need to determine the trending yourself. There are several places which could be of interest: /proc/[pid]/statm Provides information about memory usage, measured in pages. The columns are: size (1) total program size ...


4

Use this source code for reboot your client machine --- - name: System Reboot hosts: debian become_method: sudo become_user: root become: true tasks: - name: reboot nodes # Reboot client side debian machine shell: sleep 2 && shutdown -r now "Ansible reboot" async: 1 poll: 0 ...


3

SaltStack provides a method for modifying grains and adding additional information to the grains dictionary in several different ways by either setting them in the /etc/salt/minion config and/or through the /etc/salt/grains file. For example: 1. add grains to the minion config. Note, simply include the grains key here: id: minion-07 grains: roles: - ...


3

You can easily set the target operating system and processor architecture using the environment variables GOOS and GOARCH respectively. So, as you want to build it for linux operating system, following command with above environment variables will do, $ GOOS=linux GOARCH=amd64 go build -o hello main.go Here is the list of all the supported operating ...


3

It seems that docker build opens a new shell and export is needed. The following command created a Linux binary: export GOOS=linux; go build hello-world.go


3

Try to run such command as root or grant user and group rights to the folder with chown. That's only what comes to my mind for now.


3

You can try the thinBackup plugin (even though it is not actively maintained) [if taking a logical backup is all you want] (i.e. most of the config xml files, jobs, nodes etc). The backup size won't be huge.


3

I'm using scripts from sue445/jenkins-backup-script. It archives Jenkins settings and plugins such as: $JENKINS_HOME/*.xml $JENKINS_HOME/jobs/*/*.xml $JENKINS_HOME/nodes/* $JENKINS_HOME/plugins/*.jpi $JENKINS_HOME/secrets/* $JENKINS_HOME/users/* Usage ./jenkins-backup.sh /path/to/jenkins_home archive.tar.gz # add timestamp suffix ./jenkins-backup.sh /...


3

Connecting a node to Jenkins through a terminal only is a two step process. First, you should ssh into into your node machines and set them up with the following steps: Make a jenkins user shell: sudo adduser jenkins --shell /bin/bash Create the directory after switching to the jenkins user: mkdir /home/jenkins/jenkins_slave Create your SSH credentials ...


3

The reason for the failure is that the server in question, unlike all the others, had sftp disabled. Why the error messages are what they are, I don't know (why the errant scp transfer mechanism failed?), but I don't have time right now to investigate with the debug option enabled. But that was the issue, and adding scp_if_ssh=True to the [ssh_connection] ...


3

Peter's module not working in CentOS and I write my own module: #!/usr/bin/python # encoding: utf-8 import subprocess from ansible.module_utils.basic import * from netaddr import IPNetwork def get_priv_interface_info_for_ip(ip): network_config = subprocess.Popen(["/usr/sbin/ip", "-o", "addr", "show"], stdout=subprocess.PIPE) result = ...


3

I am less familiar with what Azure offers, but other cloud providers offer a way to manage users external to the VMs the provide (normally IAM permissions). I would not bake user into the system but look for an external way to manage them. This allows you to more easily remove users that leave your company or add new users that join. If Azure doesn't ...


3

I would agree with previous statements: avoid baking users into your base image with Packer. Likewise, you should avoid baking them with Terraform as well. Terraform does not provide a mechanism to perform on-going changes after the server is provisioned. It only has those initial provisioning scripts that get run only one time. If you manage users with ...


3

What you are primarily discussing is the hosting model for the underlying cloud you are using, for example, from what you have said so far your hosting model is relying on Infrastructure-as-a-Service (IaaS), and you want to have less responsibility for managing the Operating System. That being the case you would need to move right in the table below to ...


Only top voted, non community-wiki answers of a minimum length are eligible