Notice: register_sidebar was called incorrectly. No id was set in the arguments array for the "Sidebar 1" sidebar. Defaulting to "sidebar-1". Manually set the id to "sidebar-1" to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in /usr/share/wordpress/wp-includes/functions.php on line 4139 Tech Notes » 2013 » October

Jenkins on Synology xx09 -Series

Uncategorized No Comments »

In order to get a basic CI build box going, I decided ot leverage the Synology that seems underwhelmed in what I’ve currently thrown at it.

I’d love to see a Jenkins on http://www.nslu2-linux.org/wiki/Optware/AddAPackageToOptware but for now, it’s a hack.

I followed some basic online instructions to some success:

  1. Checking What kind of CPU does my NAS have, I clearly have a MPC8533 running 64bits and 512MB
  2. per http://forum.synology.com/wiki/index.php/Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc I need the bootstrap http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/syno-e500-bootstrap_1.2-7_powerpc.xsh, which I ran from a basic root login
  3. ipkg update, ipkg search jamvm pulled in libgmp-4.3.2-1, file-5.12-1, classpath-0.98-1, zlib-1.2.5-1, and jamvm-1.5.4-1
  4. jamvm -version
    java version "1.5.0"
    JamVM version 1.5.4
    Copyright (C) 2003-2010 Robert Lougher
    
    ...
    
    Execution Engine: inline-threaded interpreter with stack-caching
    Compiled with: gcc 3.4.3 20041021 (prerelease)
    
    Boot Library Path: /opt/lib/classpath
    Boot Class Path: /opt/share/jamvm/classes.zip:/opt/share/classpath/glibj.zip
  5. http://webselblog.wordpress.com/2011/08/20/howto-setup-jenkins-on-a-synology-ds1511/ has a few typos (I hope I don’t add any!), but discusses how to hand-tool Jenkins into place:
    1. echo 'jenkins:x:145:145:Jenkins:/var/lib/jenkins:/bin/sh' >> /etc/passwd
    2. echo 'jenkins:*:10933:0:99999:7:::' >> /etc/shadow
    3. echo 'jenkins:x:145:jenkins' >> /etc/group
    4. mkdir -p /opt/jenkins/data
    5. ln -s /opt/jenkins /var/lib/jenkins
    6. check it so far: ls -al ~jenkins/data
    7. chown jenkins:jenkins /opt/jenkins/data
    8. wget -O /var/lib/jenkins/jenkins.war http://mirrors.jenkins-ci.org/war/latest/jenkins.war
    9. create the /var/lib/jenkins/jenkins_start.sh script below
    10. chmod 755 /var/lib/jenkins/jenkins_start.sh
    11. run it: /var/lib/jenkins/jenkins_start.sh
    12. check for errors in /var/lib/jenkins/data/console_log
    13. You now have a server online at your Synology server, port 8080
  6. Unfortunately, I’m stuck at:> JENKINS_HOME=/var/lib/jenkins/data /opt/bin/jamvm -XX:PermSize=512M -XX:MaxPermSize=2048M -Xmn128M -Xms1024M -Xmx2048M -jar /var/lib/jenkins/jenkins.war
    Unrecognised command line option: -Xmn128M
    ; removing that option, Segmentation fault (core dumped)
    … I think the next step is to swap in a full JVM in place of JamVM: http://www.nslu2-linux.org/wiki/DS101/JavaOnDS101G

The start/stop script look like:

su -s /bin/sh jenkins -c "
cd /var/lib/jenkins
JENKINS_HOME=/var/lib/jenkins/data exec nohup /usr/java/bin/java -jar /var/lib/jenkins/jenkins.war $JENKINS_OPTS >/var/lib/jenkins/data/console_log 2>&1 &
echo $! >/var/lib/jenkins/data/jenkins.pid"

That “JENKINS_…&” line is all one line from the “JENKINS_HOME=” to the “&” at the end. Also, if you’re cutting-and-pasting, watch out for “improved” quotation marks.

Brother MFC-J425W Scanner Buttons onto CentOS-6.4

Uncategorized No Comments »

I’m trying to get my scanner to send content to a CentOS-6.4 VM; I’m certain now it’s a case of using the buttons to trigger a request to pull content, which indeed fits the definition of what is actually happening in a modern day “push” of data (for example, MMS is really a short SMS to come and get a big payload; push-email is a notice to come and get stuff).

So. There I was. a MFC-J425W is really a brscan4 daemon, so I grabbed that:

  1. http://www.brother.com/pub/bsc/linux/dlf/brscan4-0.4.1-6.x86_64.rpm
  2. http://www.brother.com/pub/bsc/linux/dlf/brscan-skey-0.2.4-1.x86_64.rpm

Problem is, the install %post scriptlet of brscan4 called its own /opt/brother/scanner/brscan4/setupSaneScan4 which on line 13 went looking for /etc/sane.d/dll.conf which is part of sane. Unfortunately, the notion of “dependency” escapes those brscan* RPMs, so I’ll need to add that RPM as well. sane drags in most of the state of Georgia (well, maybe just sane-frontends which pulls in libexif, libgphoto2, libieee1284, libtool-ltdl, libv4l, lockdev, sane-backends, sane-backends-libs, and sane-backends-libs-gphoto2)

A re-install of the brscan twins (yum erase, yum localinstall) doesn’t experience the same error, so I’m onto a good start.

A quick “sudo /usr/bin/brsaneconfig4 -a name=Groucho model=MFC-J425W ip=10.0.0.12” got me a registered printer under scanimage -L:

device `brother4:net1;dev0' is a Brother Groucho MFC-J425W

Success. I think ?

The next step would be a scanner-button-daemon such as scanbd; I want to use the provided Brother brscan-skey and I found that after scanimage -L found the scanner, brscan-skey can as well:

$ sudo brscan-skey -l

$ sudo brscan-skey -t
$ sudo brscan-skey
$ sudo brscan-skey -l

Groucho : brother4:net1;dev0 : 10.0.0.12 Active

That’s a fair amount of progress for the day. These are mostly notes for myself, but I hope someone else can benefit. My next step would be a customization of the brscan-skey such as per http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/instruction_scn5.html

VMWare Copied Linux Gotchas

How to, virtualization No Comments »

When I manually-clone a VM in VMWare, there are a few things I tend to have to remember. More of a memo to myself, this post will be edited or refer to later posts as necessary. I use this because I forget, and google finds my own stuff as quickly as someone else’s…

  1. Install a new VM
  2. Choose to install from another VM
  3. Choose to duplicate, not share nor steal the disk(s)
  4. Search for the Virtual Disk.vmdk file to copy (if it’s not found, is the prototype VM stopped?)
  5. wait for the install to complete
  6. edit the new MAC into the /etc/sysconfig/network-scripts/ifcfg-eth0 file
  7. check for a butchered /etc/udev/rules.d/70-persistent-net.rules file (delete the ones from the previous MAC)

From there, the new clone acts like an independent system. I usually pop into my router and hard-set the MACAddr’s name so that the DDNS gives me the IP from the hostname when the DHCP dishes out an address. That avoids the DNS delay that most people kinda forget/dont-care in PTR lookup at connection time in, oh, everything.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in