1. 1
Perforce Swarm
Get it. Use it. Hack it. Love it!
Geoff Nicol
Technical Architect
Perforce Software
Stewart Lord
Technical Architect & Team Lead
Perforce Software
5. 5
Software Requirements
• Linux 2.6+ Intel or Mac OS X 10.6+
• Apache 2.2+
• PHP
• 5.3.3+, 5.4+ recommended
• P4PHP extension, APC recommended
• P4D 2010.2+, 2013.1+ recommended
6. 6
Hardware Requirements
• No hard/fast requirements at this time
• Internally, VM with 4 GB ram and 2 cores
• Perforce has ~250 employees; if you have more:
• Use bigger hardware
• Scale Swarm horizontally
• Run Swarm behind a replica
10. 10
Configuring Apache
• a2enmod rewrite
• in /etc/apache2/sites-available/default:
• change DocumentRoot to /var/www/swarm/public
• update Directory to /var/www/swarm/public
• under Directory AllowOverride All
12. 12
Configuring Swarm s Worker Queue
• Add a cron job similar to below:
* * * * * curl -o /dev/null -m1 http://swarm-host/queue/worker
13. 13
Verifying Install
• apachectl restart
• You re now where the OVA would start
• visit http://my-swarm-host/ to ensure site is up
• login as a super user
• view about swarm dialog for trigger token
• visit http://my-swarm-host/queue/status
14. 14
Completing Install - Perforce Triggers
• Copy swarm-trigger.sh to your perforce server
• Configure swarm host and swarm token
• Run the script with no args for trigger values
• Install triggers
19. 19
Hands On
• Step 1: Connect to WiFi
• SSID Swarm no password
• Step 2: Connect to Swarm
• http://192.168.2.220
20. 20
SSID Swarm http://192.168.2.220 P4PORT 192.168.2.220:1666
• Step 3: Make a perforce user
• CLI: p4 -p <p4port> -u <myuser> user
• P4V: Open connection, enter port and click new user
• Step 4: Make a client
• CLI: p4 -p <p4port> -u <myuser> client
• P4V: On connection dialog, click new Workspace
• Step 5: Login to Swarm
• Step 6: Create a file for your username and shelve it
• Step 7: Review your change / Profit