Note: If you cannot find a topic, go to docs.rightscale.com where all RightScale documentation will soon be located. Also, feel free to Chat with us!
Home > Partners > SmartFoxServer > ST and Runbooks > SmartFoxServer 2X Community Edition ServerTemplate

SmartFoxServer 2X Community Edition ServerTemplate

The "SmartFoxServer 2X Community Edition" ServerTemplates (v1 and v2) execute a series of boot scripts at launch to install and pre-configure SmartFoxServer and the underlying operating system.  Additional operational scripts are also available for runtime operations.

Table of Contents

Description and Inputs

The SmartFoxServer 2X Community Edition ServerTemplates (v1 and v2) execute a series of boot scripts at launch to install and pre-configure SmartFoxServer and the underlying operating system.  Version 1 installs SmartFoxServer 2X up to release 2.6.0 and it is compatible with AWS cloud only; version 2 installs release 2.7.0 or later and it is compatible with multiple cloud services. Using v2 ServerTemplate is highly recommended.

These ServerTemplates use several commonly used scripts published by RightScale which are not described here.  The custom-specific scripts are listed below.

Boot Scripts for v1

RightScript: [SFS2X] Linux ulimit updater

Description - Under Linux operating systems, file descriptors are used to abstract not only open files but also socket connections. By default most Linux distributions are set to a maximum of 1024 file descriptors: each time a file is opened or a socket connection is established, one of these descriptors is used. If a SmartFoxServer 2X application receives a lot of traffic it might start complaining with a "Too many open files" error.  This script increases the file descriptors limit to avoid the above error.  It is skipped in case of server reboot.

Required Inputs and Default Settings

  • ULIMIT - The Linux file descriptors limit value to be set (default: 20000)
RightScript:  [SFS2X] SmartFoxServer 2X installer

Description - This script downloads and installs SmartFoxServer 2X Community Edition v2.0.1. Depending on the operating system (32 or 64 bit), the proper SmartFoxServer version is downloaded and installed in the server’s /opt folder.  Additional patches available on the SmartFoxServer website are not included and must be installed running the next script.  This script is skipped in case of server reboot.

Required Inputs and Default Settings

  • S3_SFS_PACKAGE_32  - The SmartFoxServer 2X installation package for Linux 32bit systems (default: the latest official installation package)
  • S3_SFS_PACKAGE_64 - The SmartFoxServer 2X installation package for Linux 64bit systems (default: the latest official installation package)
RightScript:  [SFS2X] SmartFoxServer 2X patch installer

Description - This script downloads and installs the SmartFoxServer 2X 2.6.0 patch, containing new features and bug fixes. Previous versions of the patch are also available in case a specific version of SmartFoxServer 2X should be deployed. For the most updated version of SFS2X please refer to v2 ServerTemplate and its scripts.
All patches are cumulative, so there's no need to install the previous ones to updated SmartFoxServer 2X to the required version.  This script is skipped in case of server reboot.

Required Inputs and Default Settings

  • S3_SFS_PATCH_VERSION - The SmartFoxServer 2X patch version number (default: the latest available version)
RightScript: [SFS2X] SmartFoxServer 2X local IP configurator

Description - This script writes the server’s private IP address to the main SmartFoxServer 2X xml configuration file located at /opt/SmartFoxServer2X/SFS2X/config/server.xml. This is required to allow the clients (for example the Remote Administration Tool) to connect to SmartFoxServer as soon as the server becomes operational.  This script is executed on reboot too, in case this action caused the private IP to change (even if actually this should not happen).

Required Inputs and Default Settings

  • N/A
RightScript: [SFS2X] SmartFoxServer 2X service starter

Description - This script starts the SmartFoxServer 2X service.

Required Inputs and Default Settings

  • N/A

 

Boot Scripts for v2

RightScript: SYS Firewall disable

Disables the iptables firewall on the server, which would prevent external connections to SmartFoxServer in certain clouds environments.

Custom scripts can be added later by the customer to set specific firewall rules.

Required Inputs and Default Settings

  • N/A
RightScript: [SFS2X] Linux ulimit updater

(see v1 RightScript description above)

RightScript:  [SFS2X] SmartFoxServer 2X installer

Description - This script downloads and installs SmartFoxServer 2X Community Edition v2.9.0 64 bit in the server’s /opt folder.  Additional patches available on the SmartFoxServer website are not included and must be installed running the next script.  This script is skipped in case of server reboot.

Required Inputs and Default Settings

  • N/A
RightScript:  [SFS2X] SmartFoxServer 2X patch installer

Description - This script downloads and installs the latest SmartFoxServer 2X patch, containing new features and bug fixes. By default the latest patch in installed, but previous versions (after v2.9.0 anyway) are also available in case a specific version of SmartFoxServer 2X should be deployed.
All patches are cumulative, so there's no need to install the previous ones to updated SmartFoxServer 2X to the required version.  This script is skipped in case of server reboot.

Required Inputs and Default Settings

  • SFS_PATCH_VERSION - The SmartFoxServer 2X patch version number (default: the latest available version)
RightScript: [SFS2X] SmartFoxServer 2X service starter

Description - This script starts the SmartFoxServer 2X service.

Required Inputs and Default Settings

  • N/A

Operational Scripts for v1 and v2

RightScript: [SFS2X] SmartFoxServer 2X service starter

Description - This script starts the SmartFoxServer 2X service.

Required Inputs and Default Settings

  • N/A
RightScript: [SFS2X] SmartFoxServer 2X service restarter

Description - This script restarts a running SmartFoxServer 2X service.

Required Inputs and Default Settings

  • N/A
