The default settings on a number of Bamboo functions can be configured by setting the appropriate system properties. This page provides general instructions on how to set a system property in Bamboo.
Bamboo on UNIX-based operating systems (such as Solaris, Linux or Mac OS X) can be started by either executing the bamboo.sh script or using the Java Service Wrapper packaged with Bamboo.
Bamboo on Windows-based operating systems can be started by running the startup.bat file from the command line (which is the same as running the 'Start in Console' option from the Windows Start menu) or as a Windows Service. Both approaches start Bamboo using the Java Service Wrapper.
このページの内容
Configuring a Bamboo system property (UNIX)
始める前に
- Bamboo must be shut down before modifying any of its system properties. Once you have modified one or more system properties, they will come into effect when Bamboo is restarted.
- If you have any elastic agents running, ensure that they are shut down before you restart the Bamboo server. If you do not shut down your elastic instances before restarting, they will continue to run and become orphaned from your Bamboo server.
To configure a system property via the bamboo.sh file:
- Open the Bamboo start-up script
bamboo.shin a text editor. (This is usually located at the root of your Bamboo installation directory.) Locate the variable
RUN_CMDinbamboo.shand add the system property as a parameter to thejavacommand string value ofRUN_CMD, by adding the '-D' prefix to the system property.
For example, if you wanted to set thebamboo.agent.heartbeatIntervalsystem property to10(seconds), you would add the parameter-Dbamboo.agent.heartbeatInterval=10to thejavacommand string value ofRUN_CMDsuch that theRUN_CMDvariable assignment inbamboo.shmight look like:RUN_CMD="java -server -Xms256m -Xmx512m -XX:MaxPermSize=256m -Dbamboo.agent.heartbeatInterval=10 -Djava.awt.headless=true -classpath $CLASSPATH -Dorg.mortbay.xml.XmlParser.NotValidating=true -Djetty.port=8085 com.atlassian.bamboo.server.Server 8085 ./webapp /"
- Save your changes to the
bamboo.shfile and start Bamboo.
Configuring a Bamboo system property (Windows)
始める前に
- Bamboo must be shut down before modifying any of its system properties. Once you have modified one or more system properties, they will come into effect when Bamboo is restarted.
- If you have any elastic agents running, ensure that they are shut down before you restart the Bamboo server. If you do not shut down your elastic instances before restarting, they will continue to run and become orphaned from your Bamboo server.
To configure a system property via the Java Service Wrapper wrapper.conf configuration file:
- Open the Bamboo Wrapper configuration file
wrapper.confin a text editor. (This is usually located in theconfsubdirectory of your Bamboo installation directory.) - Locate the set of variables beginning
wrapper.java.additional.X, whereXis a series of consecutive numbers starting from '1'. After the finalwrapper.java.additional.Xvariable in this set, add a new variablewrapper.java.additional.Y, whereYis the next consecutive number in this set of variables. Add the entire system property with the Java '-D' prefix and assign it to the value of
wrapper.java.additional.Y.
For example, if you wanted to set thebamboo.agent.heartbeatIntervalsystem property to10(seconds), you would add a new variablewrapper.java.additional.4towrapper.confand assign it the value-Dbamboo.agent.heartbeatInterval=10, such that this section of thewrapper.conffile might look like:wrapper.java.additional.1=-Dorg.mortbay.xml.XmlParser.NotValidating=true wrapper.java.additional.2=-XX:MaxPermSize=256m wrapper.java.additional.3=-Djava.awt.headless=true # And now for the new variable: wrapper.java.additional.4=-Dbamboo.agent.heartbeatInterval=10
- Save your changes to the
wrapper.conffile and start Bamboo.
Configuring Bamboo runtime parameters for bamboo.war
The application container that deploys bamboo has to be configured with the additional java parameter.
Example Tomcat:
... JAVA_OPTS="-server -XX:MaxPermSize=256m -Dbamboo.home=/path/to/bamboo-tomcat-home -Xmx512m -Djava.awt.headless=true -D<your-parameter>=<value> $JAVA_OPTS" export JAVA_OPTS ...