Chef Server Name Not Resolved During Cookbook Upload [fix]

By polfilm,

Occurs when FQDN of the server is not resolvable on local network.
On chef server, create file called /etc/chef-server/chef-server.rb, and added below lines…

server_name = "192.168.56.11"
api_fqdn server_name
nginx['url'] = "https://#{server_name}"
nginx['server_name'] = server_name
lb['fqdn'] = server_name
bookshelf['vip'] = server_name

Then, run chef-server-ctl reconfigure.

Chef Solo Pattern with Berkshelf

By polfilm,

http://spin.atomicobject.com/2013/01/03/berks-simplifying-chef-solo-cookbook-management-with-berkshelf/
https://github.com/englishm/chef-solo-pattern
Chef – berkshelf lesson for dummies like me Ermahgerd!
http://leonard.io/blog/2012/05/installing-ruby-1-9-3-on-ubuntu-12-04-precise-pengolin/
https://github.com/opscode/nagios-quick-start
http://stackoverflow.com/questions/14173701/chef-upload-and-re-apply-a-cookbook-to-a-node

NodeBox for Python

By polfilm,

Using our open-source tools enable designers to automate boring production challenges, visualize large sets of data and access the raw power of the computer without thinking in ones and zeroes. Tools integrate with traditional design applications and run on many platforms.

http://nodebox.net/

Pattern for Python

By polfilm,

Pattern is a web mining module for the Python programming language.

It bundles tools for data mining (Google + Twitter + Wikipedia API, web crawler, HTML DOM parser), natural language processing (part-of-speech taggers, n-gram search, sentiment analysis, WordNet), machine learning (vector space model, k-means, k-NN, SVM) and network analysis (graph centrality & visualization).

http://www.clips.ua.ac.be/pages/pattern

Mirror TFS to GIT with History

By polfilm,

First Download Git-TF for VS TFS 2012

mkdir TFS
cd TFS
git-tf clone --bare --deep http://192.168.1.xxx:8080/tfs/CollectionName/ $/ProjectSourceName01
mkdir ProjectSourceName01Tmp
git clone --bare ProjectSourceName01 ProjectSourceName01Tmp
cd ProjectSourceName01Tmp
git push --mirror ssh://git@192.168.1.yyy/ProjectSourceName01.git

Then to clone back and double check it works

mv ProjectSourceName01 old-ProjectSourceName01
mv ProjectSourceName01Tmp old-ProjectSourceName01
git clone ssh://git@192.168.1.yyy/ProjectSourceName01.git

Mirror SVN to GIT with History

By polfilm,

This is actually a quite simple procedure:

apt-get install git git-svn
mkdir SVN
cd SVN
mkdir Project01
mkdir Project01Tmp
git svn clone --stdlayout --no-metadata -A users.txt https://192.168.1.xxx:8443/svn/Project01/ Project01
cd..
git clone --bare Project01 Project01Tmp
cd Project01Tmp
git push --mirror ssh://git@192.168.1.yyy/Project01.git
mv Project01 old-Project01
mv Project01Tmp old-Project01Tmp
git clone ssh://git@192.168.1.yyy/Project01.git

users.txt file should be in the following format

user1=First Last <first.last@example.com>
VisualSVN Server = Visual SVN Server <svn@example.com>

Webmin Add System User and Roles

By polfilm,
===== Add User =====
/etc/webmin/miniserv.users

===== Add Roles for User =====
/etc/webmin/webmin.acl

Note: nano line cut (CTRL-K) nano paste (CTRL-U)

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