Table of contents
- 1. How to log in the Gitorious application?
- 2. How to push your changes to the Gitorious application?
- 3. How to start/stop the servers?
- 4. How to create a full backup of Gitorious?
- 5. How to configure the email settings of Gitorious?
- 6. How to debug Gitorious errors?
- 7. How to create a cron job for reindexing Ultrasphinx?
- 8. How to enable SSL to access through https?
| IMPORTANT: Gitorious requires to use a domain name. If you are trying to log into the Gitorious application using an IP address, you may have problems with Google Chrome or Safari browsers. You can try using Firefox or Internet Explorer, but it is highly advisable that you use domains instead of using IP addresses. You can learn how to configure the domain at "How to log in the Gitorious application" section. |
- 1. How to log in the Gitorious application?
- 2. How to push your changes to the Gitorious application?
- 3. How to start/stop the servers?
- 4. How to create a full backup of Gitorious?
- 5. How to configure the email settings of Gitorious?
- 6. How to debug Gitorious errors?
- 7. How to create a cron job for reindexing Ultrasphinx?
- 8. How to enable SSL to access through https?
Gitorious is a flexible project management web application. Written using Ruby on Rails framework, it is cross-platform and cross-database.
Please, take a look to the Quick Start Guide to know the basic use of this Stack.
How to log in the Gitorious application?
The default credentials for the Gitorious application are:
user mail: user@example.com password: bitnami
If you are using the installer and you have configured your application to use an IP address as a domain name you probably have problems to log in the Gitorious application. You will see the following error in the log file:
Error: ActionController::InvalidAuthenticityToken
It is advisable to use a Hostname instead of and IP address. In the Virtual Machines and AMIs exist a tool for changing it automatically. Do not use "git." in your hostname, this cause problems if you want to access through http. You only have to run the following command to change it:
$ sudo /opt/bitnami/apps/gitorious/updatip --machine_hostname yourdomain.com
If you have configured Gitorious to use an static domain name, you should remove or rename the "/opt/bitnami/apps/gitorious/updateip" to disable it.
If you want, you can configure it manually. These are the configuration options that you should modify in the "/opt/bitnami/apps/gitorious/htdocs/config/gitorious.yml" file:
gitorious_client_host: YOUR_DOMAIN .. gitorious_host: YOUR_DOMAIN
If you are using the virtual machine, it is also necessary that the machine can resolve the hostname. Add a new entry in the /etc/hosts file:
127.0.0.1 YOUR_DOMAIN
Then restart Apache server:
$ installdir/ctlscript.sh restart apache
How to push your changes to the Gitorious application?
Once you have uploaded your private key to Gitorious, you can upload your repository to the application. These are the basic steps:
git config --global user.name "Your full name" git config --global user.email "user@example.com"
git checkout master git remote add origin git@YOUR_HOSTNAME:test/test.git git push origin master
Virtual Machines have SSH server disabled by default. That it is necessary to sync your changes with Gitorious. You can see how to enable it at /Virtual_Appliances_Quick_Start_Guide#How_to_enable_sshd.3f
How to start/stop the servers?
You can use the "ctlscript.sh" utility from the command line. This script is in the installation directory.
$ cd installdir $ ./ctlscript.sh start
This command start alls the required servers: Apache, MySQL, Active MQ and the Gitorious specific servers.
Gitorious requires several daemons to work properly. You can manage them from the same ctlscript.sh tool.
$ ./ctlscript.sh start gitorious
This command start three processes: Gitorious poller, Git daemon and Ultrasphinx. You can find the log files at /opt/bitnami/apps/gitorious/htdocs/log folder. You can also check the status running the following command:
$ ./ctlscript.sh status gitorious
You can start the servers independently using scripts in the "/opt/bitnami/apps/gitorious/scripts" folder: git-ultrasphinx.sh, git-daemon.sh and git-poller.sh.
How to create a full backup of Gitorious?
Because BitNami stacks are self-contained, the simplest option for performing your backups is to copy or compress the BitNami Stack installation directory. To do so in a safe manner, you will need to stop all servers, so this method may not be appropriate if you have people accessing the application continously.
On Linux and OS X:
$ cd installdir $ ./ctlscript.sh stop $ cp -r installdir application-backup
Or you can create a tarball:
$ tar -czvf application-backup.tar.gz installdir
Or a zip file:
$ zip -r application-backup.zip installdir/*
To restore this backup you only need to uncompress the backup in the same location. It is important to use the same path that was used when the stack was originally installed.
For example if you have a backup in a Red Hat machine, you can copy it to an Ubuntu Linux machine (a different distro!) in the same location. Then start the servers and that’s all.
$ cd installdir $ ./ctlscript.sh start
You just need to be carefull to keep the same permissions for the files and folders. If you installed as root make sure that in the new machine you copy the files also as root. And this case, if you are also moving MySQL or PostgreSQL, you will need to create those users in the new machine (if they don't exist yet).
On Windows:
On Windows, you should follow the same process. Stop the servers using the shortcuts and copy the whole installation directory. To restore the system, copy the directory to a different Windows machine in the same location and follow these steps from a command prompt:
$ cd installdir $ serviceinstall.bat INSTALL
You can access your BitNami Application at the usual URL.
If you want to create only a database backup, check the following link for MySQL /Components/MySQL#How_to_create_a_database_backup or for PostgreSQL
/Components/PostgreSQL#How_to_create_a_database_backup.3fHow to configure the email settings of Gitorious?
You can configure the SMTP settings during the installation process. If you are using the Virtual Machine or AMI, you can configure it manually. For example, these are the options to configure it using a GMail account:
/opt/bitnami/apps/gitorious/htdocs/config/environments/production.rb
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "gmail.com",
:authentication => :plain,
:user_name => "your_account@gmail.com",
:password => "your_password",
:tls => true,
:enable_starttls_auto => true
}
Then restart Apache server:
$ sudo /opt/bitnami/ctlscript.sh restart apache
How to debug Gitorious errors?
The Gitorious server logs are saved in /opt/bitnami/apps/gitorious/htdocs/logs folder. The main log file is production.log.
Once Apache starts, it will create two log files, the access_log and the error_log /installdir/apache2/logs directory. You can change these files to see the exact error in the application.
The main MySQL log file is created at /installdir/mysql/data/mysqld.log file.
How to create a cron job for reindexing Ultrasphinx?
Ultrasphinx is the Gitorious searching engine by default. It requires to run the reindex task to load the new changes. The following example shows a cron task that runs every 30 minutes:
$ sudo crontab -e */30 * * * * su - git -c 'cd /opt/bitnami/apps/gitorious/htdocs && rake ultrasphinx:index RAILS_ENV=production'
How to enable SSL to access through https?
You have to configure Apache to enable SSL connections. To do so, follow the steps indicated at How to enable SSL to access through https?
Notice that the DocumentRoot specified in the httpd-ssl.conf shoud be: <installdir>/apps/gitorious/htdocs/public.
You also have to modify the gitorious.yml file, placed at <installdir>/apps/gitorious/htdocs/config/ and change:
use_ssl: true
Afterwards, Apache server must be restarted.

Comments