Index by title

Access Rights

Tosca manages 6 roles, with different access rights : Notes for all roles, except public
All can make remarks on Tosca and have access to :

Note for public role
Issues and supported versions/releases for software are not displayed : Only a number is displayed.
Example : for Firefox software, Tosca display number of supported versions, and number of issues on this software, instead of the list of issues and versions.

Note for admin role
This role can't delete accounts and clients. Instead of, an account or a client has to be set inactive. This allow Tosca to keep all user/client comment, historic, issues, actions, etc.. You can still delete an account or a client, but you have to make this throw the rails console, on the server where Tosca is installed.

Note for manager role
A manager user can only works on contracts (s)he is affected to, by the contract creator or by an admin. This allows all manager to work on their contracts. without being disturbe by other managers contracts.

Note for manager and expert role
There is a restricted attribute, which all the user to have access to all contracts/issues, if it's set.

Important
We discourage you to give admin rights to more than one person. This role allow the user to make deletion, which can be dangerous. For example, an admin user can delete a software. This deletion will delete all packets, binaries, files, changelogs, related to this software.
At the moment, the Tosca project doesn't focus on deletion actions.


Admnistrator's Guide

You can login for the first time on Tosca with the default Administrator account After getting a functionnal Tosca, you'll need to adapt it to your need. You'll find on this page some howtos for common usecases.

Clear completely cache of Tosca

You will have to type those commands:
rake tmp:clear
rm -f public/javascript/all*.js public/stylesheets/all*.css

CompleteInstallation

Follows the minimal installation.Then you'll need to install all others dependencies

sudo rake gems:install

And that's it, you can test your installation with a call to
rake test
If you didn't export before, export the rails test environnement
export RAILS_ENV=test
Launch Tosca with
./script/server

Mod passenger Installation

First of all do a Minimal Installation. Then install mod_passenger
You'll need some build tools, so issue this command in order to have them :
sudo apt-get install build-essential
Then you can install the gem :
sudo gem install passenger

Install the apache2 module :
sudo passenger-install-apache2-module
Open your /etc/hosts file and add this line to add new name for your computer
127.0.0.1 tosca.dev tosca.test tosca.prod

Create the file /etc/apache2/conf.d/mod_passenger.

You may have to adapt the path to passenger.

Copy this in /etc/apache2/conf.d/mod_passenger :
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.0.3/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.0.3
PassengerRuby /usr/bin/ruby
Create 3 file in /etc/apache2/sites-available Copy this in tosca-dev.conf :
<VirtualHost *:80>
  ServerName tosca.dev
  DocumentRoot /path/to/tosca
  RailsEnv "development" 
</VirtualHost>
Copy this in tosca-test.conf :
<VirtualHost *:80>
  ServerName tosca.test
  DocumentRoot /path/to/tosca
  RailsEnv "test" 
</VirtualHost>

Copy this in tosca-prod.conf :
<VirtualHost *:80>
  ServerName tosca.prod
  DocumentRoot /path/to/tosca
</VirtualHost>
Then enable these sites in apache :
sudo a2ensite tosca-dev.conf
sudo a2ensite tosca-test.conf
sudo a2ensite tosca-prod.conf
sudo /etc/init.d/apache2 reload
Now you have 3 urls to check :

A note about permissions

Be aware that the user running your application will be the owner of the environment.rb file. See http://www.modrails.com/documentation/Users%20guide.html#user_switching for details.

Optional : Complete Installation with Ruby Enterprise Edition

You'll need first to get the specialized interpreter : After, you can follow the normal installation guide. You can replace call to ruby, gem, rake, etc, etc with the prefix /opt/ruby-enterprise/bin/. For instance :
sudo rake gems:install
becomes
sudo /opt/ruby-enterprise/bin/rake gems:install

Script Configuration's Guide

Mode of configuration

You can run this script with two methods:

When you install Tosca, install script run automatically configuration script
sudo bash script/deploy/install
You can directly reconfigure your Tosca instance with this command
sudo bash script/deploy/configure

Note: Type "sudo bash script/deploy/configure --help" for more informations

Configuration's questions

