m (→Install dependencies: Changed the link from QA Reports to QA Dashboard) |
m |
||
| Line 68: | Line 68: | ||
# Add your public key to <tt>authorized_keys</tt> file of your production environment user: <br> <tt>$ ssh your.production.user@your.production.host 'mkdir .ssh; echo '`cat ~/.ssh/id_rsa.pub`' >> ~/.ssh/authorized_keys'</tt> | # Add your public key to <tt>authorized_keys</tt> file of your production environment user: <br> <tt>$ ssh your.production.user@your.production.host 'mkdir .ssh; echo '`cat ~/.ssh/id_rsa.pub`' >> ~/.ssh/authorized_keys'</tt> | ||
# Try logging in: <tt>ssh your.production.user@your.production.host</tt> | # Try logging in: <tt>ssh your.production.user@your.production.host</tt> | ||
| + | |||
| + | == Modify settings == | ||
| + | |||
| + | QA Dashboard authentication settings are defined in <tt>settings.json</tt> that is deployed with Capistrano. | ||
| + | |||
| + | === LDAP Authentication === | ||
| + | |||
| + | TODO | ||
| + | |||
| + | === MySQL Authentication === | ||
| + | |||
| + | TODO | ||
== Modify Capistrano scripts and setup deployment == | == Modify Capistrano scripts and setup deployment == | ||
| Line 91: | Line 103: | ||
$ cap production deploy | $ cap production deploy | ||
</code> | </code> | ||
| + | |||
| + | == Setting up the data flow == | ||
| + | |||
| + | QA Dashboard naturally needs data to be shown. This data usually comes from [[Quality/QA-tools/QAReports|QA Reports]] and Bugzilla. | ||
| + | |||
| + | === Getting data from QA Reports === | ||
| + | Instructions for setting up the data synchronization is described in [[Quality/QA-tools/QAReports/Setting_up_the_production_environment#Configuring_data_flow_to_QA_Dashboard|QA Reports installation guide]]. | ||
| + | |||
| + | === Getting data from Bugzilla === | ||
| + | |||
| + | TODO: Document Bugzilla exporter setup and usage | ||
Contents
|
Running and deploying QA Dashboard relies heavily on automated deployment scripts and version control repository. At high level, deployment process is following:
QA Dashboard uses Capistrano to automate the deployments. The main benefit is to eliminate the risks of human errors and to enable easy and repeatable rollbacks. See Capistrano documentation for the details
You should first set up the development environment on your workstation before continuing. Capistrano is run from your development environment
Capistrano requires Ruby. If you do not have Ruby installed please follow the "Install Ruby" instructions here.
$ gem install capistrano
The same dependencies are needed in the production server as in development environment. Follow the instructions in Quality/QA-tools/QADashboard/Setting_up_the_development_environment to:
(example using nginx)
Write a following virtual host declaration to /etc/nginx/sites-available/qa-dashboard
server {
listen 80;
server_name qa-dashboard.qa.leonidasoy.fi;
location / {
proxy_pass http://localhost:3030;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
}
Restart nginx
sudo service nginx restart
Set up public key authentication:
QA Dashboard authentication settings are defined in settings.json that is deployed with Capistrano.
TODO
TODO
QA Dashboard uses following scripts to configure Capistrano
You might want to review all the files, but usually it's enough to update only config/deploy/production.rb according to your needs (servers, deployment account, ssh options). You can also create new deployment environment just by copying the production.rb, to e.g. internal.rb and modify it.
When you deploy for first time you need to run setup command, which creates creates the folder hierarchy and the symbolic links required by Capistrano.
Once the Capistrano is updated according to your needs you need to run setup command, which creates creates the folder hierarchy and the symbolic links required by Capistrano. After that the server can be started.
$ cap production deploy:setup # or cap internal deploy:setup, if you created a new deployment environment $ cap production deploy:start # starts the server
Once the setup is complete, the deployment is as easy as it gets
$ cap production deploy
QA Dashboard naturally needs data to be shown. This data usually comes from QA Reports and Bugzilla.
Instructions for setting up the data synchronization is described in QA Reports installation guide.
TODO: Document Bugzilla exporter setup and usage