Jenkins-Tomcat manual upgrade script

By polfilm,
#!/bin/bash
 echo "stopping tomcat"
 sh /etc/init.d/tomcat6 stop
 cd /var/lib/tomcat6/webapps
 echo "removing jenkins"
 rm -rf jenkins
 rm -rf jenkins.war
 echo "downloading latest jenkins"
 wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war
 echo "starting tomcat"
 sh /etc/init.d/tomcat6 start
 cd ~
 echo "done"

Credit: http://www.christianoestreich.com/2011/03/jenkins-upgrade-script/
In ubuntu old jenkins.war is in /usr/share/jenkins/ folder
In ubuntu use “service tomcat6 stop” to stop the service

OpenVPN Ubuntu 12.04 Autostart

By polfilm,
sudo update-rc.d openvpn enable 2345

/etc/openvpn/ (config files go here)
	>> change config extension client.ovpn to client.conf
	>> change group=nobody to group=nogroup
	
/etc/default/openvpn (file)
	>> AUTOSTART=all

Knife EC2 [official]

By polfilm,

This is the official Opscode Knife plugin for EC2. This plugin gives knife the ability to create, bootstrap, and manage EC2 instances.

https://github.com/opscode/knife-ec2

knife ec2 server create -r "role[ubuntu]" -I ami-399ca94d -f m1.small -S knife -i ~/.ssh/knife.pem --ssh-user ubuntu --region eu-west-1 -Z eu-west-1a

knife ec2 server list --region eu-west-1

NLTK 2.0 – Natural Language Toolkit

By polfilm,

NLTK is a leading platform for building Python programs to work with human language data. It provides easy-to-use interfaces to over 50 corpora and lexical resources such as WordNet, along with a suite of text processing libraries for classification, tokenization, stemming, tagging, parsing, and semantic reasoning.

http://nltk.org/

Machine Learning Methods for Personalized Email Prioritization

By polfilm,

Email is one of the most prevalent communication tools today, and solving the email overload problem is pressingly urgent. A good way to alleviate email overload is to automatically prioritize received messages f1ording to the priorities of each user. However, research on statistical learning methods for fully personalized email prioritization has been sparse due to privacy issues, since people are reluctant to share personal messages and priority judgments with the research community. It is therefore important to develop and evaluate personalized email prioritization methods under the assumption that only limited training examples can be available, and that the system can only have the personal email data of each user during the training and testing of the model for that user.

We focus on three aspects: 1) we investigate how to express the ordinal relations among the priority levels through classification and regression. 2) we analyze personal social networks to capture user groups and to obtain rich features that represent the social roles from the viewpoint of a particular user. 3) We also developed a semi-supervised (transductive) learning algorithm that propagates importance labels from training examples to test examples through messages and user nodes in a personal email network. These methods together enable us to obtain both a better modeling priority and an enriched vector representation of each new email message.

Our contribution is as follows. First, we have successfully collected multiple users’ private email data with their fine grained personal priority labels. Second, we apply and propose learning approaches from multi-type  information such as text, and sender / recipients information. Third, to supplement additional information to sparse training data, we identify the importance of a contact and similar contacts from social networks. Fourth, we exploit a semi-supervised learning on the personal email networks. Finally, we conducted and completed systematic evaluations with respect to email prioritization, targeting the discovery of better modeling of email priorities. Through our suggested approaches, email prioritization alleviates email glut and should help our daily productivity.

http://www.lti.cs.cmu.edu/research/thesis/2010/shinjae_yoo.pdf

Information Security

By polfilm,

CISSP – Certified Information Systems Security Professional

CEH – Certified Ethical Hacker

CHFI – Certified Hacking Forensic Investigator

CISA – Certified Information Systems Auditor

CIA – Confidentiality, Integrity and Availability

Cobbler

By polfilm,

Cobbler is a Linux installation server that allows for rapid setup of network installation environments. It glues together and automates many associated Linux tasks so you do not have to hop between lots of various commands and applications when rolling out new systems, and, in some cases, changing existing ones. It can help with installation, DNS, DHCP, package updates, power management, configuration management orchestration, and much more.

http://cobbler.github.com/

Cobbler, kickstart, and PXE boot
http://marksallee.wordpress.com/2011/01/24/cobbler-kickstart-and-pxe-boot/

Collins

By polfilm,

Collins consists of the core application, a set of client libraries, the collins-shell, and an automation toolchain. Nothing but collins core is required.

Documented, consistent REST API
Client API libraries in Ruby, Python and Bash
A collins command line shell for scripting and automation
A callback system for hooking into asset lifecycle events
Multiple authentication backends (LDAP, files, etc)
Per-feature and per-endpoint configurable permissions
Flexible Web and API based provisioning (PXE, SSH/grub/kickstart, API (e.g. AWS))
Power management support
IP Address allocation and management support
Support for running collins in distributed mode across multiple datacenters
Flexible data-model supporting multi-dimensional keys/values per asset
Simple key/value queries as well as a more advanced query language
A script engine for modifying collins behavior
Internationalized language support

http://tumblr.github.com/collins/index.html

http://tumblr.github.com/assets/2012-06-scalable_system_operations.pdf

CentOS Virtualized – eth0 not found?

By polfilm,

Network interface probably changed the name when you cloned as original version guid and mac are stored in a different file. To verify run:

ifconfig -a