Choose the database you want:
Which database backend does tosca have to use ?
For this question:
Do you want Tosca to use a remote MySQL database [y/N] ?

It's recommanded to answer no if you don't know what it means

Database configuration

Apache configuration

Do you want to configure automatically apache2 ? [Y/n]
If you're a sysadmin, it's advised to skip this part. The script can change some of your configuration files.

Tosca discovery

If you don't install passenger, you can launch Webrick HTTP server with:

script/server -e development

or
script/server -e test

or
script/server -e production

Configuration example

NOTICE: Log file set.
   output: /tmp/tosca-configure_201007161454.output
   error: /tmp/tosca-configure_201007161454.error
- Load tosca settings present on the system ... OK
Which database backend does tosca have to use ?
1- sqlite3 (testing/development)
2- MySQL (production)
3- PostgreSQL (production)
1
NOTICE: The sqlite database is located in /var/www/tosca/db/tosca-*.db*
- Update gem repository ... OK
- Install RubyOnRails ... OK
- Unpack and install Tosca gems - Freezing Rails ... OK
- Install Tosca database ... OK
Do you want to configure automatically apache2 ? [Y/n]Y
Write the URI base to access Tosca. Example: /tosca -> http://127.0.0.1/tosca  /
- Install Apache configuration ... 
Give a filename for apache vhost. ex: tosca-prod tosca-test
OK

Create Accounts for a contract

Requirements

You'll need, for each account :

You also need to have created before the contract(s) concerning those accounts

Steps

  1. Go to Administration->Add a user
  2. Fill in the fields concerning your account, do not forget to check the box on the right panel. Those boxes allows to link an account to one or more contracts.
  3. This account will automatically receive a welcome email, with its login/password.

Create a new Client with a dedicated contract

Requirements

You'll need :

Steps

  1. Go to Administration->Customers->Create a new client
  2. Fill in the fields concerning your customer
  3. You'll be redirected to the new contract view
  4. Fill in the fields concerning its first contract

The whole thing

Contribution

Request

Supported Software


Developer's Guide

First, you'll have to follow the Installation's Guide & read the Coding Style Standards applying to Tosca :

Get the source, Luke !

Install git & clone the repository : * with an access to the server :
git clone tosca-project.net:/var/git/tosca.git
* without an access :
git clone http://git.tosca-project.net/tosca.git tosca

Configure your environment

You will find in tools/ lots of pre-made configuration files for editing tools like

Feel free to update or add yours.

A little Howto for GIT ?

Go check our Git Userguide.

Get the documentation, Luke !

You can find it here for the code and here for the data model.

Translation, Luke !

Performance Tips

Test coverage

You can install rcov (well a fork of rcov)

sudo gem install spicycode-rcov --source=http://gems.github.com/

Then run
rake test:units:rcov
rake test:functionals:rcov

You will then have a test/coverage/ directory with all the result

Dev FAQ

Q. Why download of attachments is protected
A. Because no one wants to see a customer configuration file in the hands of a script kiddie

Q. How to make a simple benchmark
A. You can install apache & use the ab program like this :

/usr/sbin/ab -C '_session_id=???'-c 100 -n 1000 http://localhost:3000/:controller/:action/:id

Q. I am noob, where can I start ?
A. Would you please read fully the Noob's Guide.

Q. How to debug Tosca ?
A. You can use the ruby-debug gem. It provides a complete debugging tool, rdebug, fully integrated with Rails stack. See here for a tutorial


Edit an account in command line

Here are the steps :
  1. open the rails console
    ./script/console
  2. Get the account
    >> u = User.find_by_login('admin')
  3. Change its password
    >>  u.pwd = 'MyNewPassword'
  4. Confirm the change
    >> u.pwd_confirmation = 'MyNewPassword'
  5. Save the change
    >> u.save

It should display "true" if all went fine.


Extension's Guide

The repository for extensions is here :
git clone tosca-project.net:/var/git/extensions.git

You can view it online
Currently, there are three officials extensions :

Hack on extensions

First, you have to initialize your personal repository to use extension :
git submodule init

After, you can hack on extension within Tosca. It's sufficient to type :
git submodule update

