Posts

Showing posts with the label svn

Salt diaries: states (part 2 of deploying salt on a small network)

After part 1  of this series I had Salt running properly on all minions. It's now time to get some work done with it. We will start with something simple like making sure that ntp is installed and running on all minions. In order to to do that we will use the Salt  states enforcement feature. The default salt states configuration requires that: state definitions be kept in  /srv/salt the default state be named top.sls We will probably need to create both the directory and the files, which we can do with the following command (check that you are not overwriting your own state, needs to be done on the master only!): mkdir -p /srv/salt cat <<EOF >/srv/salt/top.sls base: '*': - ntp EOF What this state definition means is that the base state requires all nodes (as selected by '*') to apply the ntp state. Since we have not yet defined an ntp state we are going to do it right away: cat <<EOF >/srv/salt/ntp.sls ntp: pkg: - ins...

SVN Revert (but only *some* changes)

Sometimes I endeavor in complicate refactorings and, instead of commiting to a branch when at least a part is working, I keep editing until I lose control of the source and wished that I could go back to that previous working situation. The solution is, luckily, not too difficult: save the edits to a patch svn diff > great_mother_of_all_patches.patch revert the project to the last commit: svn revert -R . apply the patch edit by edit (I know this is tedious) using the eclipse " Team Synchronizing " perspective, then click on the Synchronize button and choose the Synchronize with patch option Disclaimer : I don't use the Eclipse subversion plugin because, on Linux at least, it frequently crashes Eclipse.