How to Configure Tuleap Setup with Git Step by Step.

Setting up Tuleap Application with Git in CentOS 7

Tuleap is the first 100% Open Source tool application for lifecycle management system (Agile Project Management and DevOps).

Today We will setting up the Tuleap with Git. Tuleap provide good UI interface to handle a multiple repositories for multiple projects as well as “Personal repositories” for each developer.

Configure the Tuleap Setup:

1) Download RPM dependencies Packages.

We required EPEL and Remi-safe repository(For PHP dependencies).

# yum install -y epel-release centos-release-scl && yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm

2) Configure Tuleap repositories.

Create file /etc/yum.repos.d/Tuleap.repo and add below content.

cat /etc/yum.repos.d/Tuleap.repo

[Tuleap]
name=Tuleap
baseurl=https://ci.tuleap.net/yum/tuleap/rhel/7/dev/$basearch
enabled=1
gpgcheck=1
gpgkey=https://ci.tuleap.net/yum/tuleap/gpg.key

3) Install Tuleap and install other plugins.

We can install more plugins. You can use Tuleap as agile project management which deliver a project throughout its life cycle and also use as version-control system for tracking changes in source code during software development.

yum install -y rh-mysql57-mysql-server tuleap tuleap-plugin-agiledashboard tuleap-plugin-graphontrackers tuleap-theme-burningparrot tuleap-theme-flamingparrot tuleap-plugin-git tuleap-plugin-pullrequest tuleap-plugin-hudson-git tuleap-plugin-hudson tuleap-plugin-tracker tuleap-plugin-cardwall tuleap-plugin-docman tuleap-plugin-mediawiki

Troubleshooting Step: While installing Tuleap gitolite3 plugins, it will show the error as shown below;

Installing : 1:gitolite3-3.6.11-1.el7.noarch 
useradd: cannot create directory /var/lib/gitolite
chmod: cannot access ‘/var/lib/gitolite’: No such file or directory
error: %pre(tuleap-plugin-git-11.17.99.20-1.el7.noarch) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package tuleap-plugin-git-11.17.99.20-1.el7.noarch
Installing : htmldoc-1.8.28-6.el7.x86_64 
error: tuleap-plugin-git-11.17.99.20-1.el7.noarch: install failed

In this case you have to create the directory for gitolite and set the permission of directory.

#mkdir -p /var/lib/gitolite
#chown -R gitolite:gitolite /var/lib/gitolite
#yum install -y tuleap-plugin-git

4) Configure the mysql database.

Add contains sql-mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION in /etc/opt/rh/rh-mysql57/my.cnf.d/rh-mysql57-mysql-server.cnf file after mysqld.

#sed -i '20 a sql-mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' /etc/opt/rh/rh-mysql57/my.cnf.d/rh-mysql57-mysql-server.cnf

Start and enable database service on boot.

#systemctl start rh-mysql57-mysqld && systemctl enable rh-mysql57-mysqld

Check the status of database.

#systemctl status rh-mysql57-mysqld
● rh-mysql57-mysqld.service - MySQL 5.7 database server
   Loaded: loaded (/usr/lib/systemd/system/rh-mysql57-mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2020-07-27 08:29:34 UTC; 6s ago
 Main PID: 2972 (mysqld)
   CGroup: /system.slice/rh-mysql57-mysqld.service
           └─2972 /opt/rh/rh-mysql57/root/usr/libexec/mysqld --daemonize --basedir=/opt/rh/rh-mysql57/root/usr --pid-file=/var/run/rh-mysql57-mysqld/mysqld.pid

Jul 27 08:29:26 tuleap systemd[1]: Starting MySQL 5.7 database server...
Jul 27 08:29:26 tuleap scl[2896]: Initializing MySQL database
Jul 27 08:29:34 tuleap systemd[1]: Started MySQL 5.7 database server.

Set Database Root Password.

#scl enable rh-mysql57 bash
#mysqladmin -u root password

5) Setup tuleap Server with setup.el7.sh

