bw logo

Appendix D. Creating a custom BigWorld server installation

Note

This appendix does not apply to Indie package customers.

As a game advances through its development process it may become nescessary to perform a custom installation of the BigWorld server. This may be due to BigWorld server binaries having been regenerated, or production environment machines needing to alter the installation location from the default provided in the RPM files.

This chapter outlines some of the approaches that can be used to customise the installation of each BigWorld server component. Whichever approach you choose to use, we assume that you have obtained the BigWorld Technology package correctly. This is to ensure that there are no line ending issues, such as having Windows CRLF line endings when attempting to use scripts from Linux, which assume LF only line endings.

This chapter will also assume that you have a solid understanding of Linux (in particular the CentOS file system heirachy) and are confident in navigating the environment on the command line to locate files as required.

D.1. Customising RPMs

BigWorld distributes the RPM .spec files and Python scripts that are used for building the officially shipped RPMs. This enables you to customise the RPMs for your own environment should you need to.

Should you wish to use this approach of customisation, please refer to the Server Operations Guide's chapter RPM which fully outlines both how the BigWorld RPM build scripts work, and approaches that can be used for automating the distribution of the RPMs within a large network environment.

D.2. Manual Installation

D.2.1. BWMachined

Out of all the BigWorld server components, BWMachined is perhaps the easiest to customise the installation of due to its simplicity.

To install BWMachined manually you can run the bwmachined2.sh script as the root user in the bigworld/tools/server/install directory as follows:

# ./bwmachined2.sh install

This operation will perform the following steps:

  • Stop any existing installed BWMachined daemon, and uninstall it if it does exist. This will not uninstall an RPM package of BWMachined however.

  • Create the BWMachined init script in /etc/rc.d/init.d/.

  • Create the symbolic links in /etc/rc[1-5].d/. It is setup to stop in rc1.d/ and start in rc[2-5].d/. These can be changed manually if desired.

  • Copy the BWMachined executable to the directory /usr/sbin/.

  • Launch the executable in daemon mode as if the init script were called with the start argument.

D.2.2. Server

A custom installation of the BigWorld server is not constrained by any installation scripts or file system locations. All that is nescessary is that the user(s) that will run the BigWorld server on each machine in the cluster have access to the server binaries and the game resources. This means that it is possible to install the BigWorld server binaries either in a user's home directory, or in any other location on a host.

Because it is generally enforced that the .bwmachined.conf file is the same between machines for an individual user in a BigWorld network cluster, it is preferable to ensure that the installation location of the BigWorld server binaries is consistent on each machined. This also ensures that ongoing maintenance of the machines is much easier.

If you choose to manage your own BigWorld server binary installation you may wish to refer to some of the options mentioned in the document Release Planning's section Distributing Game Resources.

D.3. Server Tools

The server tools perhaps benefit the most from being installed from an RPM due to the complexity of subsystems and configuration that is involved in installing them correctly. The following instructions describe dependancy list as well as a basic installation guide although we no longer support a manual installation of the server tools.

D.3.1. Requirements and Caveats

D.3.1.1. Requirements

  • BWMachined installed and operational on the server tools machine

  • Dedicated user account for the server tools

  • MySQL Database

  • Python 2.4 or higher (default for RedHat / CentOS)

  • TurboGears v1.x (default for RedHat / CentOS)

D.3.1.2. Dependencies

WebConsole by default uses an SQLite database for managing all persistent data such as user information, preferences, etc.

The statistics-collecting process, StatLogger, relies on a MySQL database server for storing process and machine statistics.

D.3.1.3. Installation process

The installation process will not be outlined in a step-by-step manner as has been done for the RPM installation process. If you are attempting a custom installation of the BigWorld server tools it is assumed that you have enough system understanding and experience with BigWorld to perform each step described below.

A custom installation of the BigWorld server tools requires you to perform the following steps:

  • Install the EPEL repository as outlined in Installing the EPEL Repository.

  • Install the MySQL-python RPM package as distributed with the BigWorld package to prevent any WebConsole and StatLogger connection issues.

  • Install all dependencies.

    Even when performing a custom installation we recommend that you install the dependency chain via the default CentOS repositories used for the BigWorld RPMs, as it will ensure that the versions of installed packages are correct.

    The following yum packages should be installed:

    • python-setuptools

    • python-sqlobject

    • TurboGears

  • yum update your distribution to ensure all security and bug fixes have been applied.

  • Create a user account within your domain which will be used to run the tools.

    For example, create the user bwtools that is able to be resolved on all machines in the server cluster and has a unique user ID on all cluster machines.

  • Ensure the MySQL server is running and enabled for all appropriate runlevels.

  • Create a MySQL server account for the BigWorld server tools.

  • Install the BigWorld server tools into the BigWorld tools users directory.

  • Set the SELinux security context for bwlog.so.

  • Update the WebConsole configuration file.

  • Update the StatLogger configuration file.

  • Update the MessageLogger configuration file.

  • Copy the service scripts from bigworld/tools/server/install into the directory /etc/init.d and set the service runlevels.

  • Start MessageLogger, StatLogger and WebConsole.

  • Configure log rotation for the server tools log files.

  • Verify that all services are running after a server restart.