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