Use the following steps to prepare your system for installation of GitSwarm EE:
Check if your server meets the requirements.
Acquire a license.
GitSwarm EE requires a valid subscription license. Certain features, such as the ability to push to a repository, are not available without a valid license. To request licenses, please contact your Perforce sales representative or email sales@perforce.com.
Adjust default firewall rules.
By default, the CentOS/RHEL firewall rules block HTTP and SSH access.
For CentOS/RHEL 6.6+:
sudo lokkit -s http -s ssh
For CentOS/RHEL 7:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=ssh
sudo systemctl reload firewalld
If you intend to run GitSwarm EE on a non-standard port, you must adjust the firewall rules accordingly. For example, to allow GitSwarm EE to accept connections on port 12345
:
For CentOS/RHEL 6.6+:
sudo lokkit -p 12345:tcp
For CentOS/RHEL 7:
sudo firewall-cmd --zone=public --add-port=12345/tcp --permanent
sudo systemctl reload firewalld
Optional: Ensure that your system is up-to-date.
We advise installing GitSwarm EE on a fully up-to-date operating system:
For Ubuntu (12.04 and 14.04):
sudo apt-get update
sudo apt-get upgrade
For CentOS/RHEL 6.6+ and 7:
sudo yum update
Install a mail server and curl.
GitSwarm EE requires a local mail server to facilitate delivery of notifications via email, and curl
is used in the Quick install.
Note: If you install Postfix, select Internet Site
during setup. Do not use Exim to send email from GitSwarm EE.
Then install your selected mail server. For example:
For Ubuntu (12.04 and 14.04):
sudo apt-get install postfix curl
For CentOS/RHEL 6.6+:
sudo yum install postfix curl
sudo service postfix start
sudo chkconfig postfix on
For CentOS/RHEL 7:
sudo yum install postfix curl
sudo systemctl enable postfix
sudo systemctl start postfix
Ensure that GitSwarm EE's port is not in use.
GitSwarm EE is a web application, which uses port 80 (for HTTP) or port 443 (for HTTPS) by default. GitSwarm EE cannot operate without exclusive access to its port, so make sure no other service is using its intended port. Learn how to discover which processes are listening on specific ports.
curl -s https://package.perforce.com/bootstrap/gitswarm-ee.sh | sudo sh -
Perform the post-installation steps.
As of GitSwarm EE 2016.3-2, the GitSwarm EE package will check, prior to installation, if user['home']
is set to a reserved directory (/opt/gitswarm
, /opt/perforce
or /opt/rh
). If it is set to a reserved directory, the package installation will fail with an error like the following:
ERROR:
ERROR: "user['home']" set to reserved directory '/opt/gitswarm'.
ERROR: '/opt/gitswarm', '/opt/perforce' and '/opt/rh' are reserved directories
ERROR: for GitSwarm and should not be used for "user['home']".
ERROR:
ERROR: Please edit:
ERROR:
ERROR: /opt/perforce/package-control/helix-gitswarm.config-overrides
ERROR:
ERROR: update "user['home']" and ensure that it is not set to a reserved
ERROR: directory (as listed above).
ERROR: If you are upgrading your GitSwarm installation, please migrate
ERROR: your installation to the new setting for "user['home']" before
ERROR: attempting to upgrade your GitSwarm installation. Detailed instructions
ERROR: on how to migrate your home directory can be found in our online
ERROR: documentation here:
ERROR:
ERROR: https://www.perforce.com/perforce/doc.current/manuals/gitswarm/update/README.html#changing-gits-home-directory
ERROR:
If you encounter this error on a new installtion of GitSwarm EE, please create/edit /opt/perforce/package-control/helix-gitswarm.config-overrides
and add/edit the key
user['home']
setting it to a directory that is not reserved. After changing the path, please retry the installation of GitSwarm EE.
If you prefer to manually perform, or review, the steps undertaken by the bootstrap script above, see the Manual installation steps.
Perform the post-installation steps.
Verify the external URL for your GitSwarm EE instance:
View /etc/gitswarm/gitswarm.rb
, and verify that the following setting is set to the URL that your GitSwarm EE users should use:
external_url "http://gitswarm.example.com"
Edit the setting if necessary.
Note: It is possible to run GitSwarm EE on a non-standard port by specifying the port as part of the
external_url
:
external_url "http://gitswarm.example.com:12345"
If you do use a non-standard port, see above for instructions on adjusting the firewall for CentOS/RHEL systems.
Set the timezone for your GitSwarm EE instance:
Edit /etc/gitswarm/gitswarm.rb
, and edit the line:
#gitlab_rails['time_zone'] = 'UTC'
Replace UTC
with an appropriate timezone, and uncomment the line.
Check the 'home' directory for your GitSwarm EE instance:
As of 2016.3-2, GitSwarm EE will check user['home']
during its configuration and fail with the following error if it's set to a reserved directory:
Recipe: gitswarm::default
* ruby_block[Checking home directory for 'git'] action run
================================================================================
Error executing action `run` on resource 'ruby_block[Checking home directory for 'git']'
================================================================================
RuntimeError
------------
Cannot set home directory for 'git' to '/opt/gitswarm'
If this happens, please open /etc/gitswarm/gitswarm.rb
and edit the line:
user['home'] = ...
replacing the path with a directory that is not reserved by GitSwarm (/opt/gitswarm
, /opt/perforce
, /opt/rh
).
Configure GitSwarm EE.
If you have made changes to /etc/gitswarm/gitswarm.rb
, then you will want to run reconfigure
for them to take effect.
sudo gitswarm-ctl reconfigure
Browse to the hostname.
As of GitSwarm EE 2016.3, the root user will be prompted to reset their password (previous releases used a standard password). Once you have specified a password, you can login.
Tweet about it!
If you are interested, learn about the GitSwarm EE directory structure.
If you prefer to use HTTPS with GitSwarm, learn how to configure HTTPS.
To uninstall GitSwarm EE, follow the uninstall steps.
Set up the connection to your Helix Server:
GitSwarm EE automatically provisions a Helix Server and connects Helix Git Fusion for you when you initially install the GitSwarm EE packages. Learn more about the provisioned server.
In production, you will likely already have your own Helix Server already setup and will want to configure GitSwarm EE to talk to it in order to enable Helix Mirroring.
Set up other ways of signing in:
Note: For additional troubleshooting and configuration options, please see the Omnibus GitLab readme.
error: "X" is an unknown key on CentOS/RHEL 6.6+
This error occurs during install of CentOS/RHEL 6.6+, often in a shared VM environment where some of the keys in /etc/sysctl.conf
don't actually apply. The error usually looks something like this:
STDERR: error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-iptables" is an unknown key
error: "net.bridge.bridge-nf-call-arptables" is an unknown key
These errors are ignorable, you just need to run sudo gitswarm-ctl reconfigure
, and our script shouldn't have to modify that file again and will continue. If you want to future-proof upgrades from failing on the same lines, you can modify your /etc/sysctl.conf
and comment out the keys that were listed as unknown.