In order to get all the extensions in '''$tosca'''/vendor/extensions/ If one wants to disable an extension, it's to sufficient to delete it. For instance :
rm -Rf vendor/extensions/jabber_notifier

Disable the jabber_notifier extension.

FAQ

  1. Q: What is the licence of Tosca ?
  2. R: Tosca is distributed under GPLv2+
  1. Q: What are the differences between Tosca and OTRS ?

Features list

The Tosca main features are:


Git's Guide

Here's cool tutorial for branching a complex work and merging it afterwards.

We have 2 main branches

git checkout master

And the production branch, were stable code is centralised :

git checkout -b production origin/production

A simple git checkout production afterwards is sufficient.


Some doc for Git

How to use Git

Configure

$ git config --global user.name "Bob User" 
$ git config --global user.email ""

Get the files

Clone http
$ git clone http://git.tosca-project.net/tosca.git tosca

Clone git
$ git clone '''$login'''@tosca-project.net:/var/git/tosca.git tosca

Create a patch

Small patch, fast way :
$ git diff

Big patch, longer way, with a local branch :
Create a local branch
$ git checkout -b workingbranch master

Make your patch
$ edit some_files
$ git add | git mv | git rm | vim | emacs

Commit
$ git status
$ git commit -a -m "this patch does this & this because of this"

Time to time, you can keep up your local branch with the repository :
git-checkout master # sur la branche master
git-pull # merge local branch with master, brute force
git-rebase # merge local branch with master, softer : it's interactive and does not commit the result

Extensions annoy me

Then you can delete them :
$ rm -Rf vendors/extensions
$ git checkout vendors/extensions

Conf file for git copy it to .git/config

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = tosca-project.net:/var/git/tosca.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[branch "production"]
    remote = origin
    merge = refs/heads/production

Installation Guide

Grab the latest sources

They are located at : http://redmine.tosca-project.net/projects/list_files/tosca

Install the dependencies

On Debian / Ubuntu

sudo apt-get install librmagick-ruby1.8 ruby1.8 ruby1.8-dev ri ri1.8 rdoc rubygems rake irb libopenssl-ruby libonig-dev libldap-ruby1.8 

