DevEnv

Differences between revisions 5 and 36 (spanning 31 versions)
Revision 5 as of 2010-06-08 13:44:34
Size: 3057
Editor: 84
Comment:
Revision 36 as of 2016-03-06 01:15:51
Size: 6957
Editor: tsimonq2
Comment: changed apt-get to apt
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
<<Include(QATeam/Header)>>
||<tablestyle="float:right; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;"><<TableOfContents>>||
Line 5: Line 8:
Technically, it is a Drupal instance with some in-house developed modules, hosted at the ubuntu-qa-website project in Launchpad. Technically, it is a Drupal instance with some in-house developed modules, hosted at the [[https://launchpad.net/ubuntu-qa-website|ubuntu-qa-website project in Launchpad]].

== Use the script! ==
There is now a script to make this process easy. Check out [[https://github.com/SmajevicIrfan/qatracker-setup-script|https://github.com/SmajevicIrfan/qatracker-setup-script]]. You can still use this guide for reference as needed.

 *Note: This script will use apt-get to install packages without requiring confirmation.
Line 8: Line 16:
The production qatracker runs on drupal7, php5.3 and trusty server.

These instructions are for drupal7 and PHP5 utilizing trusty, though a newer version should also work fine.
Line 11: Line 23:
These instructions are for drupal5 and PHP5.2. This will required to install some PPAs if you want to have your development environment in 10.04 onwards. We need php, postgres, apache and drupal. It's important that you install php5 and drupal7 in order to ensure the qatracker will work. In addition, we will also need bzr to checkout the modules for the tracker from launchpad.
Line 13: Line 25:
{{{#!wiki caution
If your using any release >= Lucid, you will need to downgrade to drupal5 and php5.2 using the following PPAs:

 * PHP5.2: https://edge.launchpad.net/~txwikinger/+archive/php5.2
 * Drupal 5: https://launchpad.net/~ari-tczew/+archive/drupal
{{{
$ sudo apt install php5-pgsql postgresql apache2 drupal7 bzr
Line 20: Line 29:
First, install PHP5 and postgresql (and all the dependencies): === Installation Configuration Prompts ===

==== Postfix ====
Note, you may be prompted to configure postfix. Feel free to configure as you wish, or leave it as no configuration.

==== Drupal ====
Drupal will ask to configure a database, choose no.
We will setup the database in a moment.

=== Setting up apache ===
Now, we will make the drupal7 instance point to the Apache root folder:
Line 23: Line 42:
$ sudo apt-get install php5-pgsql postgresql $ sudo nano /etc/apache2/sites-enabled/000-default.conf
Line 26: Line 45:
Now install drupal5 with the default options: Modify /etc/apache2/sites-enabled/000-default.conf to
Line 29: Line 48:
$ sudo apt-get install drupal5 <VirtualHost *:80>
        #NOWEBSTATS
        ServerName ENTER_YOUR_SERVER_IP_HERE

        DocumentRoot /usr/share/drupal7

        # Protect the '/scripts' directory.
        RewriteEngine on
        RewriteRule ^/scripts(|/.*) http://%{SERVER_NAME}/ [R=301,L]
</VirtualHost>
Line 32: Line 60:
After installing drupal, we are going to drop the default database: == Setting up the database ==
This is not needed as drupal will configure these options itself.
Line 34: Line 63:
{{{
$ sudo -u postgres -i
=== Populating the database ===
Although it is possible to load a copy of the production database, this is not recommended.
Line 37: Line 66:
postgres$ dropdb drupal5
postgres$ dropuser drupal5
postgres$ exit
}}}
== Configure Drupal7 ==
Line 42: Line 68:
Now, we are going to create a user called "qatracker" and we are going to reconfigure drupal to use that user: Now, we are going to create a system user called "qatracker" and we are going to reconfigure drupal to use that user and both the user and database created before.
Line 46: Line 72:
$ sudo dpkg-reconfigure drupal5 $ sudo dpkg-reconfigure drupal7
Line 49: Line 75:
In the drupal5 reconfiguration, when asked by the username, type "qatracker" (password "qatracker") and database name also "qatracker" When adding the user, use a password of '''qatracker'''.
Line 51: Line 77:
Get the modules and theme from ubuntu-qa-website and copy them to your drupal5 installation: ==== Drupal7 Reconfiguration ====
Follow the prompts:
{{{
Reinstall database for drupal7 , select Yes
database type , select psql
Connection method for PostgreSQL database, select Unix Socket
authenticating the PostgreSQL administrator , select ident
authenticating PostgreSQL user, select ident
database name for drupal7, enter qatracker
username for drupal7, enter qatracker
password for postgres application, leave blank (it will generate random password).
 If you wish, this can be set to a password of your choosing but should not be required.
database admin user, enter postgres

}}}
== Install qatracker modules ==

=== QATracker ===
Get the modules and theme from ubuntu-qa-website and copy them to your drupal7 installation:
Line 55: Line 99:
$ sudo cp -R ubuntu-qa-website/code/modules/* /usr/share/drupal5/modules
$ sudo cp -R ubuntu-qa-website/artwork/* /usr/share/drupal5/themes
$ sudo cp ubuntu-qa-website/code/htaccess /usr/share/drupal5/.htaccess
$ sudo cp -R ubuntu-qa-website/modules/* /usr/share/drupal7/modules/
Line 60: Line 102:
Now we need to populate the database. === Adding openid modules ===
Grab these 2 launchpad branches and copy them to the drupal7 modules folder. Later we will activate and configure them inside the admin interface.
Line 63: Line 106:
$ cd /tmp
$ wget http://people.canonical.com/~ara/qatracker_db/dump_qatracker_safe.tar.gz
$ tar xzvf dump_qatracker.safe.tar.gz
$ sudo -u qatracker -i
qatracker$ psql qatracker < /tmp/dump_qatracker_safe.tar.gz
qatracker$ exit
$ bzr branch lp:~ubuntu-qa-website-devel/ubuntu-qa-website/drupal-launchpad-7.x drupal-launchpad
$ bzr branch lp:~ubuntu-drupal-devs/drupal-teams/7.x-dev/ drupal-teams
$ sudo cp -R drupal-teams drupal-launchpad /usr/share/drupal7/modules
Line 71: Line 111:
This command will populate the database with the needed tables and an admin user (admin/admin).
Line 73: Line 112:
We will activate the rewrite Apache module, to be able to convert correctly the different links in the site: === Apply the theme ===
The production instance uses the antonelli theme. Download and unpack it into /themes/.

{{{
$ wget http://ftp.drupal.org/files/projects/antonelli-7.x-1.0-rc1.tar.gz
$ tar xvzf antonelli-7.x-1.0-rc1.tar.gz
$ sudo cp -R antonelli /usr/share/drupal7/themes/
}}}

== Playing with your new instance ==
=== Apache ===
Activate the rewrite module and restart apache:
Line 77: Line 127:
$ sudo service apache2 restart
Line 79: Line 131:
Now, we will make the drupal5 instance point to the Apache root folder: You should now have a running site.
Line 81: Line 133:
 1. Delete the symlink at /etc/apache2/conf.d/drupal.conf
 2. Modify /etc/apache2/site-enabled/000-default with.
=== Launch Drupal Wizard ===
Navigate to your new drupal site and follow the wizard.
Line 84: Line 136:
http://localhost/install.php or http://YOUR_SITE_IP/install.php

During the wizard, make the following choices:
Line 85: Line 140:
<VirtualHost *:80>
 ServerAdmin webmaster@localhost

 DocumentRoot /usr/share/drupal5
 <Directory />
  Options FollowSymLinks
  AllowOverride None
 </Directory>
    <Directory /usr/share/drupal5/>
     AllowOverride All
     order allow,deny
     allow from all
    </Directory>
</VirtualHost>
Modules, Standard
Language, English
Site Information
Name: IP or anything you wish
email: root@localhost.com or anything you wish
make a username and password of your choosing, and remember it!
Line 101: Line 148:
 1.#3 Restart Apache:
Line 103: Line 149:
{{{
$ sudo /etc/init.d/apache2 restart
}}}
Upon completion you should have access to a basic site, and the admin interface for the tracker.

Once inside you should apply the proper theme, check the openid configuration and setup a site in the tracker admin. Also inside the tracker admin it's recommended you setup some sample products and testcases as sample data. To do so,

 * Click the modules tab
 * Under Other, enable Launchpad OpenID and OpenID Teams if desired (the production tracker uses openid to login)
 * Under Ubuntu QA, enable all modules
 * Uncheck the search module

To set the theme,

 * Click the appearance tab
 * Find Antonelli and click enable and set default
 * Click settings
 * Change the blue to ubuntu orange to match production theme if desired. To do so, set the Link color, header top and header bottom to #DD4814.
 * Uncheck the site name
 * Uncheck the default logo, you can steal the ubuntu logo from production if you like

To set up the tracker itself, navigate to

http://YOUR_SERVER/?q=admin/config/services/qatracker

 * Setup a site to match your domain, admin/config/services/qatracker/sites
 * Add a product family, /admin/config/services/qatracker/families
 * Add a product under that product family, /admin/config/services/qatracker/products
 * Create or copy a testcase, /admin/config/services/qatracker/testcases
 * Create a new series, /admin/config/services/qatracker/series
 * Create a new milestone for the series, /admin/config/services/qatracker/milestones
 * Assign the testcase to a testsuite, admin/config/services/qatracker/testsuites
 * Assign the testsuite to a product, /admin/config/services/qatracker/products
 * Assign the product to a build, admin/config/services/qatracker/builds

Your tracker should now resemble production and be available under http://YOUR_SERVER_IP/?q=qatracker

ISO Tracker

The ISO Tracker is the tool that the Ubuntu QA team uses to track the results of the testing during milestone testing. To know more about ISO testing, please read the ISO procedures.

Technically, it is a Drupal instance with some in-house developed modules, hosted at the ubuntu-qa-website project in Launchpad.

Use the script!

There is now a script to make this process easy. Check out https://github.com/SmajevicIrfan/qatracker-setup-script. You can still use this guide for reference as needed.

  • Note: This script will use apt-get to install packages without requiring confirmation.

Installing a development environment

The production qatracker runs on drupal7, php5.3 and trusty server.

These instructions are for drupal7 and PHP5 utilizing trusty, though a newer version should also work fine.

Getting the dependencies

We need php, postgres, apache and drupal. It's important that you install php5 and drupal7 in order to ensure the qatracker will work. In addition, we will also need bzr to checkout the modules for the tracker from launchpad.

$ sudo apt install php5-pgsql postgresql apache2 drupal7 bzr

Installation Configuration Prompts

Postfix

Note, you may be prompted to configure postfix. Feel free to configure as you wish, or leave it as no configuration.

Drupal

Drupal will ask to configure a database, choose no. We will setup the database in a moment.

Setting up apache

Now, we will make the drupal7 instance point to the Apache root folder:

$ sudo nano /etc/apache2/sites-enabled/000-default.conf 

Modify /etc/apache2/sites-enabled/000-default.conf to

<VirtualHost *:80>
        #NOWEBSTATS
        ServerName      ENTER_YOUR_SERVER_IP_HERE

        DocumentRoot    /usr/share/drupal7

        # Protect the '/scripts' directory.
        RewriteEngine on
        RewriteRule   ^/scripts(|/.*) http://%{SERVER_NAME}/ [R=301,L]
</VirtualHost>

Setting up the database

This is not needed as drupal will configure these options itself.

Populating the database

Although it is possible to load a copy of the production database, this is not recommended.

Configure Drupal7

Now, we are going to create a system user called "qatracker" and we are going to reconfigure drupal to use that user and both the user and database created before.

$ sudo adduser qatracker
$ sudo dpkg-reconfigure drupal7

When adding the user, use a password of qatracker.

Drupal7 Reconfiguration

Follow the prompts:

Reinstall database for drupal7 , select Yes
database type , select psql
Connection method for PostgreSQL database, select Unix Socket
authenticating the PostgreSQL administrator , select ident
authenticating PostgreSQL user, select ident
database name for drupal7, enter qatracker
username for drupal7, enter qatracker
password for postgres application, leave blank (it will generate random password).
 If you wish, this can be set to a password of your choosing but should not be required.
database admin user, enter postgres

Install qatracker modules

QATracker

Get the modules and theme from ubuntu-qa-website and copy them to your drupal7 installation:

$ bzr branch lp:ubuntu-qa-website
$ sudo cp -R ubuntu-qa-website/modules/* /usr/share/drupal7/modules/

Adding openid modules

Grab these 2 launchpad branches and copy them to the drupal7 modules folder. Later we will activate and configure them inside the admin interface.

$ bzr branch lp:~ubuntu-qa-website-devel/ubuntu-qa-website/drupal-launchpad-7.x drupal-launchpad
$ bzr branch lp:~ubuntu-drupal-devs/drupal-teams/7.x-dev/ drupal-teams 
$ sudo cp -R drupal-teams drupal-launchpad /usr/share/drupal7/modules

Apply the theme

The production instance uses the antonelli theme. Download and unpack it into /themes/.

$ wget http://ftp.drupal.org/files/projects/antonelli-7.x-1.0-rc1.tar.gz
$ tar xvzf antonelli-7.x-1.0-rc1.tar.gz 
$ sudo cp -R antonelli /usr/share/drupal7/themes/

Playing with your new instance

Apache

Activate the rewrite module and restart apache:

$ sudo a2enmod rewrite
$ sudo service apache2 restart

You should now have a running site.

Launch Drupal Wizard

Navigate to your new drupal site and follow the wizard.

http://localhost/install.php or http://YOUR_SITE_IP/install.php

During the wizard, make the following choices:

Modules, Standard
Language, English
Site Information
Name: IP or anything you wish
email: root@localhost.com or anything you wish
make a username and password of your choosing, and remember it!

Upon completion you should have access to a basic site, and the admin interface for the tracker.

Once inside you should apply the proper theme, check the openid configuration and setup a site in the tracker admin. Also inside the tracker admin it's recommended you setup some sample products and testcases as sample data. To do so,

  • Click the modules tab
  • Under Other, enable Launchpad OpenID and OpenID Teams if desired (the production tracker uses openid to login)
  • Under Ubuntu QA, enable all modules
  • Uncheck the search module

To set the theme,

  • Click the appearance tab
  • Find Antonelli and click enable and set default
  • Click settings
  • Change the blue to ubuntu orange to match production theme if desired. To do so, set the Link color, header top and header bottom to #DD4814.
  • Uncheck the site name
  • Uncheck the default logo, you can steal the ubuntu logo from production if you like

To set up the tracker itself, navigate to

http://YOUR_SERVER/?q=admin/config/services/qatracker

  • Setup a site to match your domain, admin/config/services/qatracker/sites
  • Add a product family, /admin/config/services/qatracker/families
  • Add a product under that product family, /admin/config/services/qatracker/products
  • Create or copy a testcase, /admin/config/services/qatracker/testcases
  • Create a new series, /admin/config/services/qatracker/series
  • Create a new milestone for the series, /admin/config/services/qatracker/milestones
  • Assign the testcase to a testsuite, admin/config/services/qatracker/testsuites
  • Assign the testsuite to a product, /admin/config/services/qatracker/products
  • Assign the product to a build, admin/config/services/qatracker/builds

Your tracker should now resemble production and be available under http://YOUR_SERVER_IP/?q=qatracker

Testing/ISO/DevEnv (last edited 2016-03-06 01:15:51 by tsimonq2)