Skip to content

alanpetersen/gitswarm

Repository files navigation

GitSwarm

Overview

Installs and configures Perforce GitSwarm. See the following for more information:

Usage

Usage is pretty simple. You can simply include the gitswarm class to configure GitSwarm on the node:

include gitswarm

The base class determines the $::osfamily of the node and includes the appropriate os-specific class: gitswarm::debian or gitswarm::redhat.

If you want to customize how GitSwarm is installed, you can either use hiera to specify parameters, or you can declare the os-specific class with the appropriate parameters set. For example, on CentOS 7, you could do something like:

class { 'gitswarm::redhat':
  pkgname            => 'helix-gitswarm',
  pubkey_url         => 'https://package.perforce.com/perforce.pubkey',
  yum_baseurl        => 'http://package.perforce.com/yum/rhel/7/x86_64',
  perforce_repo_name => 'perforce',
}

Post-Install

The installation will create an administrative account in GitSwarm called root with the password 5iveL!fe. When you log in, you will be asked to change that password to something that isn't on a README page on GitHub.

Once logged in, you can create projects, new users, groups, etc.

The P4D Instance

The installation creates a P4D instance running on ssl::1666. Logged into the instance, you can run p4 info to get more information:

$ p4 -p ssl::1666 info
User name: root
Client name: gitswarm (illegal)
Client host: gitswarm.host.com
Client unknown.
Current directory: /root
Peer address: 127.0.0.1:52339
Client address: 127.0.0.1
Server address: gitswarm.host.com:1666
Server root: /var/opt/gitswarm/perforce/data
Server date: 2015/12/16 14:58:15 +0000 UTC
Server uptime: 11:46:10
Server version: P4D/LINUX26X86_64/2015.2/1311674 (2015/12/06)
Server encryption: encrypted
Server cert expires: Dec 15 03:12:05 2017 GMT
Server license: none
Case Handling: sensitive

Logging In

There are several Perforce user accounts that are created initially in the instance:

$ p4 -p ssl::1666 -u gitswarm users
git-fusion-user  (Git Fusion) accessed 2015/12/16
gitswarm  (gitswarm) accessed 2015/12/16
root  (root) accessed 2015/12/16
unknown_git  (Unknown Git Contributor) accessed 2015/12/16

The gitswarm user has an existing ticket

p4 -p ssl::1666 -u gitswarm login -s
User gitswarm ticket expires in 4 hours 8 minutes.

And that user is a superuser

Protections:
	write user * * //...
	super user gitswarm * //...
	super user root * //...
	admin user git-fusion-user * //...
	review user git-fusion-reviews-* * //...

So you should use that account to set the password for the root account in p4d:

p4 -p ssl::1666 -u gitswarm passwd root
Enter new password: **********
Re-enter new password: *********
Password updated.

Note that security is configured to be level 3, so strong passwords are required.

p4 -p ssl::1666 -u gitswarm configure show
P4ROOT=/var/opt/gitswarm/perforce/data
P4PORT=ssl:1666
P4JOURNAL=journal
P4DEBUG=server=3
P4LOG=log
security=3 (configure)
unicode=1 (configure)
p4zk.log.file=p4zk.log (default)
auth.default.method=perforce (default)
zk.connect.timeout=300 (default)
server: 3 (P4DEBUG)
dm.protects.allow.admin: 1 (configure)

HINT: If you don't log in before the ticket expires (12h), then you can find the generated password in the /etc/gitswarm/gitswarm.rb file. Do not change the gitswarm user's password without consulting the GitSwarm documentation! Bad things may happen if you do.

Limitations

Currently, only supports RedHat/CentOS. Debian coming soon.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published