Best filesystem for backups, temp or logs

If you have a habit of storing all your temporary files on your desktop (or any other folder) and forgot to remove them later, or if you use a device to store your backups, you will find that your computer get filled up easily with tons of files that you have no use for. Once that happens, cleaning up your computer becomes a tedious task and a troublesome chores. Here’s a quick and easy way to watch a folder for old files and delete them automatically.

Using a filesystem, like as limit-fs, that automatically check the used space and clean the oldest files if the space is about to saturate.

Use limit-fs is really simple, if the directory where you use to save backups or temporary files is ~/backups you will mount the filesystem over there by:


$ limit-fs ~/backups

Don’t worry about what already was in the folder, all contents already present before mounting will remains at the same place.

You can specify some options to control the behavior, check limit-fs github page for more information.

OpenShift cockpit quickstart

Enabling openshift cockpit with the latest releases is quite simple, but requires using a local system account.

1- Install cockpit


yum install cockpit cockpit-kubernetes
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 9090 -j ACCEPT
systemctl enable cockpit.service --now

2- Create a custom user to be used for cockpit administration


useradd -m -k /home/cloud-user cockpit
passwd cockpit #

3- access cockpit via a tunnel from the management network using the user cockpit credentials.


ssh -D11111 cloud-user@bastion
firefox http://master-ip:9090

Provisioning openstack on vmware infrastructure.

As I didn’t found extensive docs about provisioning Red Hat Openstack on a vmware infrastructure, I browsed the python code.

Python is a very expressive and clear language and you can get to the point in a moment!

I then was able to create the following instack.json to power-management a set of vmware machines.

Despite the many ways to pass ssh_* variables via ironic, the right way of running it via the instack.json is to:

– use the `pm_virt_type` instead of `ssh_virt_type`;
– express the ssh_key_content in the pm_password parameter like shown in the docs;
– set capabilities like profile and boot_option directly.

The key should be json-serialized on one line, replacing CR with ‘\n’.

