howto

A how-to is an informal, often short, description of how to accomplish a specific task. A how-to is usually meant to help non-experts, may leave out details that are only important to experts, and may also be greatly simplified from an overall discussion of the topic. read more at WikiPedia

  • apache_maven

    In this small post i will present you how to

    1. Track and identify across your Apache Maven multi project builds all components, their versions, and class path if needed
    2. Get valuable information from your testing team, and add it to the GUI of your web applications

    To solve the problem number 1, we will use Manifest files

    On the Java platform, a manifest file is a specific file contained within a JAR archive. It is used to define extension and package related data. It is a metadata file that contains name-value pairs organized in different sections. If a JAR file is intended to be used as an executable file, the manifest file specifies the main class of the application. The manifest file is named MANIFEST.MF. [Wikipedia]

    If you do nothing special in Maven., you will see across your jar files the following in all META-INF/MANIFEST.MF

    Manifest-Version: 1.0
    Archiver-Version: Plexus Archiver
    Created-By: Apache Maven

     

    The solution I propose here will write all these META-INF/MANIFEST.MF the following  content:

    Manifest-Version: 1.0
    Archiver-Version: Plexus Archiver
    Created-By: Apache Maven
    Built-By: agent1
    Build-Jdk: 1.6.0_20
    Specification-Title: Unnamed - com.waltercedric:web:war:1.0.0-SNAPSHOT
    Specification-Version: 1.0.0-SNAPSHOT
    Specification-Vendor: waltercedric
    Implementation-Title: Unnamed - com.waltercedric:web:war:1.0.0-SNAPSHOT
    Implementation-Version: 1.0.0-SNAPSHOT
    Implementation-Vendor-Id: com.waltercedric
    Implementation-Vendor: waltercedric
    buildDate: 2010.09.22-14:12
    svnrevision: 18625
    Class-Path: spring-ws-core-1.5.6.jar spring-aop-2.5.6.jar spring-
     web-2.5.6.jar spring-webmvc-2.5.6.jar spring-context-support-2.5.6.jar
    .. .. ..

     

  • apache_maven

    In which order are Apache Maven profiles executed? are Apache Maven profiles ordered? how can you insured that Apache Maven profiles are activated in the right order?

    You normally don’t end up with these questions, issues may only appear if

    • Some profiles are dependent each other,
    • Some profiles can not run in any order,

    The use case behind this article is very simple, as I have a a continuous build were:

    • 5 web applications have  to be deployed into a remote tomcat in phase pre-integration-test,
    • 2 databases are created for test cases in phase generate-test-resources
    • 1 more database is created and needed for runtime, done in phase pre-integration-test
    • One of these web applications is able to inject data into database using web services, a profile do this in a profile in phase pre-integration-test
    • Selenium test cases are run in phase integration-test

    All these steps are done using several Apache Maven pom profiles.

    As it is a bit complicated to explain, lets first refresh some Apache Maven concepts

    Apache Maven Goals

    First you’ll have to keep in the mind Apache Maven lifecycle of modules, 21 goals out of the box:

    • Validate: validate the project is correct and all necessary information is available 
    • generate-sources: generate any source code for inclusion in compilation    
    • process-sources: process the source code, for example to filter any values    
    • generate-resources: generate resources for inclusion in the package    
    • process-resources: copy and process the resources into the destination directory, ready for packaging  
    • compile: compile the source code of the project    
    • process-classes: post-process the generated files from compilation, for example to do byte code enhancement on Java classes    
    • generate-test-sources: generate any test source code for inclusion in compilation
    • process-test-sources: process the test source code, for example to filter any values    
    • generate-test-resources : create resources for testing 
    • process-test-resources: copy and process the resources into the test destination directory    
    • test-compile: compile the test source code into the test destination directory    
    • test: run tests using a suitable unit testing framework. These tests should not require the code be packaged or deployed
    • prepare-package: perform any operations necessary to prepare a package before the actual packaging. This often results in an unpacked, processed version of the package    
      package     take the compiled code and package it in its distributable format, such as a JAR    
      pre-integration-test: perform actions required before integration tests are executed. This may involve things such as setting up the required environment   
    • integration-test: process and deploy the package if necessary into an environment where integration tests can be run     (selenium test cases for example)
      post-integration-test: perform actions required after integration tests have been executed. This may including cleaning up the environment
    • verify     run any checks to verify the package is valid and meets quality criteria    
    • install     install the package into the local repository, for use as a dependency in other projects locally
    • deploy    code is deployed in artifactory or copied with ftp/scp for distribution

    if you run the goal compile

    mvn compile

    on a simple multi module project, EVERY modules, one after the others,  will go through these phases
    validate –> generate-sources –> process-sources –> generate-resources –> process-resources –> compile

    Apache Maven reactor

    The reactor is the part of Apache Maven that allows to execute a goal on a set of modules. As mentioned in the Apache Maven 1.x documentation on multi-modules builds, while modules are discreet unit of work, they can be gathered together using the reactor to build them simultaneously and:

    The reactor determines the correct build order from the dependencies stated by each project in their respective project descriptors, and will then execute a stated set of goals. It can be used for both building projects and other goals, such as site generation.

    The reactor is what makes multi-modules build possible: it computes the oriented graph of dependencies between modules, derive the build order from this graph and then execute goals on the modules. In other words, a "multi-modules build" is a "reactor build" and a "reactor build" is a "multi-modules build".

    A simple multi modules project

    For the sake of the exmaple, it has modules and profiles dependencies, in myProject/pom.xml


    remoting
    web
    monitoring
    common
    services

    or if you prefer the directory layout

    myProject
        |_ pom.xml
        |_common
                     |_src
                     |_pom.xml
        |_ web
                     |_src
                     |_pom.xml
        |_ remoting
                     |_src
                     |_pom.xml
        |_ services
                     |_src
                     |_pom.xml
        |_ web
                     |_src
                     |_pom.xml

    Lets assume also I would like to apply a list of profiles named

    • deployWeb, deploy the war module using cargo to a running tomcat instance
    • createDatabase, create a mysql database from scratch
    • runSelenium, run selenium test in phase integration test against web, assume database is created first
    • deployMonitoring, deploy the war module using cargo to a running tomcat instance, query the web at startup to get some infos.

    Maven calculate the module order in reactor based on dependencies, as seen in logs file after running

    mvn compile

    [INFO] Reactor build order:  Unnamed - com.waltercedric:myproject:pom:0.0.1-SNAPSHOT
    Unnamed - com.waltercedric:common:jar:0.0.1-SNAPSHOT
    Unnamed - com.waltercedric:services:jar:0.0.1-SNAPSHOT
    Unnamed - com.waltercedric:remoting:ear:0.0.1-SNAPSHOT
    Unnamed - com.waltercedric:web:war:0.0.1-SNAPSHOT
    Unnamed - com.waltercedric:monitoring:war:0.0.1-SNAPSHOT

    Example

    It start to be complicated when you provide a list of profile using Apache Maven command line like this

    mvn post-integration-test –PdeployWeb,createDatabase,runSelenium,deployMonitoring

    Chances are high that you will get profile executed in wrong order, too early or too late..

    Rule 1 profiles are activated (if found) following reactor modules order

    The first rule is that profiles are activated in module reactor order first, if myProject is first it will go through all 18 phases of  Apache Maven (from validate to post-integration-test in my example). Keep in mind also that the list of profiles will be applied to EVERY modules in EVERY phase starting at the top most module in reactor.

    • On modules myproject:
      •  Apache Maven will activate profiles PdeployWeb,createDatabase,runSelenium,deployMonitoring if one or more in the list are present in myproject/pom.xml
    • On modules common,
      • Apache Maven will activate profiles PdeployWeb,createDatabase,runSelenium,deployMonitoring if one or more in the list are present in common/pom.xml
    • and so on….

    Rule 2  Reactor modules order “may” be changed

    And now the tricky part, you can normally NOT change the module order in reactor, that’s ok but….

    The order you define in myProject/pom.xml for   (=module aggregation) is still kept if the maven dependencies resolver don't see any problems

    Not clear enough? look at the 2 examples below:

    myProject/pom.xml mvn post-integration-test
    Reactor build order (seen in logs)
    Remarks

    remoting
    web
    monitoring

    common
    services
    1. myProject
    2. common
    3. services
    4. remoting
    5. web
    6. monitoring
    Maven adapt the order based on oriented graph of dependencies between modules.

    remoting
    monitoring
    web

    common
    services
    1. myProject
    2. common
    3. services
    4. remoting
    5. monitoring
    6. web
    Swapping module having no direct connections each others and having no conflicting dependencies to other may result in a different order in reactor!!!! and also different profile execution order.

    Since Apache Maven has detected that the module monitoring and web have no connections, it accept the “human/natural” order found in myproject/pom.xml.

    You may have to use this technique to distribute your profiles in pom.xml while still keeping the profile order execution under control.

    Rule 3 Maven profile order is not taken from command line

    The order of profile in the Apache Maven command line  –P list is not taken into account, running the expected profiles order

    mvn post-integration-test –PdeployWeb,createDatabase,runSelenium,deployMonitoring

    is equivalent to

    mvn post-integration-test –PcreateDatabase,deployMonitoring, deployWeb,runSelenium

     

     

    It is a good things, as it  simply make no sense across all modules and all Maven phase all combined together.

    Rule 4 You can force profiles to run in an order if you SORT them accordingly into ONE pom.xml

    Apache Maven recommend to place profiles into the module where they are acting.

    If I want to insure that profiles deployWeb, createDatabase are run before the profiles runSelenium you have to keep that order in the pom.xml even if these profiles are acting in different Maven phase

    • createDatabase  may run in phase generate-test-resources 
    • deployWeb run in phase pre-integration-test
    • runSelenium run in phase integration-test

    Considering the module ordering in reactor, a good pom.xml candidate could be web/pom.xml like this



        createDatabase
     


        deployWeb
     


        runSelenium
     

    References

    Profiles">http://maven.apache.org/pom.htmlProfiles

  • When in apache maven you have multiple dependencies with the same artifact id but different group id 

    <dependency>
     <artifactId>any</artifactId>
     <groupId>groupId1</groupId>
     <version>1.1</version>
    </dependency>
    <dependency>
     <artifactId>any</artifactId>
     <groupId>groupId2</groupId>
     <version>1.2</version>
    </dependency>
    <dependency>
     <artifactId>any</artifactId>
     <groupId>groupId3</groupId>
     <version>1.3</version>
    </dependency>
    

    Apache maven war plugin is able to detect this case and will automatically add the groupId to resolve filename conflicts. If it would not do that the last one name any.jar would win

    So it'll look like this in WEB-INF/lib

    -rw------- 1 user grp  135851 Aug 24 12:21 grp1-any-1.1.jar 
    -rw------- 1 user grp 1406696 Sep 18 11:51 grp2-any-1.2.jar 
    -rw------- 1 user grp   88873 Aug 19 13:58 grp3-any-1.3.jar

     In Maven Assembly this will not occur, and the last file name will be the only one available. There is at least two way to solve this issue:

    1. Use unique groupid and artifactid name: something you can do across your module code, it can be done if these dependencies are real 3rd party librairies
    2. Use the outputFileNameMapping in assembly 
    <outputFileNameMapping>${artifact.groupId}-${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping> 

    Another use case for outputFileNameMapping is when you want to remove the timestamp from filename but keep the version in assembly dependencySet

    ${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}

     

     

  • apple-iphone.3gs.repair.diy

    I will show you how to repair a cracked or broken iPhone 3G, iPhone 3GS, iPhone 4, or iPod Touch screen yourself.

    In brief, what you need to know

    • The 3G and 3Gs screens are different! you can not mount an iPhone 4 screen on a 3G(s)
    • There is NO 3rd party or lower quality screens, all 3rd party repair company just LIE.
    • Different kit are available:
      • LCD only for 12€ to repair a broken LCD screen only: the iPhone has an intact glass screen, however the image behind the glass screen is absent, broken or distorted.
      • Glass + digitizer for 22€ This is for an iPhone 3G device with a broken glass screen or malfunctioning touch screen with the image (LCD Screen) behind the screen still intact.
      • Glass + digitizer + LCD + button + speaker mounted for 42€ the most expensive but the easiest to replace
    • Duration: 30, 15 or 2 minutes depending on the kit

    I went for the most expensive Kit on ebay.fr, which allow you to replace the broken screen by removing 2 screws, an connecting 3 cables!

    By the way I would NEVER send any phone to anyone, how do you think all these private pictures land on forums? removing the sim card is not enough, there are tools to fetch data even after the have been removed!

    Glass + digitizer + LCD + button + speaker kit mounted with all required tools to perform the repair

    apple-iphone-screen-repair-kitapple-iphone-screen-repair-kit2

    Step 1

    Remove the 2 small Phillips screws located at the bottom of the iPhone

    apple-iphone-screen-repair-step1

    Step 2

    Using the suction cups, pull up the screen upper part while retaining the body, it will come with no efforts

    apple-iphone-screen-repair-step2apple-iphone-screen-repair-step3

    Step 3

    Look at the connectors that you will have to pull off using the tool. Apple numbered the black ribbon cables 1, 2, and 3. The ribbon 3 being hidden under the cable that connect to 2. Just pull the cables in that order 2,1 and 3 off,

    apple-iphone-screen-repair-step4apple-iphone-screen-repair-step5

    Step 4

    Connect the new screen by plugging in that order 3, 1 and 2. Verify proper operations before closing with the 2 Philips screw the case back.

    apple-iphone-screen-repair-step6apple-iphone-screen-repair-step7

  • apache_maven

    I found&160; this time a&160; new way to deploy Maven artefacts using the Oracle Weblogic Ant API!

    If you remember my previous post, there is many ways to deploy your war/ear to Oracle Weblogic

    1. Using Oracle Weblogic development mode, a mode in which a simple copy of your files in a specific autodeploy directory trigger the update/install of these
    2. Using Maven Cargo, this work only if your Oracle Weblogic container is local (see here) on the same machine, where Apache Maven is running
    3. Using a very old Maven plugin (2008), local and remote container are supported, but our builds were sometimes hanging during pre integration phase for no apparent reasons.

    And now using the official ANT API of Oracle, by far the MOST stable of all!

  • joomla_logo

    These are the script I use to maintains all my 3 demo Joomla! sites:

    These scripts increased security and are trying to standardized how to create, update and maintain Joomla! demo site. Feel free to submit, send me ideas how to improve them or ask for help.

     

    This project is hosted at http://forge.joomla.org/gf/project/demosite/ under a GPL v3.0 license and the latest documentation can be found in my WIKI

    Architecture

    • 1 script (snapshotit.bat ) per Joomla! instance to create snapshots (files+ database) and save the result in a zip file.
    • 1 generic scripts (renew.sh) that renew an instance of Joomla! (files+ database) and secure it at the same time

    Prerequisites

    1. An access to a Linux bash on your server, ideally as root
    2. The possibility to define new crontab entries

    Locally

    On your desktop or reference server, install preferably in xampp/htdocs as much version of Joomla! as needed. These directories are containing Joomla versions . In these versions you will be able to install, remove configure your extensions. I personally have them  in XAMPP

    demo-joomla-1.0/
    demo-joomla-1.5/
    demo-joomla-1.6/

    In each of these Joomla! installation, copy this file snapshotit.bat inside and configure the variables accordingly. The file is well documented to not describe these variables here.

    This small batch file is making a snapshot of all files and database and create a new file demo-joomla-1.5.zip for example.

    Consider while installing Joomla!

    1. To not choose as a default for table name the prefix jos_ but something longer and more random, something like gZ45dF_ to mitigate SQL injection
    2. Do not name your admin user admin, but choose something longer and more random, Fdhtz56df_Gdte34 to reduce risk of brute forcing the administrator login/sql injection

    On the server

    Copy now this file demo-joomla-1.5.zip to your server, using FTP, SSH

    Copy also renew.sh to your server, using FTP, SSH

    Setup crontab

    Add to your crontab for each of your demo site the following big line, I renew demo site every 30 minutes

    $ crontab -e

    add this line

    30      *       *       *       *       locationOf_renew.sh locationOf_zip locationof_httpdocs dbuser dbpassword dbtablename unixuser unixgrp

    where

    • locationOf_renew.sh fully qualified path to renew.sh
    • locationOf_zip  fully qualified path of zip file (containing Joomla! and .sql file)
    • locationof_httpdocs fully qualified path of the httpdocs directory where this zip file content will be extracted
    • dbuser : database user that is used by Joomla!
    • dbpassword : database user password that is used by Joomla!
    • dbtablename: database schema name that is used by Joomla!
    • unixuser: unix user that is supposed to own all files in httpdocs, for example cedric
    • unixgrp: unix user that is supposed to own all files in httpdocs, for example psaserv

    Renew.sh

    This script renew.sh is doing the following with the zip file

    1. Delete all files in locationof_httpdocs removing all potential security threat and settings changes by visitors of your demo site
    2. Lock the demo site by adding an htaccess and htpasswd files temporary
    3. Unzip all file in demo-joomla-1.5.zip  to locationof_httpdocs
    4. Restore the database with the file demo-joomla-1.5.sqlfound in demo-joomla-1.5.zip
    5. Change user and usergrp to the right one (unixuser, unixgrp)
    6. Change all files and directory to the minimum required set of permissions (555 for directory and 444 for files)
    7. Make the cache directory of Joomla! read write for the owner unixuser
    8. Delete the file  demo-joomla-1.5.sql
    9. It remove potentially dangerous components from demo site, among others
      1. com_media Removing the users the right to upload, alter or delete files
      2. com_config Removing the users the right to change configuration
      3. com_installer Removing the users the right to install extensions
      4. it remove installation or installation.old if present
    10. Unlock the demo site by removing the htaccess and htpasswd files, and restoring the one from the zip files

    All in all and thanks to this development, my 3 demo site are now online, update will be a lot easier and I will keep them more often up to date Smile

    Joomla! 1.0 tricks

    In Joomla! 1.0 configuration.php I use the following trick to not have any stage dependent values.

    $mosConfig_absolute_path = dirname(__FILE__);
    $mosConfig_cachepath = dirname(__FILE__).'/cache';
  • One of the most important rule is to always backup your data with multiple tools on different medium, just in case of.

    Just imagine 5 minutes that you lose everything, what you have done in the last 3 months on your homepage..ok still not crying? you loose hundred of hours of work, nightly debugging, customizations, hours of Gimp/Photoshop, lengthy and good written articles...  

    With Joomla! and now with nearly all CMS, the most important thing to backup is the database. I recommend a daily backup at least!

    And now my solution: AutoMySQLBackup

    A script to take daily, weekly and monthly backups of your MySQL databases using mysqldump.

    Features

    • Backup mutiple databases 
    • Single backup file or to a seperate file for each DB
    • Compress backup files
    • Backup remote servers
    • E-mail logs
    • Backup mutiple MySQL databases with one script. (Now able to backup ALL databases on a server easily. no longer need to specify each database seperately)
    • Backup all databases to a single backup file or to a seperate directory and file for each database.
    • Automatically compress the backup files to save disk space using either gzip or bzip2 compression.
    • Can backup remote MySQL servers to a central server.
    • Runs automatically using cron or can be run manually.
    • Can e-mail the backup log to any specified e-mail address instead of "root". (Great for hosted websites and databases).
    • Can email the compressed database backup files to the specified email address.
    • Can specify maximun size backup to email.
    • Can be set to run PRE and POST backup commands.
    • Choose which day of the week to run weekly backups.

    Just download the file, save it somewhere, and configure automysqlbackup with your editor of choice (25 first line of file). To test if everything work,  just run the file.

    Note:

    automysqlbackup  require Mutt 

    # yast2 -i mutt
    Mutt (http://www.mutt.org) is a small but very powerful text-based mail client for Unix operating systems. It is used by the script automysqlbackup (sourceforge.net/projects/automysqlbackup/) to cut mail in part (automysqlbackup do ot use mail in that case)

    automysqlbackup send daily email with database content, so data are not on host in case of crash or on ftp. You may create 2 emails account and forward the result of the backup to 2 different free email hoster (Gmail and Hotmail for example)

  • From WikiPedia

    Inline linking (also known as hotlinking, leeching, piggy-backing, direct linking, offsite image grabs and bandwidth theft) is the use of a linked object, often an image, from one site into a web page belonging to a second site. The second site is said to have an inline link to the site where the object is located.

    This is not just Bandwidth Stealing, as

    • It cost CPU and bandwidth which means less performance for your visitors,
    • It cost a lot of money as you still pay the server cost, and loose ad revenues,
    • It drive people away from your reputable homepage since they will find your picture or files on any mirrors,
    • It may be a security threat at least for distributable software, anybody may alter (backdoor,ads, privacy information stealing) any of my open source component without my consent.

    The mod_rewrite module is able to intercept incoming URLs and modify them according to a set of rules that you specify. The basic idea is use the mod_rewrite module to inspect the incoming HTTP header. The field we're looking for is the Referer field - or basically the URL that the current request originated from.

    Referer

    This optional header field allows the client to specify, for the server's benefit, the address ( URI ) of the document (or element within the document) from which the URI in the request was obtained.
    This allows a server to generate lists of back-links to documents, for interest, logging, etc. It allows bad links to be traced for maintenance.

    So create a file .htaccess at the root of your site with the following content:

    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?waltercedric.com(/)?.*$&160;&160;&160;&160; [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?wiki.waltercedric.com(/)?.*$&160;&160;&160;&160; [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?forums.waltercedric.com(/)?.*$&160;&160;&160;&160; [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?bugs.waltercedric.com(/)?.*$&160;&160;&160;&160; [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?demo.waltercedric.com(/)?.*$&160;&160;&160;&160; [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?demo2.waltercedric.com(/)?.*$&160;&160;&160;&160; [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?mirror.waltercedric.com(/)?.*$&160;&160;&160;&160; [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?images.google.com(/)?.*$&160;&160;&160;&160; [NC]
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp|zip|css)$ http://www.waltercedric.com/bandwidthStealing.html [R,NC]

    Notes:

    • I want to allow cross linking between all my Subdomains wiki,demo, bugs, forums... so I have a bigger list of allowed Referer than usual to enter...
    • I do not allow hotlinking of the following resources for obvious reasons: jpg|jpeg|gif|png|bmp|zip|css
    • I redirect any bad people to a fix files on disk http://www.waltercedric.com/bandwidthStealing.html
    • You are allowed to copy the templates http://www.waltercedric.com/bandwidthStealing.html as long as you keep the bottom link.
    • Note the latest RewriteCond: I always allow Google to references my images

    There is a useful online generator with a lot more explanation online at the bottom of this page http://www.htmlbasix.com/disablehotlinking.shtml . This is active on my server since 2 weeks, and I've see a performance in response time.

    More tips&160;

    • To have an insight on resources stealing in nearly real time, simply put a statistics marker with for example Google Analytics to see how many people are landing on that page per week or months!
    • To generate money (better than nothing), dot forget also to put advertisements publicity on your redirect hot linking page
  • backup_debian_ubuntu_server

    I am using ReoBack for this duty

    REOBack (pronounced "ray-o-back") is a backup solution designed for Linux users and system administrators. It is designed to be simple to set up, and easy to use. It is great as a quick solution for those who procrastinate about backups. It supports automatic full/incremental backups of files you define, remote backups via NFS or FTP, as well as auto deletion of old backups.

    And here is my how to install for Debian /Ubuntu distribution taken from my notes

    Download Reoback 1.0.3, convert it into a Debian package with alien and install it

    wget http://puzzle.dl.sourceforge.net/sourceforge/reoback/reoback-1.0-3.noarch.rpm
    apt-get install alien
    alien reoback-1.0-3.noarch.rpm
    dpkg -i reoback_1.0-4_all.deb

    Configure ReoBack by editing the file settings.conf

    vi /etc/reoback/settings.conf
    Here is a sample configuration file to save your backup to a remote FTP server (but it could be also a NFS share)
    host            = myhostname.com
    backupdays      = 7
    files           = /etc/reoback/files.conf
    tmpdir          = /var/lib/reoback/tmp/
    datadir          = /var/lib/reoback/data/
    localbackup     = /var/lib/reoback/backups/
    keeplocalcopy   = 1
    remotebackup    = 1
    rbackuptype     = FTP
    localmount      = /mnt/server/
    remotehost      = xxxxxxxxx
    remotepath      = /reobackup/
    ftpuser         = xxxxxxxxx
    ftppasswd       = xxxxxxxxx

    Specify which files on your server  need to be saved by editing the file files.conf

    vi /etc/reoback/files.conf

    Here is a sample, I exclude some files that are changing all the time since they are maintained by the Linux kernel or some processes

    File: homes
    /home/
    
    File: var
    /var
    Skip: /var/run/*
    Skip: /var/lib/mysql/*
    Skip: /var/lib/reoback/*
    
    File: mysql
    /var/lib/mysql
    /tmp/mysql.sock
    Skip: /var/lib/mysql/mysql.sock
    Skip: /var/lib/mysql/mysqld.pid
    
    File: plesk
    /opt/psa
    /etc/psa
    /usr/local/psa

    Adapt the location path of these 2 files (files.conf / settings.conf) in  run_reoback.sh

    vi /etc/reoback/run_reoback.sh

    content of file

    # Location of the configuration file.
    config="/etc/reoback/settings.conf"
    
    # Change to reflect where REOBack is installed
    reoback="/usr/bin/reoback.pl"
    
    # Do not modify this line.
    $reoback $config

    Finally you can now test your backup

    /etc/reoback/run_reoback.sh

    or place this command in crontab

    * 19 * * * /etc/reoback/run_reoback.sh > backup.txt ;
    mail -s "automatisches Backup" This email address is being protected from spambots. You need JavaScript enabled to view it. < backup.txt

    Tips

    Depending where you visitor come from (America or Asia or Europe) it may be recommended to not start your backup during peak of visits, You can also nice the process to a lower priority

    * 19 * * * nice –19 /etc/reoback/run_reoback.sh > backup.txt ; 
    mail -s "automatisches Backup" This email address is being protected from spambots. You need JavaScript enabled to view it. < backup.txt
  • xenserver_logo_lg

    More and more I am using XEN at work, and here is a small how to of some very common operations.

    Citrix® XenServer® is a complete, managed server virtualization platform built on the powerful Xen® hypervisor. Xen technology is widely acknowledged as the fastest and most secure virtualization software in the industry. XenServer is designed for efficient management of Windows® and Linux® virtual serversand delivers cost-effective server consolidation and business continuity.

    By the way if you succeed installing XEN server on a Strato.com dedicated Linux server with a minimal downtime, contact me I am interested!

    Basic operations

    Determine the XEN guest uuid

    This uuid is required to identify XEN guest.

    # xe vm-list
    uuid ( RO)           : 99bb0e42-0616-6f02-ed41-be48bb338280 
         name-label ( RW): server01
        power-state ( RO): running

    Determine the XEN sr-uuid of a disk storage

    A sr-uuid identify a storage resources attached to a XEN server, this unique id is required for some operations as it allow you for eample to import XEN guest into it.

    Run as root, in the XEN server console


    # xe sr-list
    uuid ( RO)                : 99f191c4-4563-8672-7d8e-4602850fbeb0
            name-label ( RW): Local storage
            name-description ( RW): 
            host ( RO): xen01
            type ( RO): lvm
            content-type ( RO): user

    Identify the locale storage by looking at the name-label and copy the uuid

    Export XEN Guest

    1. You need to stop the XEN guest prior to any operations
    2. You need to determine the XEN guest uuid (see basic operations)
    3. Mount a NFS / CIFS / Samba share if you want to move from one XEN server to another as the filename can be located anywhere.

    Run as root, in the XEN server console

    # xe vm-export vm=99bb0e42-0616-6f02-ed41-be48bb338280  filename=server01.xva

    Import XEN Guest

    1. You need to determine the XEN guest sr-uuid (see basic operations) : the storage unique id
    2. Mount a NFS / CIFS / Samba share if you want to move from one XEN server to another as the filename can be located anywhere.

    Run as root, in the XEN server console

    # xe vm-import filename=server01.xva  sr-uuid=99bb0e42-0616-6f02-ed41-be48bb338280 

    Export a XEN template to disk

    1. Log to the XEN server where this template is located, and list all templates
    2. Mount a NFS / CIFS / Samba share if you want to move from one XEN server to another as the filename can be located anywhere.

    # xe template-list

    If there is too much templates, you can filter with grep or by using name-label

    # xe template-list  name-label="myTemplate label”
    uuid ( RO) : c4962b6b-5678-a72b-85cd-e33f01b1320a
    name-label ( RW): mytemplate label
    name-description ( RW):

    To export, run

    # xe template-export uuid=c4962b6b-5678-a72b-85cd-e33f01b1320afilename=myTemplate.xva

    You can see the export progression in tab “logs“ of that template in XEN-Center

    Import a XEN template to a new XEN Server

    1. Log to the XEN server where you want to import the new template
    2. You need to determine the XEN guest sr-uuid (see basic operations) : the storage unique id

    To import, run

    # xe vm-import filename=myTemplate.xva  sr-uuid=99bb0e42-0616-6f02-ed41-be48bb338280 

    TO be continued…


  • You can insert some thin shimsbetween the engine and the engine mounts upper holes.(red points) This make the engine lean slightly forward and make the belt go lower down on the clutch bell.
  • A SECURITY flaw could allow hackers to eavesdrop on cellphone conversations made on Bluetooth-based wireless headsets was revealed in april 2004...But at that time an expensive piece of hardware was needed. Now it is even worse a simple brute force while the device are doing keyring exchange...

    "Whitehouse showed in 2004 that a hacker could arrive at this link key without knowing the PIN using a piece of equipment called a Bluetooth sniffer. This can record the exchanged messages being used to derive the link key and feed the recordings to software that knows the Bluetooth algorithms and can cycle through all 10,000 possibilities of the PIN. Once a hacker knows the link keys, Whitehouse reasoned they could hijack the device."

    Now the new attack force the  two bluetooth devices to pair, they can work out the link key in just 0.06 seconds on a Pentium IV-enabled computer, and 0.3 seconds on a Pentium-III

     

  • apache_maven_thumb

    Scenarios

    • You want to control Maven during dependency resolution and break the build if some conditions are not met,
    • You want to detect dependencies conflict early during the build,
    • You want to avoid anybody in your team to use the dependency x in the version y

    This is where the Maven Enforcer Plugin will assist you:

    The Enforcer plugin provides goals to control certain environmental constraints such as Maven version, JDK version and OS family along with many more standard rules and user created rules.

    Add in your pom.xml the following to configure the plugin

  • A lot of people have tried numerous times to download files from my download section without
    success, the error message was always the same

    Unrecoverable error "PCLZIP_ERR_BAD_FORMAT (-10)"

    Also, Some tried to unpack the zip file locally using stuffit/Winrar/7Zip and get an error suggesting
    that the archive is damaged.

    Only Internet Explorer users were having issues, this is because of Internet explorer not able to handle
    compression of all file types. I solved the issue by changing my mod_deflate.conf which now look like the following:

    <Location />
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript

    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary
    </Location>

    I found that I had to use application/x-javascript instead of application/javascript to actually get javascript files on my
    server to be served compressed.

    mod deflate documentation: http://httpd.apache.org/docs/2.0/mod/mod_deflate.html

  • CedThumbnails has been updated to version 2.5.2 and contains 2 bug fixes and compatibility for both Joomla 1.7 and Joomla 2.5. For existing users the update will display in the Extensions Manager under Updates. If you do not have this currently installed, you can click the link below and install as normal via the Extensions Manager.

    New ideas/features/bugs are always welcomed either through forums or  by using feedback

    What’s new?

    Update mod_related_items_thumb to 2.5.2:

    • BUG: item route was not working in Joomla 2.5.0+
    • BUG: module CSS class was not propagated to module view default.php

    Full list of changes available in GIT commit c6de1f0c70e834af2d95b4f91ecfbb0260f5a1e6

  • CedThumbnails has been updated to version 2.6.0 and contains 4 new features and correct 1 bug for Joomla 2.5. For existing users the update will display in the Extensions Managerunder Updates. If you do not have this currently installed, you can click the link below and install like you are use to via the Extensions Manager.

  • sony_playstation_ps3

    Side by side, here are the PS3 lenses that are currently available for your PS3. If you ever decide to change the lens yourself, my best advice is to always open your PS3 first before ordering any new lens as there is no way to determine which model use which lens.

    Attention: PS3 40gb may use a different lens: LENS KES-410A or KES-410ACA (but some ps3 40gb has been found with the other lens KES-400AAA)

    ps3.lens.comparaison 
    KES-400AAA on the left, KES-410A on the right

    Change your PS3 Bluray lens yourself

    Thanks to Sarah for allowing me to publish this picture on my site.

  • null
    Interesting dicussion on www.runryder.com

    Definition:

    Piro Flips with a rotating motion..meaning you would keep executing the flip at a different point, i.e (12:00, 3:00. 6:00, 9:00, 12:00).

    Credit to Augusto (www.)

    "A good controlled sustained piroueting flip will have the rotor disc flipping in the same direction while the tail pirouettes around the main shaft axis.
    Not too many people can do a good sustained piroflip. Most people piroflip and kind of "catch it" over and over so the disc is not flipping in the same direction.
    Now a chaos is a sustained piroflip where the pilot purposely and in a controlled manner does a maintained piroflip and slowly rotates the flipping axis 360 degrees to a full turn of the flipping axis.
    The big deal about this maneuver is that it shows that you have complete control of the sustained piroflip in any orientation of the flipping rotation.
    I have never seen anyone do a real chaos and Curtis told me he either saw or performed a good one only once or twice.
    Lately I&39;m practicing piroflipping rolling circles or maybe simply called piruetting rolling circles as a way to practice for when I try a real chaos. It will be the same as far as orientations is concerned but without the translational movement. Keeping it in a single place while slowly rotating the direction of the flipping is pretty tough.

    Regarding the circle, It&39;s important to understand that in the pirouetting flip the numbers of pirouettes per flip are not related or set in stone. You can describe a full flip while doing say 10 pirouettes or even a ful flip with say 6 pirouettes. Obviously given a certain constant pirouetting speed the lower the number of pirouettes the faster the flipping portion of the mainblades disc.

    The factor that controls how fast the flipping happens is the total amount of deflection away fom the center you apply. In other words the larger the "stirring circle" the higher the swashplate deflection hence the faster the flipping rate. Doing very small "stirring circles" in the cyclic will achieve slowly flipping piroflip that has a relatively fast pirouetting rate. Conversely applying a large deflection away from the center i.e. large "stirring circle" will make it look like a pretty fast flip with proportionally fast pirouettes.

    What I call "piro-cheating" while piroflipping is when people let it rest for a while while in the horizontal disc portion of the flip whether it&39;s right side up or inverted for about two full pirouettes and then continue with the piroflip. They let it rest a bit and then apply upwards momentum so that they can do the piroflip while hanging between upwards pushes. That makes the piroflip a lot easier but also a lot uglier. Doing a piroflip where the flipping of the disc has a constant rate of flip is a completely different animal. It&39;s obvious that there has to be upwards momentum applied but people need to learn how to make it happen without stopping the flipping portion to regain momentum. There&39;s a world of pitch management that happens in that small amount of time.

    Take a look at this clip and notice that the flipping stays constant and there&39;s no resting time when the disc is horizontal. Also in this case the deflection circle is small and as you can see there is a high number of fast pirouettes for each flip. Notice also how the direction or orientation of the flipping portion stays somehow constant throughout the piroflip. The clip is not too good an example but it servers the purpose of illustrating the mechanisms of what I&39;m explaining.
    "

    Totally agree with Augusto&39;s posts. Work on your timing first to get the flips so the rotor disk constantly flips in the same direction. Then you can work on rotating the flipping direction.

    Other than increasing cyclic at a particular point to &39;shift&39; the pirouetting flip or the chaos in a certain direction, I find thottle/pitch management important to be able to control the whole manouver. After increasing cyclic of your desired direction,depending on how far/fast I want to travel, I would also add a little extra throttle to the flip but in the direction I want to move. This is more important for when you do piro-flippin&39; loops or fly around doing constant piroeutting flips.

    Piroflip and Chaos Practice
    Credit to Pete Niotis

    "PiroFlip Practice: Keep doing a repeated async pirouetting loop in the same spot. Make smaller/tighten as you progress...that&39;s it!
    Chaos Practice: A series of very small/tight Async Pirouetting Loops where each complete little async pirouetting loop keeps being placed/rotated in a different location relative to the flight line. For example...spool up heli side in (nose right for this example), climb to a comfortable height let&39;s say 10-20 feet and go right into a tail stand, begin a constant pirouette dropping and forming a radius within a few decending feet while pirouetting and begin forming another pirouetting radius travelling to your right as to make heli ascend knife edge while pirouetting where now the outside of disc is facing right as you get to the top, at the top or end of the climb start adding negative collective while still pirouetting which leads you to the same spot you started with the exception that now the inside of disc is facing left side of field and here&39;s where you would drop to start another tight async pirouetting loop but you would also add the necessary cyclic inputs to place next loop at 12:00 or 6:00 position all dependant on which way you prefer or which way of rotation compliments the flow of your chaos. Keep in mind that placing each async pirouetting loop 90 degrees from last position will probably not be as good as placing each 45 degrees from the last position. To simplify understanding all this...practice these async pirouetting loops bigger at the beginning and just keep tightening them up and making them smaller as you progress and you&39;ll soon have a chaos."
    null

  • My mind map you can use as a checklist to secure your Linux server and Joomla has a new home, it is now located at:

    http://joomla-security.waltercedric.com

    I will update it regularly with new tips and how-to. Your feedback is as always welcomed, you can use the comment thread below.

  • chkrootkit is a tool to locally check for signs of a rootkit. chkrootkit is a common unix-based program intended to help system administrators check their system for known rootkits. It works by using several mechanisms, including comparison of file signatures to known rootkits, checking for suspicious activity (processes listed in the proc filesystem but not in the output of the 'ps' command.
    Log to the server with ssh as root user

    Download 
    chkrootkit.
    # wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz

    Unpack the chkrootkit you just downloaded.
    # tar xvzf chkrootkit.tar.gz

    go to that  directory
    # cd chkrootkit

    Compile
    # make sense

    Run
    # chkrootkit

     
    •Receive e-mail everyday with the result chkrootkit
    For Root user
    # crontab -e
    For any user
    # crontab -e -u username

    and add

    •0 3 * * * (./usr/sbin/chkrootkit 2>&1 | mail -s "chkrootkit output" -c This email address is being protected from spambots. You need JavaScript enabled to view it.,This email address is being protected from spambots. You need JavaScript enabled to view it. This email address is being protected from spambots. You need JavaScript enabled to view it.)

    * the correct path can be found with which chkrootkit
    This will run chkrootkit at 3:00 am every day, and e-mail the output to This email address is being protected from spambots. You need JavaScript enabled to view it. and copies to This email address is being protected from spambots. You need JavaScript enabled to view it. and This email address is being protected from spambots. You need JavaScript enabled to view it.

    False alarms:
     "Checking `bindshell'... INFECTED (PORTS: 465)" This is normal and  NOT really a rootkit.

    Nota
    If you ever get a positive alarm, you can try to remove the rootkit, but all professionals would advice you to reinstall the server from scratch, and restore a previous backup (that mean saving nothing from server as soon as the rootkit is revealed....)

    Links
    chkrootkit
  • Lucene Core&160; is an open-source search software, provides Java-based indexing and search technology, as well as spellchecking, hit highlighting and advanced analysis/tokenization capabilities. Luke is a handy development and diagnostic tool, which accesses already existing Lucene indexes and allows you to display and modify their content.

    Luke is awesome, but often times it is not feasible to inspect an index on a remote machine using a GUI. That's where Clue comes in. You can SSH into your production box and inspect your index using your favorite shell

    Another important feature for Clue is the ability to interact with other Unix commands via piping, e.g. grep, more etc.

    Interactive Mode:

    ./bin/clue.sh my-idx

    Non-interactive Mode:

    ./bin/clue.sh my-idx command args

    Command list:

    ./bin/clue.sh my-idx help
  • apache_maven

    What you will learn in this small post

    • How to create JAXB proxies at build time using maven-jaxb2-plugin in a continuous build environment (TeamCity / Bamboo)
    • How to generate from an XSD file (XML-Schema-Definitions) Java code.

    Requirements

    • We will use JAXB2 (see JSR 222 and JAXB 2.x).
    • We use Maven 2.2.1, the latest available version

    Settings things up

    The only difficulties is to add to your Maven proxy (Archiva, artifactory) the Maven repository of Sun. The example below use an inline repositories definition in pom.xml. So it work out of the box.

    <repositories>
        <repository>
          <id>maven2-repository.dev.java.net</id>
          <name>Java.net Maven 2 Repository</name>
          <url>http://download.java.net/maven/2</url>
        </repository>
      </repositories>

    and the special Sun Maven plugin repository

      <pluginRepositories>
        <pluginRepository>
          <id>maven2-repository.dev.java.net</id>
          <url>http://download.java.net/maven/2</url>
        </pluginRepository>
      </pluginRepositories>

    Here is how your pom should look like

    <project xmlns=http://maven.apache.org/POM/4.0.0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.waltercedric.maven.examples</groupId>
      <artifactId>jaxb</artifactId>
      <version>0.1.0-SNAPSHOT</version>
      <packaging>jar</packaging>
      <name>jaxb</name>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jvnet.jaxb2.maven2</groupId>
            <artifactId>maven-jaxb2-plugin</artifactId>
            <version>0.7.1</version>
            <executions>
              <execution>
                <goals>
                  <goal>generate</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <source>1.6</source>
              <target>1.6</target>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>com.sun.xml.bind</groupId>
          <artifactId>jaxb-impl</artifactId>
          <version>2.1.12</version>
        </dependency>
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.7</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <repositories>
        <repository>
          <id>maven2-repository.dev.java.net</id>
          <name>Java.net Maven 2 Repository</name>
          <url>http://download.java.net/maven/2</url>
        </repository>
      </repositories>  
    <pluginRepositories> <pluginRepository> <id>maven2-repository.dev.java.net</id> <name>Java.net Maven 2 Repository</name> <url>http://download.java.net/maven/2</url> </pluginRepository> </pluginRepositories>
    </
    project>

    All you have to do now is to place your XSD shema in src/main/resources and run mvn package

    The JAXB proxies will be created in target\generated-sources\xjc\generated so you can use them in src/main/java and src/test/java

  • Comment installer un tool d'accés à distance sur votre PC...
    Version 1.0, copyright Walter Cedric, Licence FDL (GNU Free Documentation License)

    Pourquoi?

    • Si vous avez un copain (Rémy informaticien) qui peut vous aider mais qui habite trop loin pour venir vous aider sur votre ordinateur a un moment donne,
    • Pour administrer des machines sans écran,
    • Pour acceder a un bureau Macinstosh sous windows ou sous linux ou inversement.

    Il existe de nombreux logiciels qui permettent de prendre controle d'un pc a distance (a travers un reseau locale ou internet), voici comment installer Tight-VNC un logiciel Open source et multi plattform (des clients pour le monde windows-linux-java existent)

    VNC (pour Virtual Network Computing) est un logiciel distribué gratuitement par les laboratoires de recherche d'AT&T. Il s'agit d'une application client / serveur permettant, à partir de sa machine ("client" ) de prendre aisément le contrôle total d'un ordinateur quel que soit son emplacement ("serveur" ) via un réseau local ou encore Internet (TCP / IP). Tight VNC est une version "légère" de VNC qui nécessite moins de ressources système et qui s'accomode de moins d'un réseau moins performant si besoin est....

    Ce logiciel se compose de deux parties:

    clientLa partie cliente permet de se connecter à un ordianteur qui a la partie serveur
    serveurIl existe des serveurs pour toutes les architectures, Unix, Mac, windows, autres

    Ex: Rémy informaticien eut aider son ami novice, Régis qui à des problèmes sur sa machine windows. Rémy va installer la partie cliente (chapitre 2) et Régis la partie serveur sur son PC. (chapitre 1)

    1. Installer la partie la partie serveur

    http://www.tightvnc.com/download.html

    par exemple: (le numéro de version importe peu)

    Windows tightvnc-1.2.9-setup.exe

    Télecharger Tight VNC serveur
    Double clicker sur l'icone pour lancer l'installation
    Une fenêtre apparait, appuyer simplement sur suivant (bouton Next > )
    Lire la licence et l'accepter en cliquant sur suivant (bouton Next > )
    Choisir le répertoire de destination du logiciel que vous êtes en train d'installer.
    Le répertoire par défaut convient très bien. Veuiller simplement cliquer sur suivant (bouton Next > )
    Vous pouvez sélectionner tous les composants (si vous voulez accéder à des machines distantes) ou juste la partie
    serveur (comme sur l'image à gauche ) si vous voulez être aider.
    Valider ssimplement sur ce masque en cliquant sur suivant (bouton Next > )
    Les deux doivent être selectionner avant de cliquer sur suivant (bouton Next > )
    Confirmer tous les choix précédents et laisser l'installation se terminer...
    attendez jusque cette fenêtre apparaisse...
    Point 1A

    Il s'agit maintenant de définir un password que seule vous et votre collègue connaitra. Une phrase est une bonne idée de départ.
    Pensez à mélanger des chiffres et des caractères. Il faut entrer ce password deux fois aux 2 elipses comme sur l'image de gauche.

     

     

    Une fois choisi il faut noter ce password et le donner à votre ami de confiance qui va vous aider.

    Ssimplement cliquer sur FIN (Finish)
    Si tous s'est bien passé, vous devriez avoir un icone V comme sur la photo de gauche dans le coin inférieur droit de votre bureau windows.
      
    Avant d'appeler votre ami Rémy l'informaticien au téléphone....
    Pour accéder à votre PC, il y besoin de deux informations encore.... 
     1. Le password que vous avez choisi, sans cela impossible de se connecter sur votre machine. Il s'agit du mot de passe choisi au point Point 1A
     2. Votre adresse internet ou IP, un nombre sur 32bits qui vous identifie vous et votre machine de maniere unique sur un réseau. Cee nombre est assemble par paquet de 4 nombre a 3 chiffre: WWW.XXX.YYY.ZZZ

    Pour votre culture....

    • La technologie ADSL change votre adresse IP tous les 24heures en moyenne, mais elle peut changer aléatoirement au bon vouloir de votre fournisseur d'accès internet.
    • La technologie Cable peut vous attribuer une adresse IP qui peut ne pas changer pendant plusieurs semaines, mais elle peut changer alaéatoirement au bon vouloir de votre fournisseur d'accès internet.
    • La technologie modem téléphonique attribue une adresse IP différente à chaque foisque vous vous connecter.

    En conséquence...vous dever chaque fois que vous désirez utiliser un accès distant connaitre l'adresse IP de la machine cible. Vous devez donc donner votre adresse IP à votre ami Rémy.

     

    Connaitre son adresse IP (vous devez être connecter à internet)


    Allez dans le menu windows démarrer (1 ou Start)

    puis exécuter (2 ou Run)

     

    Taper cmd puis cliquer sur OK
    Une fenêtre noir apparait, taper ipconfig puis la touche ENTER du clavier
    Localiser votre adresse IP, ici cela serait 192.168.1.100

    Pour votre culture....

    L'adresse ci dessus 192.168.1.100 ne peut pas marcher, car elle est caratéristique d'une adresse internet attribué par un routeur ou HUB, qui va créer une adresse (ou attribuer) à chaque périphérique de votre réseau local.

     

     Pour des raisons de sécurité et après que vous ayez été aidé, veuiller soit:
    • Changer le password sans le communiquer à des tierces personnes,
    • Soit désinstaller le logiciel TightVNC (sécurité absolue mais contraignante)

     

    2. Installer la partie la partie cliente

    Il s'agit d'un programme comme un autre...

    http://www.tightvnc.com/download.html

    par exemple: (lenuméero de version importe peu)

    tightvnc-1.2.9_x86_viewer.zip

    Télecharger Tight VNC client
     Installer
    lancer le programme et rentrer l'adresse IP de votre ami Régis
     Si le client trouve le serveur, Une fenêtre va vous demander le password.

     

  • Comment régler un hélicoptère RC: Raptor 30 ou caliber 30

    Questions? corrections? toutes vos remarques seront toujours les bienvennues...

    version 1.6 par Walter Cédric

    Â

    Â

    Notice Légal :
    L'auteur ne pourra en aucun cas être tenu responsable de tout accidents ou dommages matériels pouvant survenir de l'utilisation de ces informations. Utiliser les à vos propres risques et périls.

    ATTENTION :

    Les hélicopteres radiocommandés ne sont pas des jouets, Ce sont des machines de précision qui ont le potentiel de causer des blessures graves et même de provoquer la MORT. Ne jamais l'oublier !!!! Les pales du rotor tournent souvent à plus de 450 km/h et cree une pression similaire a une balle de 45mm, de plus un hélico de 5 kilos a plus de 70 km/h contient une energie cinétique considérable qui se libére violement a l'impact. Toujours se tenir a distance respectable et éloigner le public.

    Introduction:
    Ce setup se veut rudimentaire et empirique, n'ayant pas de connaissances libraire sur le sujet, je vous livre ici le fruit de mes observations sur le terrain au sein de mon club. Neanmoins, j'ai deja personnellement régler pas mal d'helicos (mode de vol normal, stationnaire et translation lente) avec succès. Je completerai ce setup pour le rendre exhaustif au fur et à mesure que mes connaissent s'étofferont.

    Prérequis:

    • Mode européen pour la télécommande (gazs a droite)
    • Télécommande Futaba FF8 ou FF9
    • Servo d'anticouple monté sur la poutre.
    • Récepteur FUTABA.

    1. Position des servo et assignation au récepteur futaba

    Caliber 30

    1.0 Définitions du type de commande du plateau:

    • Le H1, c'est quand le plateau cyclique est commandé par : un servo pour le rouli, un servo pour le tangage, et un servo pour le pas collectif. (Raptor 30)
    • Le H2, c'est quand le plateau cyclique est commandé par: 2 servos pour le rouli (un en push et un en pull), un servo pour le tangage, et ces trois servos montent et descendent en màªme temps pour le collectif.
    • Le H3 ou CCPM 120°, c'est quand les trois servos sont disposés à 120 ° sur le plateau cyclique. Un mixage de l'émetteur permet de faire du tangage et du rouli. Le collectif est réalisé par les 3 servos qui montent et qui descendent en màªme temps. (Caliber 30, Vigor CS)
    • Le H4 ou CCPM 90°, c'est quand les 4 servos sont disposés à 90° l'un par rapport à l'autre. Pour le tangage il y en a 2 qui font push pull , et pour le rouli, les 2 autres font push pull. Le collectif est assuré par les 4 servos qui montent et qui descendent en màªme temps. (rare)

    1.1 Remarques:

    • Monter les servos dans leurs emplacements sans jamais trop serrer les caoutchoucs car sinon ils n'amortiront pas les vibrations.
    • Privilégier un servo puissant (au moins 5kg voire plus) pour le collectif (Voie 6) si vous souhaiter chahuter votre hélico.
    • Privilégier un servo rapide pour la commande d'anticouple (au moins < 0.11s) si vous souhaiter monter un bon gyroscope heading lock (csm 540, gy501 par ex). Mais associer le tout avec une commande d'anticouple en carbone, seul rigide et garante de n'avoir aucun jeu. Si vous avez un de ces 3 composants qui manquent, rien ne sers d'acheter seulement un bon servo, ou seulement un gyro. Vous etes Debutant ? ne le faites pas car c'est un investissement lourd et vous avez, c'est triste a dire mais plus de 70% de malchance d'abandonner ce hobby (pour raison d'argent ou de decouragement) avant 6 mois.
    • Pour un hélico CCPM 120°, n'utiliser que 3 servos identiques, de màªme marque et référence. On peut s'accomoder de trois servo de moyenne gamme étant donné que le pas ou pitch est le résultat conjugués du mouvement des 3 servos (puissant)

    1.2 Assignations des voies sur le recepteur futaba:

    1 Cyclique latérale ou aileron (permet d'aller à gauche ou à droite)
    2 Cyclique longitudinale ou elevator (permet d'avancer ou de reculer)
    3 Gazs ou throttle (accélerer ou décellerer)
    4 Rud in du gyroscope (commande le servo d'anticouple)
    5 Gain du gyroscope (ajuste le gain à distance)
    6 Pas ou collectif (permet de monter et de descendre, joue sur l'angle des pales principales)

    1.3 Chapes et tiges:

    • Toujours respecter les longueur recommandées par le constructeur. Elles sont forcément dans le manuel. Ces valeurs sont dites idéales car elles permettent d'avoir un maximum d'amplitude sur toutes les commandes.
    • Utiliser des bras de servo qui permettent une fixation de la chape à 10 mm du centre du servo si rien n'est dit dans le manuel.
    • Utiliser des chapes de meilleurs qualités que celles de Thunder Tiger et de la tige filetée de 3mm (surtout pour le pas collectif qui pourraient flamber sous l'effort lors des maneuvres 3D, pas en classe 30, mais en classe 60 oui)
    • Connecter toutes les tiges comme recommandés sur les boules (bras de servo) mais ne connecter pas encore aux axes des servos. (pas encore)

    2. Premier réglages sur la télécommande

    • Allumer la técommande puis l'hélico. Tous les servos se positionnent au neutre. Vérifier que toute les fonctions ATV sont symétrique et égale a 100% des 2 cotés et que le dans le menu SUBTRIM tout soit a 0% (décalage du neutre = nul) (ces fonctions sont dans le menu basic)
    • Vous pouver maintenant connecter tous les servo à leurs tiges.

    2.1 Neutre des servos:

    • Débrouillez vous pour toujours respecter ce que le manuel du constructeur!
    • Mais si rien n'est spécifier, essayer de toujours suivre les 2 règles suivantes :
      - Bras perpendiculaire au boitier du servo, pour avoir un déplacement (rotation est un mot plus juste) égale de part et d'autre du neutre du servo. c'est ainsi que le servo atteint le maximum de ses performances.
      - Bras de servo parallèle entre eux ou avec la tige de renvoie du mixeur mécanique qui lui est connecté
    • En fait un hélicoptère bien reglé se voit comme ceci :
      - au neutre tous les mixeurs, bras de servo sont d'équerre (perpendiculaire au bati, au boitier de servo ou à autre chose...)
      - le plateau cyclique est au milieu de sa course (on recherche une commande symétrique, du type -10° +10°)

    2.2 Comment respecter ces règles ? (perpendiculaires, parallèle)

    • Trouver le neutre mécanique ! servo et télécommande sous tension, essayer de choisir un cran avec le bras de servo pour approcher le mieux possible le résultat escompté.
    • Ajuster le neutre électronique avec la fonction subtrim, mais attention, cette fonction à un effet pervers: elle limite d'autant de pourcent la course totale d'un coté !
      - ex : subtrim de 5%, vous devrez pour avoir 100% des deux cotés du débattement : 95% a gauche et 105% a droite (menu ATV ou End Point)
      - ex : subtrim de -5%, vous devrez pour avoir 100% des deux cotés du débattement : 105% a gauche et 95% a droite (menu ATV ou End Point)

    3. Sens des servos

    C'est le plus simple a faire, toujours dans le menu basic, aller dans la fonction REVERS (ou menu reverse). Si le sens actuel n'est pas le bon, appuyer sur + ou - pour le changer....Attention on regarde l'hélicoptére de dos, ce qui permet a votre cerveau de se reposer et évite de devoir inverser mentalement les commandes.

    Règle:
    Le plateau cyclique doit s'incliner dans la màªme direction que le mouvement de translation de la machine souhaitée.

    3.1 Droite, gauche, en avant en arrière:

    • Stick gauche en avant, le plateau cyclique s'incline vers l'avant....stick gauche en arriere, le plateau cyclique s'incline vers l'arriere... (Cyclique longitudinale : voie 2).
    • Stick droit a droite, le plateau cyclique s'incline vers la droite....stick droit a gauche, le plateau cyclique s'incline vers la gauche....(Cyclique latérale : voie 1)

    3.2 Servo des gazs:

    • Stick droit en bas, le papillon du carburateur doit se fermer. (la tige va vers l'arrière).
    • Stick droit en haut, le papillon du carburateur doit s'ouvrir. (la tige va vers l'avant).

    3.3 Servo d'anticouple:

    • Prérequis:
      Le rotor vu de dessus de dos tourne dans le sens horaire, l'anticouple vu de son coté en sens antihoraire. Si tel n'est pas le cas c'est que le 1/4 de tour de courroie que vous avez fait en montant le tube de queue etait dans le mauvais sens ! redémonter et recommencer...
    • Sens de la commande (pour rotor horaire, anti couple anti horaire et anticouple a droite):
      Stick gauche a gauche, le slider rentre vers le boitier d'anticouple, si ce n'est pas le cas alors inverser la voie RUDDER sur la télécommande.
    • Sens d'action ou de correction du gyroscope (pour rotor horaire, anti couple anti horaire et anticouple a droite):
      Hélico vue de dos, poussez brutalement la queue vers la gauche, le slider doit s'éloigner du boitier, Si tel n'est pas le cas alors le gyro doit àªtre inversé. (le mode pas le boitier !)
    • Ceci marche pour tous les hélico à rotation horaire, et anticouple à droite. Penser à vérifier le sens de correction et le bon fonctionnement de l'anticouple avant chaque vol.

    3.4 Collectif (stick droit)

    • Stick droit en bas, le plateau cyclique descend tout en restant horizontal durant son déplacement.
    • Stick droit en haut, le plateau cyclique monte tout en restant horizontal durant son déplacement.

    4. Débattement des servos

    • Ceux ci se réglent en dernier lieu avec la commande ATV de votre télecommande (d'abord la distance entre les 2 chapes doit àªtre conforme)
    • Dépasser 100% si vous voulez plus de débattement (limite a 140%) ou diminuer pour réduire (limite a 30%).
    • Si vous respecter les longueurs préconises par le constructeur, vous ne devrier pas avoir de débattement a 30% ou à 140%. En moyenne qq % au dessus ou en dessous de 100% quand màªme.
    Cyclique latérale

    voie 1

    (inclinaison du plateau cyclique a droite ou a gauche)

    • De tel facon que le plateau ne touche pas l'arbre du rotor pour les pilotes 3D,
    • Limiter le débattement pour un débutant, la barre de bell doit s'incliner sur les cotes de qq cm, cela suffit (1.5 à 2 cm)
    Cyclique longitudinale

    voie 2

    (inclinaison du plateau cyclique en avant ou en arriere)

    • Limiter le débattement pour un débutant, la barre de bell doit s'incliner vers l'avant ou l'arriere d'environ 30 degrées. Trop votre hélico ferait une pirouette sur place et vous tordrer la barres de bell....trop peu il sera mou et lent a répondre.
    Gazs

    voie 3
    • Stick droit en bas, le papillon du carburateur doit se fermer complètement si le trim des gazs est au minimum.
    • Stick droit en haut, le papillon du carburateur doit s'ouvrir complètement.


    Toujours se débrouiller pour que A=A', :
    - Dévisser la tàªte de servo et servo au neutre débrouiller vous pour que le boisseau soit entrouvert à 50%,
    - A ce moment précis, les bras de servos doivent àªtre parallèle entre eux, voir schéma
    - Si ce n'est pas le cas dévisser du coté du carburateur.

    La symétrie de déplacement des 2 cotés est ici la clé du succés.

    Rud in du gyroscope

    voie 4

    debattement du servo d'anticouple.

    Si vous avez un autre gyro que le CSM 540, vous allez jouer du tournevis et devrer regarder la doc de votre gyroscope sinon :
    • Eteigner l'helico, puis rallumer le, vous avez 10s durant l'autosetup pour basculer plusieurs fois l'interrupteur de passage du mode heading lock au mode normal (inter F du channel 5 sur la FF8)
    • Le servo d'anticouple s'agite pour confirmer que vous etes dans le mode de reglages.
    • La led orange s'allume si le sens d'action du gyro est reverse, s'eteint sinon. (Basculer le stick gauche a droite ou a gauche pour changer l'etat). Valider en basculant l'inter (aller retour). Le gyro confirme en en commandant au servo d'anticouple de faire un aller retour. Tener l'helico par l'arriere et pousser violement le poutre de l'helico vers la gauche, le levier plastique doit s'éloigner du boitier d'anticouple pour corriger la perturbation. Inverser dans le gyro si ce n'est pas le cas. (mon gyro est en mode reverse, car le servo est sur la poutre avec une commande en carbone plus rigide). Vérifier que : stick gauche a gauche, le slider rentre vers le boitier d'anticouple, si ce n'est pas le cas alors inverser la voie RUDDER sur la telecommande.
    • La led verte s'allume si vous avez un super servo (vous savez le servo futaba numerique a 900 FF ou le JR a 1500 FF), s'eteint sinon. (Basculer le stick gauche a droite ou a gauche pour changer l'état). Valider en basculant l'inter (aller retour). Le gyro confirme en en commandant au servo d'anti couple de faire deux aller retour.
    • Voici le mode débattement du servo pour un cote, approcher vous du boitier d'anticouple et pousser le stick gauche de telle facon a avoir d'un cote le débattement maximum que la mécanique permet. Valider en basculant l'inter (aller retour). Le gyro confirme en en commandant au servo d'anticouple de faire un aller retour.
    • Voici le mode debattement du servo pour l'autre cote, pousser le stick gauche de telle facon a avoir de l'autre cote le debattement maximum. Valider en basculant l'inter (aller retour).
    • Le gyro confirme en en commandant au servo d'anticouple de faire deux aller retour.

    C'est FINI !!!!!!!! Merci CSM.

    Gain du gyroscope

    voie 5

    (si vous avez cette fonction sur votre gyro)

    CSM recommande dans la documentation 60% des 2 cotés. Aller dans le menu ATV (ou END-Point sur la FF9) et spécifier 60%
    Pas ou collectif

    voie 6

    • Utiliser une jauge, mieux emprunter la (c'est cher et pas utile sauf si vous dépasser le cap de l'année d'helico), au pire utiliser les indications assez imprécises graves sur le chassis de votre hélico (cela reste suffisant pour du stationnaire, translation).
    • Je vous recommande +9° -9° en butee du stick droit et environ 6° en vol stationnaire, c'est a dire stick droit légerement au dessus du centre.(Normalement un "bon" pilote veut 0° au centre et a des commandes symétriques)
    • Certains vous dirons d'éviter de trop grande valeurs négatives car un débutant a comme reflexe, lorsqu'il est affolé de pousser le stick en bas et donc d'accélerer la chute de l'helico. C'est vrai mais vous devez absolument àªtre patient et gagner en hauteur cm après cm votre stationnaire de dos (avec un patin d'écolage bien sur).
    • Toujours jouer avec l'ATV de la voie 6 pour augmenter ou réduire le pas limite. Si vous n'arrivez pas à vos objectifs, vérifier la longueur de vos chapes....
    • Pour info en 3D on cherche a avoir du +12° -12° voire plus des fois mais pas avec un moteur genre TT36 car il faut de la ressource pour tenir 12° au rotor !!! Si vous cherchez à "visser" l'helico dans l'air, opter pour un classe 90 sous 30% de nitro.
    • Le plateau doit monter en restant horizontale tout le long de sa course, si tel n'est pas le cas alors vérifier la longeur des tiges le reliant. Si vous àªtes en CCPM (mélangeur électronique), ne mélanger pas les marques ou caractéristiques des 3 servos (3 servos fonctionne simultanément pour le pas dans ce mode).

    5. Courbe de pas et de gazs

    Objectif de la méthode de réglage:AVOIR UNE VITESSE ROTOR LA + CONSTANTE POSSIBLE

    5.1 Pourquoi?

    Eh bien parce que la relation qui lie la position du stick, à la vitesse du moteur (qui dépend de la charge ou pas en degrée, du mélange (ratio air-essence), des conditions atmospheriques : température, humidité qui influe sur le ratio air/essence, et et etc) n'est malheureusement pas linéaire.....On cherche bien sur à avoir une vitesse au rotor constante. Seul un régulateur de vitesse tel le governor de Futaba (GV1) peut aider mais ce n'est pas un équipement standard sur l'helico et il faut compter 200 € en plus. De plus on le monte sur un moteur deja réglé car si il lache..ou que le régulateur régule un moteur su des courbe de gazs mauvaises, il calera ou s'apauvrira en vol (pas bon : serrage et surchauffe).

    5.2 Comment?

    • Avec un tachymètre OPTIQUE (une disque perforé a travers laquelle on regarde le rotor en vol et que l'on synchronize avec la période de rotation de celui-ci: effet stroboscopique). Prix 200 € mais il faut avoir un collègue pour les mesures. Cela reste cher car on ne s'en sert que très peu souvent.
    • OU A l'oreille (très dur si on est débutant) encore une fois c'est empirique et cela ne me plait pas beaucoup non plus. Commencer par une courbe lineaire, puis si le moteur perd des tours a un position de stick donne, il faut aller dans la courbe de gazs et translater la courbe de 5% ou monter localement quelques points. (5 point sur la FF8, 15 sur la Zap). Tout se fait a l'oreille et il vaut mieux demander de l'aide aun pilote experimenter.

    Je recommande d'utiliser un tachymètre optique ou de se le faire préter. Voire d'en fabriquer un..

    5.3 Calcul de la vitesse idéale du rotor:

    • Regarder ce que préconise le fabriquant pour la vitesse rotor ou demander sur les forums ce que les pilotes expérimentés ont trouvé comme vitesse idéale (fonction du moteur, des pales, du type de vol (hover, translation, 3D, FAI)). Noter cette vitesse en tr/min c'est notre objectif.
    • Pour la retrouver, Si le moteur est idéalement utilisés, par exemple pour un OS32 : il tournera idéalement à 18000 tr/min (1,2HP) il suffit de diviser par le ratio de réduction du train du rotor principale = par ex 9.6 => 18000 / 9,6 = 1875 => 1875 tr/min devrait àªtre idéal pour le moteur et à fortiori pour le rotor si le fabricant recommande ce moteur et le taux de réduction de 9.6.

    5.4 Conséquences si non respect:
    Survitesse du rotor, efficacité réduite, au pire, vous tombez sur une des fréquence propre du rotor qui amplifie les vibrations, destruction des blades (>2200 tr/min), fatigues excessives etc....

    5.5 remarques:

    • Suivant les conditions de vol (vents) ou de mode (stationnaire, acrobaties, translation) il n'est pas rare d'avoir 3 ou 4 courbes differentes de gazs ou de pas actionnables grace aux nombreux interrupteur de la telecommande.
    • Mes hélico sont tous symétrique au niveau de la commande de pas, c'est a dire que pour décoller, je dois dépasser de quelques cran la position centrale pour avoir 4-5° de pas positifs.

    6. Courbes en mode normal

    Position du stick en mode hover Mesure de la vitesse par rapport Vitesse idéale Corrections courbes en ce point
    En dessous supérieur
      inférieur
      proche idéal
    Stick milieu supérieur
      inférieur
      proche idéal Stop, objectif atteint,l'hélico décolle avec la bonne vitesse rotor.
    Au dessus supérieur
      inférieur
      proche idéal

    Remarque: Il faut itérer dans le tableau et ne faire que de petit changement à chaque fois, jusqu'a atteindre le résultat escompté

    7. Taux de monté

    Ce réglage correspond au stick à 3/4 de sa course. Le but est d'avoir une vitesse ascendante "intéressante" (comprenez en adéquation avec votre maitrise de pilotage) tout en conservant une vitesse proche de la vitesse lors du décollage. Ce taux de monté est affaire de gouts et c'est a vous de choisir.

    Taux de monté, stick au 3/4 Mesure de la vitesse par rapport Vitesse idéale Corrections courbes en ce point
    Trop lent chute Â
      proche idéal
      augmente
    Idéal chute
      proche idéal Stop, objectif atteint,l'hélico a un taux de monté idéal avec la bonne vitesse rotor.
      augmente Â
    Trop Rapide chute
      proche idéal Â
      augmente

    A fond, a Fond !

    Ceci dépend de la puissance de votre moteur, de votre pot (réseau ou pas), du taux de nitro que vous utilisez (boost). Si la vitesse rotor s'écroule, vous devrez réduire la pas max, si la vitesse augmente, augmenter le pas en ce point.

    7. Taux de descente

    C'est la vitesse que vous souhaiter pour le stick de gazs a 1/4 de sa course tout en ayant une vitesse rotor constante. En général :
    - Le rotor rentre en survitesse (pas négatif) car l'air relatif qui le traverse augmente sa vitesse.
    - Si la vitesse chute par contre beaucoup trop, vous risquez de devoir remonter violement les gazs pour arréter la chute si il n'est pas déja trop tard.

    Taux de descente, stick au 1/4 Mesure de la vitesse par rapport Vitesse idéale Corrections courbes en ce point
    Trop rapide rester dans l'idéal en jouant sur les gazs  + ou
    Trop lente rester dans l'idéal en jouant sur les gazs + ou

    Vous avez fini ? bravo !

    Le futur pour éviter tout cela ?un moteur avec une électrovanne, une sonde lambda, tachymètre et un calculateur qui asservit la vitesse de sortie de l'arbre. Cela existe mais cela marche pas trop bien encore et cela coûte très cher... plus de 1200 €

    9. Iddle up

    Courbe de gazs en V ?

    C'est tres simple le moteur tourne quasiment tout le temps a fond en iddleup 2 (car on lui met +-9° de charge en 3D) mais lorsque le pas est proche de -3° 0° 3° le rotor risque de rentrer en survitesse alors on reduit donc les gazs -> courbe de gazs en V

    10. Finir le montage

    Une fois réglé, vous devez router les cables soigneusement et ne pas hésiter a les fixer. Cela participe grandement a la sécurité du modèle, en vrac :

    • Aucun cable ne doit pouvoir rentrer dans une partie en rotation,
    • Utiliser de la durite pour entourer les cables si vous traverser ou dépasser de la canopie,
    • Mousse pour la batterie, cela va éviter aux soudures sèches de lacher. Ne pas oublier apres un crash de les démonter et de les vérifier.
    • Fixer solidement le quartz dans sont logement, l'y coller si besoin est avec du scotch.
    • Fixer solidement au double face adapté le gyro.
    • Utiliser des rylsans ou serres-cables.
    • Vérifier la durite de pressurisation, si elle lache en vol le moteur a de grande chance de caler...
    • Aucun point dur dans le rotor, tjrs rechercher la cause et corriger mécaniquement ou électroniquement.
    • Aucun point dur dans le rotor d'anticouple, tjrs rechercher la cause et corriger mécaniquement ou électroniquement.

    Â

    Â

    Basic Menu                
      TH-CRV Courbe des gazs            
        NORM 1 2 3 4 5  
          47% 65% 75% 85% 100%  
      PI-CRV Courbe de pas rotor            
        NORM            
          0% 25% 50% 75% 100%  
      REVOLU              
        NORM            
          -20% -10% 0% +10% +20%  
      ATV Limitation de la course des servos            
        ATV-AI(aileron) Voie1 140%   140%    
        ATV-EL Voie2 100%   100%    
        ATV-TH(Gazs) Voie3 133%   106%    
        ATV-RU Voie4 100%   100%    
        ATV-GY Voie5 60%   60%    
        ATV-PI Voie6 45%   100%    
        ATV-7 Voie7 100%   100%    
        ATV-8 Voie8 100%   100%    
        D/R AI CH1 CH2 CH4      
          UP100 UP100 UP100      
          DOWN100 DOWN100 DOWN100      
        D/R EL CH2   UP100% DOWN100%    
        D/R-RU     UP100% DOWN100%    
        EXP-AI CH1          
              UP0% DOWN0%  
        EXP-EL CH2     DOWN0%
        EXP-RU CH4   UP0% DOWN0%    
        F/S            
          AIL, ELE, THR
    RUD, GYR, PIT
      NORM      
      REVERS Sens d'action des servos            
        AIL CH1 REV        
        ELE CH2 REV          
        THR CH3 REV        
        RUD CH4 REV        
        GYR CH5 NORM        
        PIT CH6 NORM        
        CH7 CH7 NORM        
        CH8 CH8 NORM        
      PARA              
        ATL ON          
        EG/S INH          
        HELI SWH1          
        MOD PCM a changer selon
    le type de votre
    récepteur
           
        INVERT MODE INH          
      TRIM-AI              
        STEP4            
      TRIM-EL              
        STEP4            
      TRIM-TH              
        STEP4            
      TRIM-RU              
        STEP4            
      TRIM              
        DISP NEGA            
      SUBTRIM              
          AIL 0        
          ELE 0        
          THR 0        
          RUD 0        
          GYR 0        
          PIT 0        
          CH7 0        
          CH8 0        
        TRAINR            
          INH          
          AIL FUNC        
          ELE FUNC        
          THR FUNC        
          RUD FUNC        
          GYR OFF        
          PIT OFF        
          CH7 OFF        
          CH8 OFF        
        TH-CUT CH3          
            0% 5%      
                   
  • apache_maven

    Doxygen phpDocumentator phpunit-logo teamcity512 maven4php

    Maven for PHP uses the power of Maven for building, reporting on and creating documentations of PHP projects. It adapts the Maven build lifecycle to the PHP world while fully supporting PHP 4 and PHP 5. PHP for Maven uses PHPUnitfor unit testing and doxygenfor creating the api documentation.
    Use a PHP library project to create a library that can be used by other PHP libraries or PHP web projects. Use a PHP web project to create a standalone web project.

    So I quickly describe what I did install on my root server (OpenSuse 11.X)

    My Objectives: being able to build all my Joomla! component using best agile development practices

    “Specific tools and techniques such as continuous integration, automated or xUnit test, pair programming, test driven development, design patterns, domain-driven design, code refactoring and other techniques are often used to improve quality and enhance project agility.”

    Maven

    While not needed as TeamCity has an integrated Maven engine, I would like to use an external MAVEN version, in order to have the latest version and living dangerously on the edge!

    So I download

    # wgethttp://apache.mirror.testserver.li/maven/binaries/apache-maven-2.1.0-bin.tar.gz

    And unpack

    # tar xvf apache-maven-2.1.0-bin.tar.gz

    Since I would like to avoid having a version number in my configuration build path, I create a symlink

    # ln -s apache-maven-2.1.0 maven

    I just now tell TeamCity to use my own Maven version, by specifying the Maven Home Path

    teamcity.maven4php 

    phpDocumentor

    phpDocumentor is an open source documentation generator written in PHP. It automatically parses PHP source code and produces readable API and source code documentation in a variety of formats. phpDocumentor generates documentation based on PHPDoc-formatted comments and the structure of the source code itself. It supports documentation of both object-oriented and procedural code. phpDocumentor can create documentation in HTML, PDF, CHM or Docbook formats.

    Can be installed using PEAR, simply run

    # pear upgrade PhpDocumentor
    downloading PhpDocumentor-1.4.2.tgz...
    Starting to download PhpDocumentor-1.4.2.tgz (2,421,028 bytes)
    ..............................................................................done: 2,421,028 bytes
    upgrade ok: channel://pear.php.net/PhpDocumentor-1.4.2

    PHPUnit

    PHPUnit is a unit testing framework for the PHP programming language. Created by Sebastian Bergmann, PHPUnit is one of the xUnit family of frameworks that originated with Kent Beck's SUnit.

    Can be installed using PEAR, simply run

    # pear upgrade PHPunit

    DOxygen

    Doxygen is a documentation generator for C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D. It runs on most Unix-like systems, including Mac OS X, as well as on Windows. The first version of Doxygen borrowed some code of an old version of DOC++; later, the Doxygen code was rewritten by Dimitri van Heesch. from www.doxygen.org

    # zypper se doxy
    Lese installierte Pakete...

    S | Name       | Zusammenfassung                                    | Typ 
    --+------------+----------------------------------------------------+------
      | doxygen    | Automated C, C++, and Java Documentation Generator | Paket
      | doxywizard | Graphical User Interface for Doxygen               | Paket

    # zypper in doxygen

    Herunterladen von Paket doxygen-1.5.5-17.1.x86_64 (1/1), 2,3 M (6,2 M installiert)
    Lade herunter: doxygen-1.5.5-17.1.x86_64.rpm [fertig] 
    Installiere: doxygen-1.5.5-17.1 [fertig]

    Artifactory

    Prepare Artifactory by adding new Maven for PHP repositories

    At http://maven.waltercedric.com/artifactory/webapp/repositoryconfig.html

    As Admin user (you cant go to that links without being an admin!), add 2 new repositories

    teamcity.maven4php.artifactory

    In Maven settings.xml

    In order to use Artifactory at his best (proxy and caching of remote repositories), I have a Maven settings.xml that contains ONLY

    # vi /home/teamcity/.m2/settings.xml

    <activeProfiles>
      <activeProfile>cedric-profile</activeProfile>
    </activeProfiles>

    <profiles>
       <profile>
            <id>cedric-profile</id>
            <activation>
            <activeByDefault>true</activeByDefault>
            </activation>
    <repositories>
        <repository>
            <id>central</id>
            <url>http://maven.waltercedric.com/artifactory/repo/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>snapshots</id>
            <url>http://maven.waltercedric.com/artifactory/repo/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <url>http://maven.waltercedric.com/artifactory/plugins-releases/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>snapshots</id>
            <url>http://maven.waltercedric.com/artifactory/plugins-snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>
        </profile>
      </profiles>
    </settings>

    Attention: Artifactory WIKI tell to use http://maven.waltercedric.com/artifactory/plugins-releases and not http://maven.waltercedric.com/artifactory/plugins-releases/ on my HOST with mod_proxy it made an error 404 If I do not add a slash at the end. Try with your host before, you will gain a lot of time by checking if the URL is valid!

    Note that http://url:port/artifactory/repo/ is a virtual repositories that proxy all external repositories

     

    Eclipse

    Use SolarJoomla (hopefully to be distributed this week) to have a running Eclipse, PDT, Maven 4 PHP environment, Mylyn, TeamCity in no time

    Lets build!

    First I create a new Maven Project with Archetype “Maven for PHP” “PHP5 libraries”

    In TeamCity I did create a new project “Joomla 15 components plugins and modules” and a new Build “MyGuestbook”.

    teamcity.maven4php.myguestbook

    The first build failed with

    [INFO] PHP Warning: require_once(PHPUnit/TextUI/TestRunner.php): failed to open stream: Operation not permitted

    This is because of my PHP security restrictions, I only allow file to be opened from /home/teamcity/

    So I just add

    /home/teamcity/TeamCity/buildAgent/ to my open_basedirin my php.ini

    ; open_basedir, if set, limits all file operations to the defined directory
    ; and below.  This directive makes most sense if used in a per-directory
    ; or per-virtualhost web server configuration file. This directive is
    ; *NOT* affected by whether Safe Mode is turned On or Off.
    open_basedir = /srv/www/vhosts:/tmp:/home/teamcity/TeamCity/buildAgent/

    To be continued

    So long an empty PHP project is building successfully, tomorrow I will try to make a REAL Joomla! component build there!

    As soon as It works, and all my Joomla! components are running in TeamCity, I will try to achieve the same goal in Bamboo, why? because it is simply . . .fun!

    Links