diff options
author | Sytse Sijbrandij <sytse@dosire.com> | 2013-06-23 20:21:15 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-24 08:47:14 +0300 |
commit | fe50ada264b6c6ab9a6ae103da2f805b06bc1dcb (patch) | |
tree | 4bca0118074cbd0426ca5634f107d533d708fb6a | |
parent | 787e0bdd56f11070159fc5a9c4131ad7b09d2090 (diff) | |
download | gitlab-ci-fe50ada264b6c6ab9a6ae103da2f805b06bc1dcb.tar.gz |
Adding PostgreSQL to the docs.
-rw-r--r-- | README.md | 16 | ||||
-rw-r--r-- | doc/installation.md | 36 |
2 files changed, 42 insertions, 10 deletions
@@ -9,17 +9,21 @@ ### Requirements -**The project is designed for the Linux operating system.** +GitLab CI is designed for the Linux operating system. -We officially support (recent versions of) these Linux distributions: +GitLab CI officially supports (recent versions of) these Linux distributions: -- Ubuntu Linux -- Debian/GNU Linux +* Ubuntu Linux +* Debian/GNU Linux -__We recommend to use server with at least 756MB RAM for gitlab-ci instance.__ +Additionally GitLab CI requires: +* ruby 1.9.3 +* MySQL or PostgreSQL -__master branch contains unstable 3.0. Use 2-2-stable branch__ +__We recommend to use a server with at least 756MB RAM for a gitlab-ci instance.__ + +__The master branch contains the unstable 3.0. Please use the 2-2-stable branch__ ### How it works diff --git a/doc/installation.md b/doc/installation.md index 0409105..9d6f423 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -23,8 +23,13 @@ Create a user for GitLab: echo "source /home/gitlab_ci/.rvm/scripts/rvm" >> ~/.bashrc -## 3. Prepare MySQL +## 3. Prepare the database +You can use either MySQL or PostgreSQL. + +## MySQL + + # Install the database packages sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev # Login to MySQL @@ -39,6 +44,27 @@ Create a user for GitLab: # Grant proper permissions to the MySQL User mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlab_ci_production`.* TO 'gitlab_ci'@'localhost'; +## PostgreSQL + + # Install the database packages + sudo apt-get install -y postgresql-9.1 libpq-dev + + # Login to PostgreSQL + sudo -u postgres psql -d template1 + + # Create a user for GitLab. (change $password to a real password) + template1=# CREATE USER gitlab_ci WITH PASSWORD '$password'; + + # Create the GitLab production database & grant all privileges on database + template1=# CREATE DATABASE gitlab_ci_production OWNER gitlab_ci; + + # Quit the database session + template1=# \q + + # Try connecting to the new database with the new user + sudo -u git -H psql -d gitlab_ci_production + + ## 4. Get code cd /home/gitlab_ci/ @@ -66,11 +92,13 @@ Create a user for GitLab: gem install bundler bundle --without development test - # Copy mysql db config - # - # make sure to update username/password in config/database.yml + # Copy database configuration + # choose one of the two example files based what database you prepared earlier + # after copying make sure to update username/password in config/database.yml # cp config/database.yml.mysql config/database.yml +or + cp config/database.yml.postgresql config/database.yml # Copy application config # |