RightScript: [SFS2X] SmartFoxServer 2X service stopper

Description - This script stops the SmartFoxServer 2X service.

Required Inputs and Default Settings

  • N/A

Decommission Scripts

N/A

 


Common Runbook Operations

The following operations should be performed in order to deploy a server instance featuring SmartFoxServer 2X, using the RightScale management platform. 

Please notice that this runbook is not meant to provide a substantial background of SmartFoxServer features and capabilities: for more informations and detailed documentation please check the links provided in the See Also section below.

Security Group Setup

In order to be able to connect to the SmartFoxServer 2X instance running on your AWS server from any client application (for example the Remote Administration Tool, aka AdminTool), you will need to create a Security Group for each cloud (AWS Region) in which the server will be deployed. The following steps show how to set up a new Security Group; this operation is required only once.

Please notice that the provided settings are valid for the default SmartFoxServer 2X configuration: if you change it after the server is launched, you might need to change the Security Group too.

  1. Go to Clouds -> AWS Region -> EC2 Security Groups.  Click the New button. 
  2. Enter a group name, for example "SmartFoxServer 2X Security Group" and click the Create button.
  3. Using the Add IPs form in the Permissions section, authorize the communication over the default SmartFoxServer port (9933) by entering the following details and clicking the Add button:
    • protocol: TCP
    • ports: 9933..9933
    • IPs: 0.0.0.0/0 (this designates any IP - make sure you change the value in the input field, which is set to 0.0.0.0/32 by default)
  4. Repeat step 3 three more times to open the following ports:
    • 8080 (for BlueBox http-tunnelled connection and AdminTool’s page access)
    • 443 (for License Server communication, in case you purchased a commercial license)
    • 22 (required by the installation script to download the SmartFoxServer 2X installer)
  5. If you plan to use the UDP protocol in your application/game, repeat step 3 selecting UDP in the protocol dropdown.


For more informations on Security Groups, please check this link: EC2 Security Groups

This is not necessary for other cloud services like Rackspace.

Import the ServerTemplate

In order to be able to deploy a SmartFoxserver 2X Community Edition server you need to import one of the two available ServerTemplates (v1 or v2) to your RightScale account from the MultiCloud Marketplace. This operation is required only once. Follow the steps below.

  1. Go to Design -> Library -> ServerTemplates.
  2. Navigate the Application Server category, or enter “smartfoxserver” in the search field.
  3. Click on one of the listed "SmartFoxserver 2X Community Edition" ServerTemplates.
  4. On the template description page, click on the Import button.
  5. Read and accept the End User License Agreement (EULA).

Servers that are launched using ServerTemplates must be launched from the context of a Deployment. 

Add a Server to a Deployment

Server instances must be associated to a Deployment.  

  1. Create a new Deployment.  Go to Manage -> Deployments.  Click New and create a new Deployment.  See Create a New Deployment.
  2. Under the Deployment's name at the top of the page click the Add Server button. Select the cloud where to deploy it and hot the Continue button. See Add a Server to a Deployment for more informations.
  3. Fill out the required fields to add a Server to the Deployment:
    • ServerTemplate - Select the "SmartFoxServer 2X Community Edition" ServerTemplate ("SmartFoxServer" is the publisher) you imported before. Select "SmartFoxServer" in the Publisher dropdown on the left to filter the available ServerTemplates, then move to the Server Details page.
    • Server Name - Provide a nickname for the Server.
    • MultiCloud Image - Select your preferred MultiCloud Image.  If you are unfamiliar with this object, keep the default selection.
    • Instance Type - Select the Instance Type that will be launched.  If you are unfamiliar with this object, keep the default selection.
    • SSH Key - [AWS only] Select an SSH Key that will be used to launch the Server.  If one is not available, you will need to create a new one.  See Create a New SSH Key.
    • Elastic IP - [AWS only] Select an Elastic IP to be assigned the instance, if desired.  This is an optional setting and is not required. It's safe to keep the '-none-' selection.
    • Associate IP at launch - [AWS only] Keep this option checked.
    • Security Groups - [AWS only] Select the Security Group you created previously, for example SmartFoxServer 2X Security Group (see the Security Group Setup paragraph above).
    • Availability Zone - [AWS only] Select a particular zone into which the Server will launch or keep the default selection.
  4. Proceed to server creation confirmation.

Launch the Server

You are now ready to launch the Server.  Click the Launch button next to the Server in the Deployment's Servers tab.  Since you defined the inputs at the Deployment level, you can scroll down the Input Confirmation Screen and click the Launch button.  In a few minutes the Server will become operational.

Access the AdminTool

Once the server status is reported as operational, you can access the AdminTool to make sure you can connect to your SmartFoxServer instance. Follow the steps below.

  1. Copy the public IP address or DNS name of the server and paste it into a browser window.  To locate the IP and DNS Name link for the launched Server, go to the Server's Info tab.
  2. Complete the address adding the 8080 port (e.g. http://youripaddress:8080) and hit the Enter key.  You should now see the SmartFoxServer 2X startup page.  Please notice that the examples listed on this page will not work because they are configured to be run locally by default (127.0.0.1).  Therefore, you will need to change their configuration to the public IP of your server manually.
  3. Click on the AdminTool’s link; once loaded enter the following credentials:
    • host: the server’s public IP address
    • port: 9933
    • username: sfsadmin
    • password: sfsadmin
  4. Click on the Connect button.  If everything is fine you will be able to connect to the SmartFoxServer 2X instance running on your cloud server.

See also

You must to post a comment.
Last modified
06:16, 28 Jul 2014

Tags

Classifications

This page has no classifications.

Announcements

None


© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.