<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.fsci.in/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mdb571</id>
	<title>FSCI Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.fsci.in/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mdb571"/>
	<link rel="alternate" type="text/html" href="https://wiki.fsci.in/Special:Contributions/Mdb571"/>
	<updated>2026-05-31T22:27:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.fsci.in/index.php?title=GitLab&amp;diff=11038</id>
		<title>GitLab</title>
		<link rel="alternate" type="text/html" href="https://wiki.fsci.in/index.php?title=GitLab&amp;diff=11038"/>
		<updated>2022-11-24T03:43:54Z</updated>

		<summary type="html">&lt;p&gt;Mdb571: /* Hosting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Our public GitLab instance is https://git.fosscommunity.in&lt;br /&gt;
&lt;br /&gt;
==Hosting==&lt;br /&gt;
&lt;br /&gt;
Sponsored by [https://www.infomaniak.com/en/about Infomaniak]. Hosted in Switzerland with infomaniak.com.&lt;br /&gt;
&lt;br /&gt;
Previously sponsored by [http://about.gitlab.com GitLab Inc] (2016-2022)&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
Running on debian gnu/linux 10 buster with postgresql 11. Using gitlab package from http://fasttrack.debian.net&lt;br /&gt;
&lt;br /&gt;
Check https://wiki.debian.org/gitlab for installation/update instructions.&lt;br /&gt;
&lt;br /&gt;
Debian package specific documentation -&amp;gt; https://salsa.debian.org/ruby-team/gitlab/raw/buster-fasttrack/debian/README.Debian&lt;br /&gt;
&lt;br /&gt;
Letsencrypt domains:&lt;br /&gt;
&lt;br /&gt;
  letsencrypt --expand --webroot --webroot-path /usr/share/gitlab/public -d git.fosscommunity.in -d gitlab.debian.net -d wiki.fsci.org.in -d git.fsci.org.in  certonly&lt;br /&gt;
&lt;br /&gt;
== Mail Server Setup ==&lt;br /&gt;
&lt;br /&gt;
* postfix is used&lt;br /&gt;
* SPF record is added (only a and aaaa allowed to send mails)&lt;br /&gt;
* Reverse DNS is updated in gandi.net server ip section&lt;br /&gt;
* Using letsencrypt certificates for tls in main.cf&lt;br /&gt;
* Using &#039;inet_interfaces = 127.0.0.1&#039; in main.cf&lt;br /&gt;
* Configured DKIM following https://www.linode.com/docs/email/postfix/configure-spf-and-dkim-in-postfix-on-debian-8/&lt;br /&gt;
* DMARC is set to reject&lt;br /&gt;
&lt;br /&gt;
==Maintenance==&lt;br /&gt;
&lt;br /&gt;
Maintenance discussion at [https://www.loomio.org/g/Qu3O8mSf/fosscommunity-in-git-fosscommunity-in-maintainers this loomio subgroup] and [https://matrix.to/#/#git.fosscommunity.in:matrix.org this matrix chat room]. Can also use the [https://git.fosscommunity.in/community/management/-/issues git tracker] for development issues.&lt;br /&gt;
&lt;br /&gt;
* [https://git.fosscommunity.in/community/gitlab/ team repo with access details] (private)&lt;br /&gt;
&lt;br /&gt;
If expecting service disruptions, downtime, or user-facing errors, consider adding an update to [[Status]]&lt;br /&gt;
&lt;br /&gt;
==Gitlab QA - running tests==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Create a user account for QA&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
$ sudo gem install gitlab-qa&lt;br /&gt;
&lt;br /&gt;
$ GITLAB_USERNAME=&amp;lt;username&amp;gt; GITLAB_PASSWORD=&amp;lt;password&amp;gt; gitlab-qa Test::Instance::Any gitlab/gitlab-ce-qa:&amp;lt;gitlab version&amp;gt; https://git.hacksk.xyz&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Backup==&lt;br /&gt;
&lt;br /&gt;
Backup server is provided by Manu (KVM virtual machine with 100 GB storage and 1 GB ram). Running on debian gnu/linux 10 buster. &lt;br /&gt;
&lt;br /&gt;
Documentation: https://linuxhint.com/setup_postgresql_replication/ and https://www.percona.com/blog/2018/09/07/setting-up-streaming-replication-postgresql/&lt;br /&gt;
&lt;br /&gt;
===Slave configuration: Step 1===&lt;br /&gt;
Install postgresql and rsync&lt;br /&gt;
&lt;br /&gt;
 # apt-get install postgresql-contrib-11 rsync&lt;br /&gt;
&lt;br /&gt;
Check postgresql server is running&lt;br /&gt;
&lt;br /&gt;
 # su postgres -c psql&lt;br /&gt;
&lt;br /&gt;
Make sure en_US.UTF-8 locale is available&lt;br /&gt;
&lt;br /&gt;
 # dpkg-reconfigure locales&lt;br /&gt;
&lt;br /&gt;
Create ssh key for postgres user&lt;br /&gt;
&lt;br /&gt;
 # su - postgres&lt;br /&gt;
 $ ssh-keygen -t ed25519&lt;br /&gt;
&lt;br /&gt;
Now copy /var/lib/postgresql/.ssh/id_ed25519.pub to master postgres users&#039; /var/lib/postgresql/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
Stop postgresql before changing any configuration&lt;br /&gt;
 # systemctl stop postgresql@11-main&lt;br /&gt;
&lt;br /&gt;
as postgres user&lt;br /&gt;
 $ su - postgres&lt;br /&gt;
 $ cd /etc/postgresql/11/main&lt;br /&gt;
&lt;br /&gt;
Open the postgres configuration file&lt;br /&gt;
&lt;br /&gt;
 $ nano postgresql.conf&lt;br /&gt;
&lt;br /&gt;
Set the following configuration options in the postgresql.conf file&lt;br /&gt;
&lt;br /&gt;
 listen_addresses = &#039;localhost,192.168.0.115&#039;&lt;br /&gt;
 port=5432&lt;br /&gt;
 wal_level = replica&lt;br /&gt;
 max_wal_senders = 1&lt;br /&gt;
 archive_mode = on&lt;br /&gt;
 archive_command = &#039;cd .&#039;&lt;br /&gt;
 hot_standby = on&lt;br /&gt;
&lt;br /&gt;
===Master configuration===&lt;br /&gt;
&lt;br /&gt;
Create and copy ssh public key to slave like above.&lt;br /&gt;
&lt;br /&gt;
 # su - postgres&lt;br /&gt;
 $ ssh-keygen&lt;br /&gt;
&lt;br /&gt;
Now copy /var/lib/postgresql/.ssh/id_rsa.pub to slave postgres users&#039; /var/lib/postgresql/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
Create postgresql user for replication.&lt;br /&gt;
&lt;br /&gt;
 $ psql -c &amp;quot;CREATE USER rep REPLICATION LOGIN CONNECTION LIMIT 1 ENCRYPTED PASSWORD &#039;yourpassword&#039;;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Allow slave to connect to master using the user just created.&lt;br /&gt;
&lt;br /&gt;
 $ cd /etc/postgresql/11/main&lt;br /&gt;
&lt;br /&gt;
 $ nano pg_hba.conf&lt;br /&gt;
&lt;br /&gt;
Add below line to allow rep user to get access to the server&lt;br /&gt;
&lt;br /&gt;
 host    replication     rep     62.210.83.200/32   md5&lt;br /&gt;
&lt;br /&gt;
Next , open the postgres configuration file&lt;br /&gt;
&lt;br /&gt;
 nano postgresql.conf&lt;br /&gt;
&lt;br /&gt;
Set the following configuration options in the postgresql.conf file&lt;br /&gt;
&lt;br /&gt;
 listen_addresses = &#039;localhost,213.167.243.152&#039;&lt;br /&gt;
 port=5432&lt;br /&gt;
 wal_level = replica&lt;br /&gt;
 max_wal_senders = 1&lt;br /&gt;
 archive_mode = on&lt;br /&gt;
 archive_command = &#039;cd .&#039;&lt;br /&gt;
 hot_standby = on&lt;br /&gt;
&lt;br /&gt;
Now, to activate your changes, reload the postgresql server&lt;br /&gt;
&lt;br /&gt;
 # systemctl reload postgresql@11-main&lt;br /&gt;
&lt;br /&gt;
You may need to restart it via systemd,&lt;br /&gt;
&lt;br /&gt;
 # systemctl restart postgresql&lt;br /&gt;
&lt;br /&gt;
Open 5432 port in the firewall&lt;br /&gt;
&lt;br /&gt;
 # ufw allow from 62.210.83.200 to any port 5432 proto tcp&lt;br /&gt;
&lt;br /&gt;
===Slave Configuration: Step 2===&lt;br /&gt;
&lt;br /&gt;
Copy data from master and create recovery.conf&lt;br /&gt;
 $ pg_basebackup -h git.fosscommunity.in -D /var/lib/postgresql/11/main/ -P -U rep --wal-method=fetch  -R&lt;br /&gt;
&lt;br /&gt;
Start the slave server&lt;br /&gt;
&lt;br /&gt;
 # systemctl start postgresql@11-main&lt;br /&gt;
&lt;br /&gt;
===Replication Status===&lt;br /&gt;
&lt;br /&gt;
On master server ,&lt;br /&gt;
&lt;br /&gt;
 $ ps -ef | grep sender&lt;br /&gt;
 $ psql -c &amp;quot;select * from pg_stat_activity where usename=&#039;rep&#039;;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On slave server,&lt;br /&gt;
&lt;br /&gt;
 $ ps -ef | grep receiver&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Mdb571</name></author>
	</entry>
	<entry>
		<id>https://wiki.fsci.in/index.php?title=Setting_up_vim-gpg_plugin&amp;diff=11017</id>
		<title>Setting up vim-gpg plugin</title>
		<link rel="alternate" type="text/html" href="https://wiki.fsci.in/index.php?title=Setting_up_vim-gpg_plugin&amp;diff=11017"/>
		<updated>2021-10-25T08:48:59Z</updated>

		<summary type="html">&lt;p&gt;Mdb571: Add steps for setting up vim-gpg plugin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;vim-gpg plugin allows transparent editing for files encrypted using GPG .Those who are new to GPG can follow this [https://www.madboa.com/geek/gpg-quickstart/ guide].&lt;br /&gt;
&lt;br /&gt;
1) Install vim using your package manager (Those who prefer the GUI way of doing things can use vim-gtk3).&lt;br /&gt;
   sudo apt install vim &lt;br /&gt;
OR&lt;br /&gt;
   sudo apt install vim-gtk3&lt;br /&gt;
&lt;br /&gt;
2) Install vim-gpg plugin .There are 2 ways you can do this:-&lt;br /&gt;
:2a) If you are on a debian based distro. There is a package called `vim-scripts` that already has this plugin. So installing this package would make things a lot easier&lt;br /&gt;
   sudo apt install vim-scripts&lt;br /&gt;
&lt;br /&gt;
::Now add the line &amp;quot;packadd! gnupg&amp;quot; to your ~/.vimrc&lt;br /&gt;
   echo &amp;quot;packadd! gnupg&amp;quot; &amp;gt;&amp;gt; ~/.vimrc&lt;br /&gt;
&lt;br /&gt;
::That&#039;s it ! Now you can open your gpg encrypted file using vim and it will ask for your passphrase.&lt;br /&gt;
:OR&lt;br /&gt;
:2b) You can use Vim&#039;s [https://vimhelp.org/repeat.txt.html#packages package] support to contain the plugin in its own directory.&lt;br /&gt;
   mkdir -p ~/.vim/pack/bundle/start&lt;br /&gt;
   cd ~/.vim/pack/bundle/start&lt;br /&gt;
   git clone git@github.com:jamessan/vim-gnupg.git&lt;br /&gt;
&lt;br /&gt;
::Vim will find and load everything on its own, without mixing the files with others.&lt;/div&gt;</summary>
		<author><name>Mdb571</name></author>
	</entry>
</feed>