::----------------------------------------------------------------------------- :: Copyright (c) Perforce Software, Inc., 2007-2014. All rights reserved :: :: Redistribution and use in source and binary forms, with or without :: modification, are permitted provided that the following conditions are met: :: :: 1 Redistributions of source code must retain the above copyright :: notice, this list of conditions and the following disclaimer. :: :: 2. Redistributions in binary form must reproduce the above copyright :: notice, this list of conditions and the following disclaimer in the :: documentation and/or other materials provided with the distribution. :: :: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS :: "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT :: LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS :: FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PERFORCE :: SOFTWARE, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, :: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT :: LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, :: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON :: ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR :: TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF :: THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH :: DAMAGE. ::----------------------------------------------------------------------------- REM Set P4PORT and P4USER and run p4 login before running this script. REM Also run p4 triggers and put in the SetDefaultDepotSpeMapField.py trigger first as well. set instance=%1 p4 configure set defaultChangeType=restricted p4 configure set run.users.authorize=1 :: The server.depot.root configurable is valid for P4D 2014.1+ p4 configure set server.depot.root=c:\p4\%instance%\depots p4 configure set journalPrefix=c:\p4\%instance%\checkpoints\p4_%instance% :: The db.peeking configurable is valid for P4D 2013.3+ p4 configure set db.peeking=2 p4 configure set dm.user.noautocreate=2 p4 configure set dm.user.resetpassword=1 p4 configure set filesys.P4ROOT.min=1G p4 configure set filesys.depot.min=1G p4 configure set filesys.P4JOURNAL.min=1G p4 configure set monitor=1 p4 configure set server=3 :: For P4D 2013.2+, setting db.reorg.disable=1 has been shown :: to significant improve performance when Perforce databases (db.* :: files) are stored on some solid state storage devices, while not :: making a difference on others. It should be considered. :: p4 configure set db.reorg.disable=1 :: The net.tcpsize is best left UNSET for 2014.2+ servers. p4 configure set net.tcpsize=512k p4 configure set lbr.bufsize=1M :: 2013.2 - Turn off max* commandline overrides. p4 configure set server.commandlimits=2 p4 configure set serverlog.file.3=c:\p4\%instance%\logs\errors.csv p4 configure set serverlog.retain.3=7 p4 configure set serverlog.file.7=c:\p4\%instance%\logs\events.csv p4 configure set serverlog.retain.7=7 p4 configure set serverlog.file.8=c:\p4\%instance%\logs\integrity.csv p4 configure set serverlog.retain.8=7 echo "Create a depot named 'spec' of type 'spec'. echo "Create a depot named 'unload' of unload 'spec'. echo See http://www.perforce.com/perforce/doc.current/manuals/p4dist/chapter.replication.html#replication.verifying echo if you are also setting up a replica server. p4 configure set rpl.checksum.auto=1 p4 configure set rpl.checksum.change=2 p4 configure set rpl.checksum.table=1 p4 configure set rpl.compress=3 p4 counter SDP "%DATE%" echo It is also recommended that you run "p4 configure set security=3"
|#41||27757||tom_tyler||On Windows, avoid using 'p4 admin restart', and instead use svcinst.exe to manage the service.|
Refinements to @27712:
* Resolved one out-of-date file (verify_sdp.sh).
* Added missing adoc file for which HTML file had a change (WorkflowEnforcementTriggers.adoc).
* Updated revdate/revnumber in *.adoc files.
* Additional content updates in Server/Unix/p4/common/etc/cron.d/ReadMe.md.
* Bumped version numbers on scripts with Version= def'n.
* Generated HTML, PDF, and doc/gen files:
- Most HTML and all PDF are generated using Makefiles that call an AsciiDoc utility.
- HTML for Perl scripts is generated with pod2html.
- doc/gen/*.man.txt files are generated with .../tools/gen_script_man_pages.sh.
Updated stale core doc link with KB article re: rpl.* params.
Removed submit.allowbgtransfer as a default setting. It requires
additional configuration when set.
|#37||26920||tom_tyler||Added setting for server.extensions.dir.|
Removed 'Operating System' value from rejectList, per advice of
Engineering and Support.
Enable 'p4 submit -b' by setting submit.allowbgtransfer=1 for
|#34||25802||tom_tyler||Comment clarity improvements. No functional change.|
Committing Rusy's shelved change after merging with other changes.
Added setting of dm.info.hide=1, to hide P4ROOT and other
sensitivie info from output of 'p4 info' from a non-authenticated
Removed setting of dm.user.resetpassword, which was already
commented out in the Unix version. This is not really a
general best practice to have set, as most accounts use some
form of LDAP integration. And even when not, having this
set imposes a certaion workflow on Perforce-managed passwords
that is often better handled in other ways.
Added net.autotune=1 setting and related comments.
Corrected misinformation in comments related to net.tcpsize configurable, and tweaked logic slightly.
Added more info in README and changed format to Markdown (renaming from .txt to .md).
Enhanced gen_default_broker_cfg.sh to detect whether net.autotune is enabled, and if so, add net.autotune to the broker configuration.
Enhanced rejectList value for P4EXP to also reject versions of
P4EXP that impersonate the version string from Windows Explorer.
The 'Operating System' also blocks the versions that impersonate.
Added comment for why filesys.P4LOG.main and filesys.TEMP.min aren't set.
Comment tweak only, no functional change.
Added comment indicating that these scripts serve as a guide defining
best practices configurables for a production environment. Also
added a handy URL to bookmark documenting many configurables:
No functional change.
Fixed issue with super user not being logged in after the restart
that occurs after setting auth.id.
Added filetype.bypasslock=1 configurable, recommended for Swarm.
This is needed to allow reviews of exclusively locked files. It
allows Swarm to unshelve such files for review, by doing:
p4 unshelve --bypass-exclusive-lock -s <shelved_changelist>
|#25||23001||tom_tyler||Added comment re: net.tcpsize to match lastest change to configure_new_servers.sh.|
For P4D 2016.2/1468155+ servers, added configurable setting.
p4 configure set db.monitor.shared=4096
Also added notes describing why we set it and other how it works.
Updated configure_new_server.* scripts, which reflect SDP best
practices for enterprise environments.
Taking out the setting to disable autologinpromt, upon discovery
that it has a safety feature of going interactive only in an
interactive terminal shell. It will still wreak havoc with
non-interactive commands that do things like 'ssh' with '-t' (to
simulate a interactive terminal shell, as is sometimes
necessary in automation). But as that is somewhat obscure,
the most widely applicable best practice is to use the default
p4d behavior, i.e. with autologinprompt enabled.
#review @sven_erik_knop @nick_poole
Bumped up dm.user.loginattempts from 3 to 7, to be more friendly to
humans who mistype passwords.
|#21||21883||tom_tyler||Added new configurable setting: 'filesys.bufsize=1M'.|
Configurables for best results with Swarm in particular, but
a generally better overall experience.
p4 configure set dm.shelve.promote=1
p4 configure set dm.keys.hide=2
Note that setting dm.shelve.promote=1 will slow down shelving
operations on an edge server, but will make the shelves globally
available. On balance, dm.shelve.promote=1 is recommended,
though admins should be aware of the trade off (a simpler global
view and cross-site code reviews, at some cost for performance
of shelving at edge sites).
For p4d 2016.1 Patch 5+ servers, enable a server with an expired temp license to
start, albeit with limited functionality, so that license expiry doesn't make it
impossible to perform license management via the front-door. This configurable
allows the server to be started regardless of a bad license, though users will
still be blocked by license invalid messages. Perpetual commercial licenses never
expire; this configurable will not affect those.
Also added +x file type modifier to the *.bat file.
Configured to re-login after setting auth.id, and restart p4d at the
end of the script.
Define auth.id for P4D 2016.1+ servers to "p4_<instance>".
The value doesn't really affect behavior for auth.id, so long as it's defined.
|#16||21173||tom_tyler||Taking advantage of new 2016.2 configurables.|
A few configurable tweaks:
* Setting server=4 logging as the default.
* Setting net.backlog=2048, per Support.
* Setting net.tcpsize=0 to engage 'auto-self-tuning' magic.
Added defense against known-misbehaving client versions
using rejectList configurable, availabe starting with P4D
2015.1 Patch 5.
Change to best-practice configurables.
For p4d 2016.1 Patch 2+ (2016.1.1395783+), disable auto
prompting for a password, as this can cause 'p4' commands
to go interactive that wouldn't normally, wreaking havoc
Fix with: p4 configure set auth.autologinprompt=0.
Adjusted setting of db.reorg.disable to go with the block comments
made previously to receive a setting for db.reorg.disable. In those
comments, setting of the value had been commented out, but now are
This impact has no functional change other than adding the safety
feature of avoiding setting db.reorg.disable for older versions of
p4d that don't support it.
Turn off database reorg per best practice recommendation from Anton and Michael S.
Stop running weekly_backup.sh automatically since a compact database actually causes
a performance hit. Added note to occasionally run weekly_backup.sh to recapture free space.
Removed configurables for 'errors' and 'events' structured logs.
Added 'maxmb' setting of 200MB for the structured audit log.
Enhanced Windows version work like Unix version:
* Added a check for the 'instance' paramter.
* Loads SDP environment from p4env.bat (equiv of p4_vars).
* Uses SDP environment to set various things.
* Now creates 'spec' and 'unload' depots.
Changed both Unix and Windows versions to use KEEPLOGS setting
defiend in standard SDP enviornment file to apply to 'retain'
setting of structured server logs.
Removed obsolete comment relationg to the SetDepotSpecMapField
trigger, which was obsoleted with server.depot.root in 2014.1.
Changed mechanism for creating 'spec' and 'unload' depots
to one that works the same for Windows and Linux.
Removed defaultChangeType setting. The impact on Swarm and
performance may not be worth the security benefit for. It
is still a good practice for some environments, but I'm not
sure it's a clear best practice to set it.
Added the audit log as a default structured log and set the rotation to keep 31 days.
Routine Merge Down to dev from main using:
p4 merge -b perforce_software-sdp-dev
Routine Merge Down to dev from main using:
p4 merge -b perforce_software-sdp-dev
Routine merge to dev from main using:
p4 merge -b perforce_software-sdp-dev
|#5||15554||tom_tyler||Routine merge-down from main.|
|#4||12030||tom_tyler||Merged down from main to refresh dev branch for SDP.|
|#3||12028||tom_tyler||Refreshed SDP dev branch, merging down from main.|
|#2||11463||russell_jackson||Updated dev to prepare for Summit agreed changes.|
|#1||10148||tom_tyler||Promoted the Perforce Server Deployment Package to The Workshop.|