DevEnv

Differences between revisions 1 and 22 (spanning 21 versions)
Revision 1 as of 2010-06-08 10:16:18
Size: 1240
Editor: 84
Comment:
Revision 22 as of 2014-10-10 18:55:49
Size: 5133
Editor: adsl-74-179-121-239
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
{{attachment:IconsPage/warning.png}}
As of October 2014, this is a WIP to update this to the current best practices for getting a development environment.
Line 8: Line 11:
The production qatracker runs on durpal7, php5.3 and lucid server.

These instructions are for drupal7 and PHP5 utilizing trusty, though lucid should also work fine.
Line 11: Line 18:
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.

First, install PHP5 and postgresql (and all 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.
Line 16: Line 21:
$ sudo apt-get install php5-pgsql postgresql $ sudo apt-get install php5-pgsql postgresql apache2 drupal7 bzr
Line 19: Line 24:
Now install drupal5 with the default options: === 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 22: Line 37:
$ sudo apt-get install drupal5 $ sudo nano /etc/apache2/sites-enabled/000-default.conf
Line 25: Line 40:
After installing drupal, we are going to drop the default database: 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 ==
{{attachment:IconsPage/warning.png}}
NOTE: This does not appear to be needed as drupal configures this by itself.


After installing drupal we are going to drop the default database, create a new postgres user called "qatracker" and a new database called "qatracker" as well:
Line 29: Line 64:

postgres$ dropdb drupal5
postgres$ dropuser drupal5
postgres$ dropuser drupal7
postgres$ dropdb drupal7
postgres$ createuser qatracker
postgres$ createdb qatracker
postgres$ psql
postgres=# alter user qatracker with password 'qatracker';
postgres=# \q
Line 35: Line 74:
Now, we are going to create a user called "qatracker" and we are going to reconfigure drupal to use that user: === 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.
Line 39: Line 83:
$ sudo dpkg-reconfigure drupal5 $ sudo dpkg-reconfigure drupal7
Line 42: Line 86:
In the drupal5 reconfiguration, when asked by the username, type When adding the user, use a password of '''qatracker'''.

==== Drupal7 Reconfiguration ====
Follow the prompts:
{{{
Reconfigure, select yes
database, select psql
connection method unix, select socket
authentication method, select ident
postgres authentication method, select ident
database admin user, enter postgres
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 name for drupal7, enter qatracker
}}}

== 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 durpal7 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 reqrite 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

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.

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.

IconsPage/warning.png As of October 2014, this is a WIP to update this to the current best practices for getting a development environment.

Installing a development environment

The production qatracker runs on durpal7, php5.3 and lucid server.

These instructions are for drupal7 and PHP5 utilizing trusty, though lucid 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-get 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

IconsPage/warning.png NOTE: This does not appear to be needed as drupal configures this by itself.

After installing drupal we are going to drop the default database, create a new postgres user called "qatracker" and a new database called "qatracker" as well:

$ sudo -u postgres -i
postgres$ dropuser drupal7
postgres$ dropdb drupal7
postgres$ createuser qatracker
postgres$ createdb qatracker
postgres$ psql
postgres=# alter user qatracker with password 'qatracker';
postgres=# \q
postgres$ exit

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:

Reconfigure, select yes
database, select psql
connection method unix, select socket
authentication method, select ident
postgres authentication method, select ident
database admin user, enter postgres
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 name for drupal7, enter qatracker

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 durpal7 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 reqrite 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

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.

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