Configuring Faspex to use a remote database can make the application more reponsive
by putting the database and background processes on a separate server from the one
that hosts the Faspex web application. The following instructions describe how to
set up and configure two Faspex servers; ensure that you are performing the
configuration steps on the correct server. The server that runs the database is
referred to as the "database server" and the server that runs the web application is
referred to as the "application server".
If you want to set up a remote database that only runs MySQL, see Configuring Faspex to Use a Remote Database (MySQL Only)
Aspera recommends that you use the database on the server that runs background
processes. The server hosting the application can be remote.
-
Set up two identical Faspex instances on separate servers.
Each Faspex installation creates its own database, but the servers are
configured to only use one.
-
On the application server, point Faspex to the database on the database
server.
Open C:\Program Files [(x86)]\Aspera\Faspex\config\database.yml in a
text editor. Locate the line for host in the
production section and change the value to the
hostname of the database server. Save your changes.
-
On the database server, grant the application server access to the
database.
Run the following commands to run the MySQL command
line:
> mysql -umysql_username -pmysql_password
From
the MySQL command line, allow remote connection to the Faspex database from only
the remote node, and exit the MySQL command
line:
mysql> grant all privileges on faspex.* to root@'ui_server_hostname' identified by 'mysql_password';
mysql> end
These
commands allow connections from the application server to access the
specified database.
-
On the application server, update the secret.yml file.
with the secret.yml file from the database server.
On the application server, backup the C:\Program Files [(x86)]\Aspera\Faspex\config\secret.yml file by
adding the .bak extension to it. Copy the
secret.yml file from the database server to the
application server in the same location as the backup.
-
On both servers, set matching encryption keys.
On both the database server and application server, run the following command
to set the encryption key to the same
value:
> asconfigurator -x ""set_node_data;token_encryption_key,token_key"
The
token_key must be identical on the
servers.
-
On both servers, restart asperacentral and asperanoded.
You can restart the Aspera Central from the Computer
Management window. Go to Control Panel > Administrative Tools >
Computer Management > Services and Applications > Services,
click Aspera Central, and click
Restart.
Go to Control Panel > Administrative Tools >
Computer Management > Services and Applications > Services,
click Aspera NodeD, and click
Restart.
-
On both servers, create the same node username and password.
This must be done after configuring
database.yml and
secret.yml. Run the following
command:
> asnodeadmin -a -u node_username -p node_password -x transfer_username
For
example:
> asnodeadmin -a -u nodeadmin -p XF324cd28 -x faspex
-
In the web application, configure the localhost file server to use the new node
user.
In the Faspex application, go to
Server > File Storage.
Click the arrow for localhost and click
Edit. Enter the
node_username from the previous step in the
Username field and the
node_password in the
Password
field.
Click Update Node to activate your
changes.
-
On both servers, restart Faspex services.
-
On both servers, configure background processes.
On the database node: Disable the application by running the following
command:
> asctl faspex:mongrel:stop
On
the application node: Disable all process but the application by
running the following
commands:
> asctl all:stop
> asctl faspex:mongrel:start
> asctl apache:start
After following these instructions, you have one node
running database and background services, and another node running only the application.