Install git, postgresql, perl, cpan, DBD::Pg, cpanminus and sqitch. Don't forget that you have to be root to do that. For installaton process on OS different from CentOS see sqitch download page.
yum install git perl-devel perl-CPAN postgresql perl-DBD-Pg
curl -L https://cpanmin.us | perl - --sudo App::cpanminus
cpanm --quiet --notest App::Sqitch
If there is problem installing cpan modules, check if gcc is installed.
gcc -v
yum install gcc
Login as postgres admin.
su - postgres
psql
Create new database user with the same name as your Aller Retour OS user.
CREATE USER aller_retour WITH PASSWORD "Your password goes here";
Create database.
-- If you have different databases do it for each of them
CREATE DATABASE aller_retour;
REVOKE ALL ON DATABASE aller_retour FROM public;
ALTER DATABASE aller_retour OWNER TO aller_retour;
Now you can login with peer authentication as aller_retour user with ar_* databases.
Login with aller_retour user in your command line and download git repo.
su - aller_retour
mkdir dev
cd dev
git clone git@bitbucket.org:allerretour/db-plan.git
Add your name and email to sqitch user level config.
sqitch config --user user.name 'Firstname Lastname'
sqitch config --user user.email 'example@gmail.com'
Copy example configuration file to sqitch.conf and make necessary changes.
cd db-plan
cp sqitch.example.conf sqitch.conf
vi sqitch.conf
Check if everything works.
sqitch status
You should see something like that:
# On database aller_retour
No changes deployed
Hooray! You can now start working!
For different login methods see sqitch auth manual or just change uri parameter in target section of config.
- git
- sqitch
- postgresql