DevEnv

Differences between revisions 12 and 13
Revision 12 as of 2010-12-09 11:20:12
Size: 5046
Editor: host240-240-dynamic
Comment:
Revision 13 as of 2014-10-10 16:42:15
Size: 4379
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 10: Line 17:

These instructions are for drupal5 and PHP5.2.

{{attachment:IconsPage/warning.png}}
'''Note'''

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

To force apt to install php5.2 instead of php5.3 you need to to create a file called "php" in /etc/apt/preferences.d/ with this contents:
{{{
Package: libapache2-mod-php5
Pin: version 5.2.10*
Pin-Priority: 991

Package: libapache2-mod-php5filter
Pin: version 5.2.10*
Pin-Priority: 991

Package: php-pear
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-cgi
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-cli
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-common
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-curl
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-dbg
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-dev
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-gd
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-gmp
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-ldap
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-mhash
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-mysql
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-odbc
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-pgsql
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-pspell
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-recode
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-snmp
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-sqlite
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-sybase
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-tidy
Pin: version 5.2.10*

Package: php5-xmlrpc
Pin: version 5.2.10*
Pin-Priority: 991

Package: php5-xsl
Pin: version 5.2.10*
Pin-Priority: 991

}}}


----
Line 133: Line 24:
Now install drupal5 with the default options: Now install drupal7 with the default options:
Line 136: Line 27:
$ sudo apt-get install drupal5 $ sudo apt-get install drupal7
Line 138: Line 29:

Finally, install apache2.

{{{
$ sudo apt-get install apache2
}}}


=== Setting up apache ===
{{attachment:IconsPage/warning.png}}
NOTE: I don't believe this is needed.

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

 1. Delete the symlink at /etc/apache2/conf.d/drupal.conf
 2. Modify /etc/apache2/site-enabled/000-default with.

{{{
<VirtualHost *:80>
 ServerAdmin webmaster@localhost

 DocumentRoot /usr/share/drupal7
 <Directory />
  Options FollowSymLinks
  AllowOverride None
 </Directory>
    <Directory /usr/share/drupal7/>
     AllowOverride All
     order allow,deny
     allow from all
    </Directory>
</VirtualHost>
}}}

 1.#3 Restart Apache:

{{{
$ sudo /etc/init.d/apache2 restart
}}}

== Setting up the database ==
{{attachment:IconsPage/warning.png}}
NOTE: These database instructions need cleanup. The setup should be / is easier than detailed.
Line 144: Line 79:
postgres$ dropdb drupal5
postgres$ dropuser drupal5
postgres$ dropdb drupal7
postgres$ dropuser drupal7
Line 162: Line 97:
$ sudo dpkg-reconfigure drupal5 $ sudo dpkg-reconfigure drupal7
Line 165: Line 100:
In the drupal5 reconfiguration, when asked by the username, type "qatracker" (password "qatracker") and database name also "qatracker" In the drupal7 reconfiguration, when asked by the username, type "qatracker" (password "qatracker") and database name also "qatracker"
Line 167: Line 102:
Get the modules and theme from ubuntu-qa-website and copy them to your drupal5 installation: === Populating the database ===
Although it is possible to load a copy of the production database, this is not recommended.

== Install qatracker modules ==

=== QATracker ===
Get the modules and theme from ubuntu-qa-website and copy them to your drupal7 installation:
{{attachment:IconsPage/warning.png}}
This might not be exact.
Line 171: Line 114:
$ 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/modules/htaccess /usr/share/drupal5/.htaccess
$ sudo cp -R ubuntu-qa-website/code/modules/* /usr/share/drupal7/modules
$ sudo cp -R ubuntu-qa-website/artwork/* /usr/share/drupal7/themes
$ sudo cp ubuntu-qa-website/code/modules/htaccess /usr/share/drupal7/.htaccess
Line 176: Line 119:
Now we need to populate the database. === 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.
Line 178: Line 122:
{{{
$ 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.txt
qatracker$ exit
}}}
bzr branch lp:~ubuntu-qa-website-devel/ubuntu-qa-website/drupal-launchpad-7.x drupal-launchpad
Line 187: Line 124:
This command will populate the database with the needed tables and an admin user (admin/admin). bzr branch lp:~ubuntu-drupal-devs/drupal-teams/7.x-dev/ drupal-teams
Line 189: Line 126:
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/.
Line 191: Line 129:
{{{
$ sudo a2enmod rewrite
}}}
http://ftp.drupal.org/files/projects/antonelli-7.x-1.0-rc1.tar.gz
Line 195: Line 131:
Now, we will make the drupal5 instance point to the Apache root folder: == Playing with your new instance ==
You should now have a running site..
Line 197: Line 134:
 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. Upon completetion you should have access to a basic site, and the admin interface for the tracker.
Line 200: Line 137:
{{{
<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>
}}}

 1.#3 Restart Apache:

{{{
$ sudo /etc/init.d/apache2 restart
}}}
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

First, install PHP5 and postgresql (and all the dependencies):

$ sudo apt-get install php5-pgsql postgresql

Now install drupal7 with the default options:

$ sudo apt-get install drupal7

Finally, install apache2.

$ sudo apt-get install apache2

Setting up apache

IconsPage/warning.png NOTE: I don't believe this is needed.

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

  1. Delete the symlink at /etc/apache2/conf.d/drupal.conf
  2. Modify /etc/apache2/site-enabled/000-default with.

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /usr/share/drupal7
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
    <Directory /usr/share/drupal7/>
            AllowOverride All
            order allow,deny
            allow from all
    </Directory>
</VirtualHost>
  1. Restart Apache:

$ sudo /etc/init.d/apache2 restart

Setting up the database

IconsPage/warning.png NOTE: These database instructions need cleanup. The setup should be / is easier than detailed.

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$ dropdb drupal7
postgres$ dropuser drupal7

postgres$ createuser qatracker
postgres$ createdb qatracker

postgres$ psql template1

template1=# alter user qatracker with password 'qatracker';
template1=# \q

postgres$ exit

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

In the drupal7 reconfiguration, when asked by the username, type "qatracker" (password "qatracker") and database name also "qatracker"

Populating the database

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

Install qatracker modules

QATracker

Get the modules and theme from ubuntu-qa-website and copy them to your drupal7 installation: IconsPage/warning.png This might not be exact.

$ bzr branch lp:ubuntu-qa-website
$ sudo cp -R ubuntu-qa-website/code/modules/* /usr/share/drupal7/modules
$ sudo cp -R ubuntu-qa-website/artwork/* /usr/share/drupal7/themes
$ sudo cp ubuntu-qa-website/code/modules/htaccess /usr/share/drupal7/.htaccess

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

Apply the theme

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

http://ftp.drupal.org/files/projects/antonelli-7.x-1.0-rc1.tar.gz

Playing with your new instance

You should now have a running site..

Launch Drupal Wizard

Navigate to your new drupal site and follow the wizard. Upon completetion 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)