note: on some system, package libgettext-ruby-util can be needed if you have error `msgmerge' can not be found. while making rake updatepo

sudo gem install rubygems-update
sudo /var/lib/gems/1.8/bin/update_rubygems
sudo gem install gettext desert xmpp4r
sudo gem install -v=2.3.5 rails
In application's directory :
sudo rake gems:install

Choose a database

SQLite

sudo apt-get install libsqlite3-ruby1.8

PostgreSQL

sudo apt-get install libpgsql-ruby1.8

MySQL

sudo apt-get install libmysql-ruby mysql-server
Note : If you need to install the DB gem from sources, you'll need to install some dev tools :
sudo apt-get install gcc make libmysqlclient15-dev

Configure the database

Database parameters must be defined in application's

config/database.yml

This file should look like this example (in the case of a sqlite database):

development:
  adapter: sqlite3
  database: db/tosca-dev.db
test:
  adapter: sqlite3
  database: db/tosca-test.db
production:
  adapter: sqlite3
  database: db/tosca-prod.db

Install Tosca

In application's directory :
rake tosca:install

Note : Answer "No" when asked to use default database configuration. Otherwise changes made to the database.yml file will be lost.

With the next command, you can add some example data in your database :
rake tosca:generate
Note : Check your config/database.yml, you should have this for an sqlite database:
development:
  adapter: sqlite3
  *database: db/tosca-dev.db*

test:
  adapter: sqlite3
  *database: db/tosca-dev.db*

production:
  adapter: sqlite3
  *database: db/tosca-prod.db*

Test and developement environnements use the same database.

Access the application from the web

Using WEBrick

Export the test environnement
export RAILS_ENV=test

In application's directory :
./script/server

Using Apache

It's detailled here : CompleteInstallation

Configuration

Authentificate on LDAP

You have ton install the ruby-ldap lib
sudo apt-get install libldap-ruby1.8
Copy the file config/ldap.yml.sample to config/ldap.yml
cp config/ldap.yml.sample config/ldap.yml
Edit this file to match you configuration
ldap:
  host: localhost
  port: 389
  binddn: "cn=admin,dc=linagora,dc=lan" 
  bindpw: linagora
  filter: "(&(objectclass=person)(uid=?))" 
  basedn: "ou=People,dc=linagora,dc=lan" 
  scope: "LDAP::LDAP_SCOPE_ONELEVEL" 
  protocol: 3

Installation's Guide (with script)

Introduction

There is two mode in Tosca install :

We advise to install tosca from the tarball if you are in a production environment.
If you want to see the latest features or want to contribute to tosca, you can use the 'git version' of the installer.

WARNING: when you choose an installation way, you can't change it. The industrialization script of tosca deal with upgrade in a simple way : upgrade a tarball installation to a tarball setup, and a git installation to a git setup.

Download latest sources of Tosca:

With wget
wget http://redmine.tosca-project.net/attachments/download/40/tosca-0.8.3-full.tar.bz2
tar -xvf tosca-0.8.3-full.tar.bz2

or git
git clone http://git.tosca-project.net/tosca.git tosca

Run setup bash script

Go in the tosca directory
cd path/to/your/tosca/dir

Ready for install ?
sudo bash script/deploy/install

Supplementary informations

First question

When you have this question:
Give a filename for apache vhost. ex: tosca-prod 
Where do you want install Tosca ?

type a path like that (for example):
/var/www/tosca

Passenger Question

Do you want use Apache and mod passenger ? [Y/n]

If you answer "n", you'll be able to test Tosca with webrick web server.

Environment question - For git install only

Do you want to run in production mode ? [Y/n]

If fou answer Y or y, the script will setup submodules of tosca (extensions) and you'll run in prodcution mode.

Second question (on database)

Choose the database you want choosing corresponding number:
Which database backend does tosca have to use ?
For this question:
Do you want Tosca to use a remote MySQL database [y/N] ?

It's recommanded to answer no if you don't know what it means

Database configuration

Apache configuration

Do you want to configure automatically apache2 ? [Y/n]
If you're a sysadmin, it's advised to skip this part. The script can change some of your configuration files or the whole apache behaviour.

Setup Example

This script will install Tosca on your system, with all dependencies.

Notice: This installation process has been tested only for :
        - Debian (Lenny)
        - Ubuntu (Karmic & Lucid)

Press ENTER to continue, Ctrl+C to exit

NOTICE: Log file set.
   output: /tmp/tosca-install_201007161451.output
   error: /tmp/tosca-install_201007161451.error
Where do you want install Tosca ? /var/www/tosca
- Install Apache webserver ... OK
- Copy Tosca in /var/www/tosca ... OK
- Install Tosca dependencies ... OK
- Update /etc/tosca/tosca.conf ... OK
NOTICE: Log file set.
   output: /tmp/tosca-configure_201007161454.output
   error: /tmp/tosca-configure_201007161454.error
- Load tosca settings present on the system ... OK
Which database backend does tosca have to use ?
1- sqlite3 (testing/development)
2- MySQL (production)
3- PostgreSQL (production)
1
NOTICE: The sqlite database is located in /var/www/tosca/db/tosca-*.db*
- Update gem repository ... OK
- Install RubyOnRails ... OK
- Unpack and install Tosca gems - Freezing Rails ... OK
- Install Tosca database ... OK
Do you want to configure automatically apache2 ? [Y/n]Y
Write the URI base to access Tosca. Example: /tosca -> http://127.0.0.1/tosca  /
- Install Apache configuration ... 
Give a filename for apache vhost. ex: tosca-prod tosca-test
OK

Sévérité d'une demande

Lors de la déclaration d'une demande concernant une anomalie logicielle, il y a quatre type de sévérité définie :
  1. Bloquante
  2. Majeure
  3. Mineure
  4. Sans Objet

Bloquante

Dysfonctionnement bloquant toute utilisation d'une application ou nuisant à la réputation d'un ou plusieurs sites internet.
Ce type de dysfonctionnement doit être traité dans l'urgence et nécessite une forte disponibilité de l'équipe en charge des opérations de maintenance

Majeure

Il s'agit des incidents qui empêchent l'utilisation totale d'une fonctionnalité
et la poursuite des traitements par tous les utilisateurs, ou de nature à dégrader les données du système.

Mineure

Il s'agit des incidents qui empêchent l'utilisation partielle d'une sous-fonctionnalité ;
ou d'autres incidents pouvant être rencontrés sur le système en particulier les défauts liés aux interfaces homme-machine.

Sans Objet

Concerne toutes les demandes sur les logiciels hors périmètres.
Ils ne sont pas soumis à un engagement de temps contractuel.


RequestStatus

  1. [Prise en compte]
  2. [Suspendue]
  3. [Annulée]
  4. [Analysée]
  5. [Contournée]
  6. [Corrigée]
  7. [Clôturée]

LifeCycle


Welcome to the TOSCA wiki !

Presentation

Installation guidelines

Guides

Demo

You can use admin/admin on the demo site :

Note : Tux Worker Logo was made by Kami and found on CrystalXP .


NewRequest

In order to submit a new request, you need: It's clearly better to have all the information needed before submitting your request. Here are some informations which are often asked :

Déclaration d'une nouvelle demande

Pour déclarer une demande, vous devez : Vous devez vous munir d'un maximum d'informations concernant les machines et les logiciels concernés, notamment :

News


NextVersion

What's done and need to be QA'ed

X First version for Pending Request, with delay feature, accessible for recipients & engineers
X First version for Software Cover

Noob's Guide

First, hello & welcome noob, here's a good place to start.

What I have to know before starting

I have to get in touch with Ruby


Translation's Guide

We use rgettext. We have chosen a technology which is widely used in open source projects.
You can have more information on GetText at Wikipedia and you can install a dedicated editor for it like PoEdit

How can I translate something ?

After getting the code, you'll have 2 rake taks dedicated for it. try to launch the first one :
rake updatepo
It will read the source code & update po files, located in po/, which are basically the source code of the translation. You can edit it with a simple text editor or a dedicated translation tool like poedit.
When you have finished to translate, you can launch :
rake makemo
Which will compile & produce the mo files. Then you can restart Tosca & see the look of your changes.

I just want to see Tosca in an other language

There's more than way to do it
  1. You can try, for a simple page, to add "?lang=xx" to the end of the url. for instance :
  2. For the entire site, you'll have to change the preference of your browser, indicating that the language you look at is your preferred one. For Firefox browser, it's hidden in Content->Languages of its Options/Preferences dialog.

Key Terms between French & English


Update's Guide (with script)

Launch the code update

With a Tosca git directory

If you have a Tosca git repository, you can type this command directly:
sudo bash script/deploy/update

With a Tosca tarball directory or Tosca git directory

Get a tarball:
wget http://redmine.tosca-project.net/attachments/download/40/tosca-0.8.0-full.tar.bz2
tar -xvf tosca-0.8.0-full.tar.bz2

or a new git repository
git clone http://git.tosca-project.net/tosca.git tosca

and run this command
sudo bash script/deploy/update

Note:
- If you have a file called "i_am_a_tarball" in /config (in your Tosca's instance directory that you've setup), you have a Tosca tarball directory
- If you don't, you have a Tosca git directory

Question

When you have this question:
On which Tosca's instance do you want to update the code ?

Type the number corresponding to the instance of Tosca you want to update and press enter.

Note: You wont have to answer to this question if you have setup just one Tosca in your system

Upgrade's example


wget http://redmine.tosca-project.net/attachments/download/40/tosca-0.8.3-full.tar.bz2
tar -xvf tosca-0.8.3-full.tar.bz2
tosca/
tosca/vendor/
[...]

ls
tosca tosca-0.8.3.tar.bz2

cd tosca/

sudo bash script/deploy/update
This script will install Tosca on your system, with all dependencies.
NOTICE: Log file set.
    output: /tmp/tosca-update_201006231042.output
    error: /tmp/tosca-update_201006231042.error

Wait please during update
WARNING: If you stop the procedure, your Tosca instance could be corrupt

- Setup new gems needed by Tosca and unpack them ... OK
- Update translation ... OK
- Clear cache ans session ... OK
- Change owner of /var/www/demo ... OK
- Restarting apache gracefully ... OK
Tosca Configuration Succeed !