#------------------------------------------------------------------------------ # Instance specific variables set/calculated in this file. This is not # intended to be sourced directly. It is sourced when /p4/common/bin/p4_vars # is sourced. # # IMPORTANT: This file is generated. If any site-local changes are made, # they MUST be made after the '### MAKE LOCAL CHANGES HERE:' tag near the # bottom of this file. # This defines the version of the format of this file, used when the SDP is # upgraded. SDP_INSTANCE_VARS_FORMAT=1.1 # Disable shellcheck requirement for shebang line, as this file is sourced # in (from p4_vars) rather than executed as a script. # shellcheck disable=SC2148 # This file is processed by mkdirs.sh to update REPL_* values as appropriate. # It can subsequently be edited if required. # Various scripts send email to $MAILTO. This can contain comma-delimited list # of email addresses (no spaces). export MAILTO=REPL_MAILTO # Specify the email address from which emails are sent in $MAILFROM. # This must be exactly one email address. export MAILFROM=REPL_MAILFROM export P4USER=REPL_ADMINUSER export P4SERVICEUSER=svc_${SERVERID} # P4MASTER_ID is server.id of Master for this instance export P4MASTER_ID=REPL_MASTER_ID # The setting below should be ssl: if this instance uses ssl. export SSL_PREFIX=REPL_SSLPREFIX export P4PORTNUM=REPL_P4PORT export P4PORT=${SSL_PREFIX}${P4PORTNUM} # Set the value for P4BROKERPORT to Unset if the broker is not # used. export P4BROKERPORTNUM=REPL_P4BROKERPORT export P4BROKERPORT=${SSL_PREFIX}${P4BROKERPORTNUM} # These $P4D_FLAGS show when using 'ps' to scan the process table. # Other settings affect p4d. export P4D_FLAGS="-p $P4PORT -r $P4ROOT -J $P4JOURNAL -L $P4LOG -q -d --pid-file" # Default values of the following - may be overwritten below # P4MASTERHOST=DNS Name (or IP address) of master FOR THIS INSTANCE. # A DNS Name is much easier to manage for failover purposes. # Examples: # - edge server: set this to DNS for commit-server # - replica: set this to DNS for parent server # - HA replica for commit: set this to DNS for commit-server # - HA replica for edge: set this to DNS for edge-server export P4MASTERHOST=REPL_P4MASTERHOST export P4MASTERPORT=${SSL_PREFIX}${P4MASTERHOST}:${P4PORTNUM} export P4REPLICA=FALSE # SHAREDDATA defaults FALSE, but is set to TRUE on replica servers that share their /hxdepots # volume with their P4TARGET server - as per lbr.replication configurable export SHAREDDATA=FALSE # SERVERID is defined in /p4/n/root/server.id. if [[ -n "$SERVERID" && "$SERVERID" != "$P4MASTER_ID" ]]; then export P4REPLICA=TRUE if [[ -f "$P4ROOT/db.domain" && ! -f "$P4ROOT/P4ROOT_not_usable.txt" ]]; then # Use egrep because it works where we need it to. Shellcheck suggests # using 'grep -E' instead. # shellcheck disable=SC2196 targetServerPort=$("$P4DBIN" -r "$P4ROOT" -cshow | egrep "^$SERVERID: P4TARGET = ") targetServerPort=${targetServerPort##* = } # Use 'echo' w/o quotes to remove leading/trailing whitespace. # shellcheck disable=SC2116 disable=SC2086 targetServerPort=$(echo $targetServerPort) else targetServerPort=$P4PORTNUM fi if [[ -n "$targetServerPort" ]]; then export P4MASTERPORT="$targetServerPort" if [[ "$targetServerPort" == *":"* ]]; then # strip off any trailing ':.....' element (e.g., ':1666') export P4MASTERHOST="${targetServerPort%:*}" # if P4TARGET includes ssl, also need to strip off ssl: from front export P4MASTERHOST="${P4MASTERHOST#*:}" fi fi repStyle="readonly" if [[ -f "$P4ROOT/db.domain" && ! -f "$P4ROOT/P4ROOT_not_usable.txt" ]]; then repStyle=$("$P4DBIN" -r "$P4ROOT" -cshow|"$GREP" "^$SERVERID: lbr.replication = ") repStyle=${repStyle##* = } # Use 'echo' w/o quotes to remove leading/trailing whitespace. # shellcheck disable=SC2116 disable=SC2086 repStyle=$(echo $repStyle) fi if [[ $repStyle == "shared" ]]; then # Used by p4verify.sh among others export SHAREDDATA=TRUE fi fi # Proxy settings export PROXY_TARGET=${SSL_PREFIX}${P4MASTERHOST}:${P4BROKERPORTNUM} export PROXY_PORT=${SSL_PREFIX}$((P4BROKERPORTNUM+1)) # P4DTG Settings: export P4DTG_CFG=$P4SERVER # If SNAPSHOT_SCRIPT is defined and set to the path of an executable # script, daily_checkpoint.sh will call the referenced script to # perform a snapshot. The following sample enable snapshots on the # AWS master server only if [[ -n "$SERVERID" && "$SERVERID" == "$P4MASTER_ID" ]]; then export SNAPSHOT_SCRIPT= ###export SNAPSHOT_SCRIPT=/p4/common/cloud/aws/bin/snapshot.sh else export SNAPSHOT_SCRIPT= fi # Set VERIFY_SDP_SKIP_TEST_LIST as an alternative to passing in a lists of tests # using the '-skip' flag to the verify_sdp.sh script. The command line flag to # the script is more appropriate if a test is to be skipped temporarily, while # setting the VERIFY_SDP_SKIP_TEST_LIST variable is better for making a permanent # exception (e.g. skipping crontab checks if some other scheduler is used). # For more info, run: verify_sdp.sh -man ###export VERIFY_SDP_SKIP_TEST_LIST="crontab" export VERIFY_SDP_SKIP_TEST_LIST= export SDP_ALWAYS_LOGIN=0 # The SDP_MAX_START_DELAY_* settings are numeric values that define the maximum # number of second to wait for services to start before considering the startup # a failure in various SDP scripts. Successful start is indicated by being # responsive to a 'p4 info' command and the appropriate port for each service. export SDP_MAX_START_DELAY_P4D=120 export SDP_MAX_START_DELAY_P4BROKER=60 export SDP_MAX_START_DELAY_P4P=60 # The SDP_MAX_STOP_DELAY_* settings are numeric values that define the maximum # number of second to wait for services to stop before considering the shutdown # a failure in various SDP scripts. Successful stop is indicated by removal of # the server.pid file for p4d, and lack of active pids for p4broker/p4p. These # values are typically never used. Note that 'p4d' does not have a max delay. export SDP_MAX_STOP_DELAY_P4BROKER=600 export SDP_MAX_STOP_DELAY_P4P=600 # Set SDP_AUTOMATION_USERS to a comma-delimited list of Perforce user accounts # to login when the 'p4login' script is used with the '-automation' flag. This # will normally be a list of users that operate trigger scripts, such as the # 'swarm' user if Helix Swarm is used. Typically such users will have long-term # tickets. For more info, run: p4login -man ###export SDP_AUTOMATION_USERS= export SDP_AUTOMATION_USERS="swarm" umask 0026 #------------------------------------------------------------------------------ # Any local changes to this file that are intended to be persistent through # future SDP upgrades must be made below the next line in this file. When # doing SDP upgrades, be careful to evaluate whether site-local custom content # below is impacted or perhaps even obsoleted due to SDP changes. ### MAKE LOCAL CHANGES HERE:
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#37 | 30388 | C. Thomas Tyler |
Released SDP 2024.1.30385 (2024/06/11). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#36 | 30297 | C. Thomas Tyler |
Released SDP 2023.2.30295 (2024/05/08). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#35 | 29954 | C. Thomas Tyler |
Released SDP 2023.1.29949 (2023/12/01). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#34 | 29891 | C. Thomas Tyler |
Released SDP 2023.1.29699 (2023/07/11). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#33 | 29612 | C. Thomas Tyler |
Released SDP 2023.1.29610 (2023/05/25). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#32 | 29443 | C. Thomas Tyler |
Released SDP 2022.2.29441 (2023/02/27). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#31 | 29401 | C. Thomas Tyler |
Released SDP 2022.2.29399 (2023/02/06). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#30 | 29252 | C. Thomas Tyler |
Released SDP 2022.2.29250 (2022/12/08). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#29 | 29143 | C. Thomas Tyler |
Released SDP 2022.1.29141 (2022/10/29). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#28 | 28651 | C. Thomas Tyler |
Released SDP 2021.2.28649 (2022/03/03). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#27 | 28412 | C. Thomas Tyler |
Released SDP 2021.2.28410 (2021/11/24). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#26 | 28259 | C. Thomas Tyler |
Released SDP 2021.1.28253 (2021/11/13). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#25 | 28240 | C. Thomas Tyler |
Released SDP 2021.1.28238 (2021/11/12). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#24 | 27761 | C. Thomas Tyler |
Released SDP 2020.1.27759 (2021/05/07). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#23 | 27527 | C. Thomas Tyler |
Released SDP 2020.1.27524 (2021/02/26). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#22 | 27331 | C. Thomas Tyler |
Released SDP 2020.1.27325 (2021/01/29). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#21 | 26403 | C. Thomas Tyler |
Released SDP 2019.3.26400 (2020/03/28). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#20 | 25245 | C. Thomas Tyler |
Released SDP 2019.1.25238 (2019/03/02). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#19 | 22950 | akwan | Provide an override for difference between proxy listening port and target port | ||
#18 | 22685 | Russell C. Jackson (Rusty) | Update main with current changes from dev. | ||
#17 | 22185 | C. Thomas Tyler |
Released SDP 2017.2.22177 (2017/05/17). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#16 | 20921 | Russell C. Jackson (Rusty) | Fix that Adrian shelved on Main for ssl: issue. | ||
#15 | 20767 | C. Thomas Tyler |
Released SDP 2016.2.20755 (2016/09/29). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#14 | 20481 | C. Thomas Tyler |
Released SDP 2016.1.20460. Copy Up using 'p4 copy -r -b perforce_software-sdp-dev', with selective removal of changes related to work-in-progress files. |
||
#13 | 20390 | C. Thomas Tyler |
Released SDP 2016.1.20387. Copy Up using 'p4 copy -r -b perforce_software-sdp-dev', with selective removal of changes related to work-in-progress files. |
||
#12 | 20353 | C. Thomas Tyler |
Released SDP 2016.1.20348. Copy Up using 'p4 copy -r -b perforce_software-sdp-dev', with selective removal of changes related to work-in-progress changes. |
||
#11 | 20050 | C. Thomas Tyler |
Released: 2016.1.20028 (2016/08/03). Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'. |
||
#10 | 19414 | C. Thomas Tyler | Released SDP/MultiArch/2016.1/19410 (2016/05/17). | ||
#9 | 18961 | C. Thomas Tyler | Released: SDP/MultiArch/2016.1/18958 (2016/04/08). | ||
#8 | 16260 | Russell C. Jackson (Rusty) |
Added P4DPORT to allow the server to start without using the HOSTIP. P4PORT still includes the HOSTIP in order to avoid issues with rpl.forward.login not working with localhost. |
||
#7 | 16259 | Russell C. Jackson (Rusty) |
Created P4MASTERPORT in instance_vars to simplify logins to the master server in the other scripts. Changed other scripts to use P4MASTERPORT Added clean up of statejcopy and checkpoints.rep directory to weekly_sync_replica so that it properly resets a replica that is using journalcopy. Moved umask to instance_vars since it wasn't being picked up when running things via crontab Removed P4REPLICANAME from instance_vars since it wasn't being used anymore. Added HOSTIP to mkdirs and to the P4PORT setting in instance vars so the server starts on a specific IP address rather than all on the server. This avoids a bug where rpl.forward.login doesn't work when logging in via localhost. |
||
#6 | 14073 | Russell C. Jackson (Rusty) |
Backed out changes that moved variables to p4_vars. The variables are intended to be in instance vars to keep everything about a particular instance in one location. It was confusing for people to see a setting in p4_vars and not understand that setting was being overridden in the instance vars. There shouldn't be any overlap between p4_vars and instance vars anymore. Also, server.id is not optional. It must exist. It is how you control whether the instance is a master or a replica. It is not set by the scripts anymore because that was also confusing people. They would try to change the role of a server by changing server.id and we previously would just overwrite their changes. Now, the SDP just reads the server.id so that the user has control over it. That doesn't confuse them since that is how our docs tells them to change a server's role. |
||
#5 | 14045 | Robert Cowham |
Move some stuff from instance_vars to p4_vars (or at least for defaults). Clarify user messages. |
||
#4 | 13908 | C. Thomas Tyler | Pushing SDP 2015.1.13906. | ||
#3 | 12443 | Russell C. Jackson (Rusty) | Added missing proxy variables that were lost in the SDP rebuild. | ||
#2 | 11919 | Russell C. Jackson (Rusty) |
Added a SERVERID variable to p4_vars and updated backup_functions to use it. Changed the location and the names of the config files so that they could live in /p4/common/config (You're welcome Tom). The files names are: p4_$INSTANCE.vars p4_$INSTANCE.p4review.cfg p4_$INSTANCE.vars will now set P4REPLICA to FALSE if SERVERID matches MASTERNAME, otherwise it is TRUE. This change means that a user must change server.id now in order to change the role of the server rather than changing the instance vars file. This makes more sense to a user that is reading the admin guide about server.id rather than overwriting the file based on a setting that isn't in the admin guide. Change mkdirs to reflect all of the above changes. |
||
#1 | 11524 | Russell C. Jackson (Rusty) | Released updated version of the SDP from Dev. | ||
//guest/perforce_software/sdp/dev/Server/Unix/p4/common/config/instance_vars.template | |||||
#3 | 11523 | Russell C. Jackson (Rusty) |
Modified P4BROKERPORTNUM to just be the port number and added P4BROKERPORT to instance_vars to be consistent with P4PORT. Also makes it easier to modify p4review.py to use P4BROKERPORT rather than P4PORT for the subject line when needed. |
||
#2 | 11490 | Russell C. Jackson (Rusty) |
Added SSL_PREFIX back and P4MASTERPORTNUM in order to support the sync_replica.sh and weekly_sync_replica.sh scripts. |
||
#1 | 11477 | Russell C. Jackson (Rusty) |
Updated to use /usr/bin/env python Added workshop header. Changed cfg to config. |
||
//guest/perforce_software/sdp/dev/Server/Unix/p4/common/cfg/instance_vars.template | |||||
#1 | 11466 | Russell C. Jackson (Rusty) |
Initial work to simplify p4_vars and remove cluster stuff. Testing of named instances surfaced some bugs that are in prod sdp, now fixed in dev. Added three triggers from RCJ SDP Moved p4review.cfg into the new /p4/common/cfg to go along with the instance_vars files. mkdirs.sh now generates an instance_p4review.cfg as well. Removed incremental p4verify to clean up a bit. It didn't support replicas and was really never used. All port settings now live in <instance>_vars file. You set what you want the ports to be in mkdirs.sh. There is no more fancy logic to try to guess what the port should be. You set it, and that is what it is. Remaining to do is to updated scripts to not need p4master_run. Saved that work for later since this is tested and works. |