To have a jenkins job which acts on a remote server via ssh - and has a parameter to choose which server(s) to use.
I'm working on a project where I find I want to semi-regularly adjust a config file for local testing, but want to be sure I don't commit that file by mistake.
Seems the best approach is
git update-index --skip-worktree $filename
This tells git to skip this file when I push, if the remote file changes it will warn me
To switch back
I needed to setup a VPN client connection on a headless system where the VPN is slow and so I want to route the minimal amount of traffic through it. I need DNS to use the VPN but only for one domain.
This is my setup using pptp and dnsmasq (tested on centOS)
Basic VPN config is here /etc/ppp/peers/office
This has been annoying to work out.
The puppet apache module will by default create the document root for a virtualhost if it is not already defined. But since I wanted the documentroot to be managed by a custom RPM I don't have a reference to the actual directory in puppet.
This worked for me today - saving it here so I can find it again
One of those things that happens from time to time on a dual boot system...
Windows breaks grub, usually if I've reinstalled windows, this can lead to a unbootable system.
Boot from a Ubuntu (or other distro) live disk or USB stick.
Figure out which your disks and partitions are.
sudo mount /dev/sdXY /mnt
# if there is a boot partition
sudo mount /dev/sdUV /mnt/boot
sudo grub-install --recheck --root-directory=/mnt /dev/sdZ
When you reboot grub should be back to normal.
$new_branch=$1 # passed as param
current_branch="$(git symbolic-ref HEAD 2>/dev/null)"
current_id=$(git rev-parse --short origin/$current_branch)
new_id=$(git rev-parse --short origin/$new_branch)
last_tag=$(git describe --abbrev=0 --tags)
Git has the concept of both submodules and subtrees, there seem to be some problems with each solution, nether being well loved as far as I can see.
Both add significant complexity to a project, and require extra care - but the alternative is monolithic projects or a lot of copy-pasting.
I've published a project on github https://github.com/practicalweb/vagrant-rpmbuild
The project contains a Vagrant config file, and Puppet manifests that together with an appropriate basebox will create a VM setup to build RPMS and host them on a Custom Yum repository
To run this
- Install vagrant http://vagrantup.com/ (on Ubuntu just
apt-get install vagrant)