{
    "nodes":[
        {
            "mac":[
                "00:0c:29:00:00:01"
            ],
            "capabilities": "profile:control,boot_option:local"
            "cpu":"8",
            "memory":"16384",
            "disk":"60",
            "arch":"x86_64",
            "pm_type":"pxe_ssh",
            "pm_virt_type": "vmware",
            "pm_addr":"172.18.0.1",
            "pm_user":"vmadmin",
            "pm_password":"-----BEGIN RSA PRIVATE KEY-----\nMY\nRSA\nKEY\n-----END RSA PRIVATE KEY-----"
        },
{..other nodes..} 

Back from MongoDB Essentials Training

This week I joined MongoDB Essentials training in Roma.

Mongo is a fast document oriented database supporting consistency, replication for HA and sharding for scaling read OR writes.

Transactions are at document level, so no joins and isolation levels.

A nice training – covering many database design technologies and giving even a theoretical overview of performance and scalability issues.

Concepts like Working Set, Replication types and issues, Indexes side-effects, Sharding and Hashing were introduced both theoretically and pratically.

Being a class of 10+ people with mixed background (MS, Linux, Oracle) it was hard to squeeze all this theory and practice in 3 days. The instructor asked us the parts we’d like to cover more: we pick Schema Design, Replication and Sharding.
Besides, such a large class give us a lot discussion and networking opportunity: we even created a freenode chatroom!

People interested in the subject can drop me a line and have a look at this github repo

Enjoy! R.

Pidgin spell check language switcher

If you are looking for an easy way to switch between multiple spell check dictionaries in the Pidgin IM application, have a look at the the Purple Plugin Pack. This plugin pack includes a plugin called Switch Spell which enables you to do just that. To install this on Fedora distro

yum install purple-plugin_pack-pidgin

Now all you need to do is enable Switch Spell in the plugin manager.

(Note: In order for this to work you need to install multiple Aspell dictionaries)

The power of Twitter

Ultimamente visto che non ho più un vasto pubblico ( vedi openspace AST ) mi sono rivolto a twitter per regalare al mondo le mie assurde esclamazioni.

Oggi dopo un accesa discussione sulle basi della sicronizzazione dei dispositivi mobili ( soprattutto tramite ssl ) insieme a due dico due consulenti certificati microsoft ( tra cui uno ha fatto pure  il corso aggiuntivo per  l’unified messaging ), ho meditato  su quante cose ho visto grazie a funambol ed ho scritto il seguente post su twitter.

tweet

Una volta tornato a casa apro il portatile e noto qualcosa di strano all’interno della timeline di gwibber

gwibber

Non ci posso credere … Fabrizio Capobianco in persona … cioè il capo di funambol fà un bel reply su al primo fannullone ( per non dire di peggio ) di turno che fa un esclamazione attraverso twitter  …  mica mi vorra citare in tribunale per il sync ’em all ?

Screenshot della pagina twitter del Capo di Funambol

fabricapo

Morale della favola ? …. beh nessuna ! Questo evidenzia come anche il primo “fannullone” che passa oggi ha i suoi 45 secondi di notorietà come prevedeva Handy Wharrol.

Per finire  questo lagnosissimo post e da un po che mi pongo la seguente domanda ma perchè  di ogni componente o servizio con cui abbiamo a che fare lo conosciamo in modo così viscerale ?  Solo perchè andiamo una spada?

Aspetto impaziente un vostro commento.

Log for the bare necessities, the simple bare necessities

Why did you do that if you weren’t asked to? Improving performance means doing just the minimum tasks. As stated in “Performance” section, http://logging.apache.org/log4j/1.2/manual.html , we’d better check if we need creating tonns of strings in java. So

if (log.isDebugEnabled()) {

log.debug(“Create” + “this” + message + “string”);

}

prevents creating unneeded debug/trace strings.

beanshell: scripting for java

Ok, I never really liked java – as I think it moves problem from developers to sysadmin ;) but I have to say that there are very nice java things: beanshell is one of this.

The problem I face was the post-processing of funambol output to a mobile device, shortly I had to filter an xml (syncml) response, regexp-replacing some values if the client was a Nokia mobile.

Doing it in the webapp code was ugly and leaves the webapp jars Nokia-dependant :(
So I decided to look at synclets (the way as Funambol uses beanshell for this kind of job) and quick-and-dirty write those lines.

What’s a synclet?
1- Funambol extends BeanShell with BeanShellSynclet
2- a BeanShellSynclet is a java-bean (an object), configured by an xml file
3- the xml refers to a .bsh file which includes methods and attributes written in java
4- the xml contains a User-Agent string

How Funambol use Synclets
Synclets are used when a User-Agent connects to the server (ex. a Nokia Mobile)
1- Funambol stores synclet’s XMLs configuration files in a proper directory
2- create a synclet object for each configuration file whose matches the User-Agent connected
3- before passing syncml streams to clients, parse it with all those synclets

Advantages
1- your webapp code is clear and rfc-compliant
2- writing synclet is easy
3- synclets applies only to the right User-Agent
4- you don’t have to re-deploy webapps, as synclets are instantiate at runtime

Have your say & Peace,
Rob

Google adds Caldav support to GCalendar!

It’s official: Google Calendar supports Caldav!
http://code.google.com/apis/calendar/developers_guide_caldav.html

Now you can connect to gcalendar using sunbird|lightning referring to url:
https://www.google.com/calendar/dav/UserName@gmail.com/events

Above all, you can have your gcalendar on your mobile using our Funambol Connector
http://sourceforge.net/projects/funambol-caldav

VaUnaSpada!

Ho qualcosa di meglio del megafono …

L’ultimo post di giulivo mi ha dato l’ispirazione di scrivere qui una cosa che meditavo da tempo, da un po di tempo in babel stiamo sperimentando e via via stabilizzando ( … almeno ci si prova visto la natura altamente unstable del sottoscritto) il voip in babel sin dalla prima telefonata, che aveva gia’ il sapore della conquista fino alla situazione attuale che abbiamo un centralino asterisk che possiede la bellezza di 110 interni con tanto voicemail e 2 numerazioni pubbliche ed un sistema di ivr, che non sarebbe altro che quelle risponderie automatiche che dicono per andare al diavolo prema uno altrimenti attenda in linea un operatore la insultera’ appena possibile grazie….

Invece il nostro e’ un po piu cordiale … la voce e gentimente concessa dalla nostra Rossella ” O’hara” Devito.

Dimenticavo potete sentirla gratutitamente da qualsiasi account sip ( non skype ) all’indirizzo sip:100@voip.babel.it

oppure da linea trazionale al numero 0695550568 oppure 0245070681

Sede Legale e Unità Operativa
Via Panfilo Castaldi, 11
20124 Milano
Tel: +39 02.66.732.1
Fax: +39 02.66.732.300
Unità Operativa
Via Cristoforo Colombo, 163
00147 Roma
Tel: +39 06.9826.9600
Fax: +39 06.9826.9680
Copyright © 2022 - tutti i diritti riservati
Società iscritta al registro delle imprese
di Milano al numero 12938200156
P.IVA e C.F. 12938200156
Privacy Policy | Cookie Policy