System Administration

Adding a new git repository to my gitosis setup.

Quick cheatsheet for adding a new git repository under my setup (with gitosis)

The main reason that I have this note is because this is much simpler than I expect - I always think that it will be much more complex, and so start researching how everything fits together :-)


1: Add the project / repo to gitosis:

1.1: Edit the ~/src/configs/gitosis-admin/gitosis.conf:

[group data]
members = wkumari wkumari@eric
writable = data

1.2: Commit and push the change:

root@ron[0]:~/src/configs/gitosis-admin# git commit -a -m "Added the 'data' repository"
[master 9072fe9] Added the 'data' repository
1 file changed, 4 insertions(+)

root@ron[0]:~/src/configs/gitosis-admin# git push
Counting objects: 3, done.
Delta compression using up to 24 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 331 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
7320023..9072fe9 master -> master

2: Create and push the repo:

wkumari@ron[0]:~$ mkdir data
wkumari@ron[0]:~$ cd data/
wkumari@ron[0]:~/data$ ls
wkumari@ron[0]:~/data$ touch testfile
wkumari@ron[0]:~/data$ git init
Initialized empty Git repository in /home/wkumari/data/.git/
wkumari@ron[0]:~/data$ git add testfile
wkumari@ron[0]:~/data$ git commit -a -m "Add a test file"
wkumari@ron[0]:~/data$ git remote add origin
wkumari@ron[0]:~/data$ git push --set-upstream origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 214 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
wkumari@ron[0]:~/data$ git push
Everything up-to-date

3: Profit!!!

Fixing the new Ubuntu grub / VGA console.

I use Ubuntu on various servers; unfortunatly Ubuntu is increasingly aimed more at a consumer desktop audience, and it tries to do things like boot with a pretty, high resolution spash screen, hide the grub screen, etc. This does not work at all well for a server - it fails with the monitors on datacenter crash carts, it fails with many KVMs, DRACs, etc. 

In order to get back to a more sane console, edit /etc/defaults/grub and make the beginning look like: 

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="nosplash xvga=640x480"

Adding a new git repo to my system

I don't add new repos very often, so this is my cheatsheet....

On ron: edit src/configs/gitosis-admin/gitosis.conf

Commit and push these changes.

Then simply git checkout the new repo name. I generally name repos something like code_python, so checkout and then rename the directory. Done!


To add an existing git repo: 
git remote add origin

Sync'ing a git / GitHub fork.

I need to do this fairly frequently, and for some reason I can never remember the steps, so I'm writing it down!

This isn't news, it is lifted from the GitHub Configuring a remote for a fork and Syncing a fork pages.

$ git remote add upstream

$ git fetch upstream
$ git checkout master
$ git merge upstream/master

Make your edits, etc. Push (this will push to your fork), make pull-request. Next time you need to sync the orogin, start at the 'git fetch upstream' step.


Making Avocent KVM work under OS X.

The promise of Java was "Write once, run anywhere" (WORA), or more aptly, "Write once, run everywhere" (WORE).

Unfortunately, because Oracle, it is more "Write once, spend days beating head against the latest random platform changes, curse, poke at random things, eventually get it to kinda work."

There is a definite correlation to things made by the Sirius Cybernetics Corporation:

"It is very easy to be blinded to the essential uselessness of them by the sense of achievement you get from getting them to work at all

In other words - and this is the rock solid principle on which the whole of the Corporation's Galaxy-wide success is founded - their fundamental design flaws are completely hidden by their superficial design flaws." -- Douglas Adams.


Anyway, if you are still reading and determined to get your Avocent DSR1030 / DSR2030 / DSR4030 / DSR 8030 working under OS X, this worked for me (under the specific build of Java on the specific version of OS X, etc. YMMV):

Edit: "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/security/"

Comment out:

jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & usage TLSServer, \
RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224
jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024, \
 EC keySize < 224, DES40_CBC, RC4_40, 3DES_EDE_CBC

and insert:

jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024, DSA keySize < 768, EC keySize < 224
jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768, EC keySize < 224, DES40_CBC, RC4_40, 3DES_EDE_CBC

Note that this changes the DSA keySize parameter from requiring 1024bit or longer to allowing 768 bit. This is not great security practice, but I only use Java for this app, and so I've decided it is a tradeoff I'm willing to make. In theory, this could be configured with a wrapper script (or possibly handing in -D options on the CLI), but Java (and Avocent) has made my sufficiently annoyed that I'm not willing to spend more time on this.