or

ip a l

If its hiding under eth1 or some other name then you’re in luck.
Remove the kernel’s networking interface rules file so that it can be regenerated

rm -f /etc/udev/rules.d/70-persistant-net.rules

Now set your eth0 info in /etc/sysconfig/network-scripts/ifcfg-eth0. Remove mac and guid from the file and reboot. For static IP setup you may want to try this

The Foreman

By polfilm,

The Foreman is aimed to be a single address for all machines life cycle management.

Foreman Installation on CentOS 6 with EPEL
https://github.com/ekohl/foreman-howto/blob/master/README.rst

Ovirt Foreman UI Plugin
http://ovedou.blogspot.co.il/2012/12/ovirt-foreman-ui-plugin.html

Blog Foreman
http://blog.theforeman.org/

Vagrant

By polfilm,

Vagrant uses Oracle’s VirtualBox to build configurable, lightweight, and portable virtual machines dynamically. The first couple of pages serve to introduce you to Vagrant and what it has to offer while the rest of the guide is a technical walkthrough for building a fully functional web development environment. The getting started guide concludes by explaining how to package the newly created vagrant environment so other developers can get up and running in just a couple commands.

http://www.vagrantup.com/

Jenkins – An extendable open source continuous integration server

By polfilm,

Jenkins is an award-winning application that monitors executions of repeated jobs, such as building a software project or jobs run by cron. Among those things, current Jenkins focuses on the following two jobs:

Building/testing software projects continuously, just like CruiseControl or DamageControl. In a nutshell, Jenkins provides an easy-to-use so-called continuous integration system, making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. The automated, continuous build increases the productivity.
Monitoring executions of externally-run jobs, such as cron jobs and procmail jobs, even those that are run on a remote machine. For example, with cron, all you receive is regular e-mails that capture the output, and it is up to you to look at them diligently and notice when it broke. Jenkins keeps those outputs and makes it easy for you to notice when something is wrong.

http://jenkins-ci.org/

C# NUnit Testing
http://stackoverflow.com/questions/9121312/how-do-you-run-nunit-tests-from-jenkins

HTML Website Testing
http://www.hiringthing.com/2012/04/13/automated-ui-testing-with-jenkins-selenium.html

Installing Jenkins on CentOS
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+RedHat+distributions

Cluster Setup. Discussion
http://jenkins.361315.n4.nabble.com/Approach-to-build-a-cluster-of-Jenkins-CI-servers-hands-off-and-tie-them-together-td4641859.html

EC2 Demo of MCollective – Puppet Labs

By polfilm,

The Marionette Collective AKA MCollective is a framework to build server orchestration or parallel job execution systems.

We’ve attempted to think out of the box a bit designing this system by not relying on central inventories and tools like SSH, we’re not simply a fancy SSH “for loop.” MCollective use modern tools like Publish Subscribe Middleware and modern philosophies like real time discovery of network resources using meta data and not hostnames. Delivering a very scalable and very fast parallel execution environment.

Use Gluster to deploy highly available, scalable storage in minutes. Video 58min

By polfilm,

In this webinar, we discuss how Gluster can help you deploy highly available, scalable storage in minutes and manage data growth in a single global namespace in the cloud. Take advantage of Gluster’s software-only network-attached storage (NAS) solution to dynamically deploy and manage cloud storage in the RightScale Cloud Management Platform.

Memory Overcommitment Manager (MOM)

By polfilm,

MOM is a policy-driven tool that can be used to manage overcommitment on KVM hosts. Using libvirt, MOM keeps track of active virtual machines on a host. At a regular collection interval, data is gathered about the host and guests. Data can come from multiple sources (eg. the /proc interface, libvirt API calls, a client program connected to a guest, etc). Once collected, the data is organized for use by the policy evaluation engine. When started, MOM accepts a user-supplied overcommitment policy. This policy is regularly evaluated using the latest collected data. In response to certain conditions, the policy may trigger reconfiguration of the system’s overcommitment mechanisms. Currently MOM supports control of memory ballooning and KSM but the architecture is designed to accommodate new mechanisms such as cgroups.

WIKI: https://github.com/aglitke/mom/wiki
GIT: git://github.com/aglitke/mom.git
Adam Litke Blog: http://aglitke.wordpress.com/

  Category: KVM
  Comments: None

VMware Tools install, kernel headers missing, Fedora

By polfilm,

Vmware Tools perl script is actually building the vmtools on your machine. First thing you need to do is update your system so you don’t get a module mismatch.

yum update

Once the system is updated reboot.
When the system comes back just add kernel headers by running

yum install kernel-devel

You can now run the vmware tools script again.

How to set up Fedora 17 for Mingw cross compile

By polfilm,
yum install mingw32-binutils
yum install mingw32-cpp
yum install mingw32-filesystem
yum install mingw32-gcc
yum install mingw32-gcc-c++
yum install mingw32-runtime
yum install mingw32-w32api
yum install wine

wine cmd.exe

You should end in home directory on Z:\ drive

regedit.exe

What to edit?

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment

In the PATH element add at the end your binaries folder (check this folder exists!)

;Z:\\usr\\i686-pc-mingw32\\sys-root\\mingw\\bin

close regedit
exit in console
restart wine command prompt

wine cmd.exe

verify by typing

path

If you have other required mingw32 components installed you should be able to do:

mingw32-configure