Run this “setup.el7.sh” scirpt using sudo or root user and remember this script executed once.

/usr/share/tuleap/tools/setup.el7.sh \
--configure \
--server-name=alm.ittroubleshooter.in \
--mysql-server=localhost \
--mysql-password=<Mysql Password>

Note: Replace server-name, localhost and mysql-password with a DNS entry, Database IP address and root password of the db as we configured earlier respectively.
Note2: You must disable SELinux or use setenforce 0 to enter permissive mode while installing (add “SELINUX=permissive” in /etc/selinux/config file) and reboot server once.

Final Output:

 * Plugin Git is configured
info Configure Tuleap for PHP 7.3 / FPM and Nginx
info [nginx] Start configuration
info [nginx] Deploy configuration chunks in /etc/nginx
info [nginx] Deploy configuration chunks in /etc/nginx/conf.d/tuleap.d
info [nginx] Deploy configuration chunks in /etc/nginx/conf.d/tuleap-plugins
info [nginx] Configuration done!
info Configuration completed
Reloading nginx...
OK
Restarting tuleap.service...
OK

6) Setting up SSL certificate.

By default tuleap enable the self sign ssl certificate. We are used the Let’s Encrypt to obtain an SSL certificate. To enable the SSL install certbot-nginx package and execute below command.

#yum install certbot-nginx -y

Obtaining the Certificate

#certbot --nginx -d alm.ittroubleshooter.in
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Enter email address (used for urgent renewal and security notices)
(Enter 'c' to cancel): XXXXXXXX@gmail.com
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for alm.ittroubleshooter.in
Waiting for verification...
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/nginx/conf.d/tuleap.conf
Redirecting all traffic on port 80 to ssl in /etc/nginx/conf.d/tuleap.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://alm.ittroubleshooter.in
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Subscribe to the EFF mailing list (email: itcaretraining@gmail.com).
Starting new HTTPS connection (1): supporters.eff.org

IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/alm.ittroubleshooter.in/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/alm.ittroubleshooter.in/privkey.pem
Your cert will expire on 2020-10-25. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot renew"
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
- If you like Certbot, please consider supporting our work by:

Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le

Now go to web interface and enter your domain name which we used earlier.

Note: Default site admin and database user credentials can be found in /root/.tuleap_passwd.

7) Enable Git Plugins.

Login on Tuleap with site administrator account. Go to “ADMINISTRATION” —> “Manager All Plugins”—> and click on “AVAILABLE PLUGINS.”

Now you can install and enable the Plugins which you want to use. We installed git plugins along with CI plugins.

8) Create Project and configure git repositories.

To create a new project, click on “Projects” then “New Project” in the menu bar at the top. Click on Empty and click on the “Next” button.

Now on Next page fill in the required fields as below;

Once you click on “Start My Project”. The project will created and your project creation is sent to the global administrators for validation.

Once your project has been approved by the global admin , you can enter your project (“Project” —>“Software-Development”) and start configuring it.

In the menu on the left, select “Admin” —> “services” —> “Enable the git services” (Use Edit option to enable any service)

9) Create Git Repository.

In the menu on the left select “Git” —> “Add Project Repository” —> “add Name for repo name” —> “Click on Add Project Repository”

Once its done Now it’s your turn to play!!!

Open your Git Bash(or terminal) on your local machine. Go to the working directory where your code (or files) are located. Execute below commands from your local machine.

#git init
#git add .
#git commit -m "Add File on new repo"
#git remote add origin https://alm.ittroubleshooter.in/plugins/git/software-development/learns-app-cicd.git
#git push -u origin master

Note: The repo url is copied from the given repository account.

Hope this post will help Devops beginners. Please share you feedback and Comments. Stay tune for more updates with ittroubleshooter.in …!!!

Leave a Reply

avatar

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
Notify of