Virtuoso Open-Source Wiki
Virtuoso Open-Source, OpenLink Data Spaces, and OpenLink Ajax Toolkit
Advanced Search
Help?
Location: / Dashboard / Main / VirtInstallationEC2

Virtuoso Universal Server AMI for Amazon EC2 Instantiation Guide

The Virtuoso Universal Server AMI for Amazon EC2 comprises a cloud-based bundle of the following OpenLink and third-party products and services:

Prerequisites

  1. Register for an Amazon Web Services (AWS) account.
  2. Sign up for Amazon S3 and EC2 Web Service.
  3. Obtain your AWS Access Identifiers, Access Key ID, and Secret Access Key.

Instantiating OpenLink Virtuoso in Amazon EC2

Follow the steps below to set up and launch your Virtuoso EC2 AMI instance.

  1. Subscribe to the Virtuoso Universal Server (Cloud Edition) Amazon DevPay service to activate the Virtuoso AMI on your account.



  2. Open the AWS Management Console



    From here, you can see a dashboard showing any current instances you may have running and a menu of various areas to control (instances, AMIs, etc.).

You will need to create a new security group (firewall configuration) for the Virtuoso AMI.

  1. Click on Security Groups at the bottom of the left menu. By default, there is one group called default visible.
  2. Create a new security group (here called openlink) and, in addition to the default port 22/tcp (SSH), allow connections to port 80/tcp (HTTP) and port 8890/tcp (used by Virtuoso).



  3. Save it and return to the dashboard.

Now we need to create an instance of the image.

  1. From the Console, select Launch Instances.
  2. You need to choose an AMI. In the Community AMIs tab, type virtuoso to see the relevant images published by OpenLink
  • Virtuoso Release 6 AMIs
    Edition ID Manifest file
    64-bit   ami-23d0334a     openlink/virtuoso-uim-unisvr-psnl/6.0/x86_64-centos-5.3.manifest.xml  
    32-bit   ami-2fd03346     openlink/virtuoso-uim-unisvr-psnl/6.0/i386-centos-5.3.manifest.xml  

  • Virtuoso Release 5 AMIs
    Edition IDSort in ascending order Manifest file
    64-bit   ami-59628630     openlink/virtuoso-uim-unisvr-psnl/5.0/x86_64-fedora-linux-9.manifest.xml  
    32-bit   ami-c46084ad     openlink/virtuoso-uim-unisvr-psnl/5.0/i686-fedora-linux-9.manifest.xml  

  1. Choose whichever image you prefer, 64-bit (x86_64) or 32-bit (i686) and press Select.



  2. Enter the Number of Instances (normally 1).
  3. Select the Instance Type.
    • Note: The optimal Instance Type will depend on the use for this instance, including the data to be hosted. If you intent to host your own DBpedia, Neurocommons, Bio2RDF instance, see the instructions relevant to the data set before proceeding!
  4. Choose a key-pair or create a new one for the purpose. This will be used as an SSH key to access your instance later.
  5. Select the openlink security group created earlier.
  6. Click the Launch button.



You will see a status page saying your instances are in the process of launching, and the next time you visit the dashboard there will be an appropriate instance visible.



Post-Installation Tasks

Change default passwords

Virtuoso has two system users, dba (for SQL/relational/system-admin tasks) and dav (for WebDAV and ODS), with passwords set by default the same as their usernames. On any live server, it is essential to change these two passwords to something random of your own choosing.

To this end,

  1. Open the location http://your-ec2-instance/conductor/ in a web browser.



  2. Log in as dba/dba



  3. Select System Admin from the menu and then User Accounts from the second level menu.



  4. Click Edit beside the dba user.



  5. Enter replacement passwords in both boxes and press the Save button at the bottom to return to the user-list.

Upgrade Linux

OpenLink Virtuoso Cloud Edition is based on a Linux Fedora and Centos Core linux images which you should also update regularly.

  1. Locate the key created above and run the command —

    chmod 600 MyKeyPair.pem

  2. Connect to the EC2 AMI Server with the command —

    ssh -i MyKeyPair.pem root@your-ec2-instance-cname

  3. The Virtuoso EC2 AMI installation is located in /opt/virtuoso. From this location first run the following commands to shutdown the Virtuoso server instance —

    . ./virtuoso-environment.sh virtuoso-stop.sh

  4. Important Update the Virtuoso EC2 AMI installation to the latest OS and Virtuoso versions with the command —

    yum update

  5. Edit the Virtuoso configuration file /opt/virtuoso/database/virtuoso.ini and set the DefaultHost parameter in the URIQA section to your-ec2-instance-cname (or whatever external cname the instance will be configured to use). This is required for the correct hostname to be picked up when using the ODS and other applications —

    [URIQA] DynamicLocal = 1 DefaultHost = your-ec2-instance-cname:80

  6. The Virtuoso server can then be restarted with the command —

    virtuoso-start.sh

    A complete run should look something like this —

    $ chmod 600 MyKeyPair.pem $ ssh -i MyKeyPair.pem root@ec2-67-202-24-222.compute-1.amazonaws.com The authenticity of host 'ec2-67-202-24-222.compute-1.amazonaws.com (67.202.24.222)' can't be established. RSA key fingerprint is 58:ae:0b:e7:a6:d8:d0:00:4f:ca:22:53:42:d5:e5:22. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ec2-67-202-24-222.compute-1.amazonaws.com,67.202.24.222' (RSA) to the list of known hosts. -bash-3.1# cd /opt/virtuoso/ -bash-3.1# ls bin hosting lib virtuoso-environment.csh vsp database install vad virtuoso-environment.sh -bash-3.1# . ./virtuoso-environment.sh -bash-3.1# virtuoso-stop.sh Shutting down Virtuoso instance in [database] -bash-3.1# yum update Loading "installonlyn" plugin Setting up Update Process Setting up repositories core 100% |=========================| 1.1 kB 00:00 extras 100% |=========================| 1.1 kB 00:00 updates 100% |=========================| 1.2 kB 00:00 virtuoso 100% |=========================| 951 B 00:00 Reading repository metadata in from local files primary.xml.gz 100% |=========================| 1.8 MB 00:01 extras : ################################################## 5699/5699 . . . -bash-3.1# vi database/virtuoso.ini -bash-3.1# virtuoso-start.sh Starting Virtuoso instance in [database] -bash-3.1#

    While you can, and should, keep the whole operating system up to date with this method, you can also upgrade only the Virtuoso components with the command —

    yum update --disablerepo=* --enablerepo=virtuoso

Installing additional VAD application packages

Additional VAD application packages are available for the Virtuoso demo database, documentation and tutorials which can be installed from a yum install as follows:

[root@domU-12-31-39-00-00-61 virtuoso]# yum install virtuoso-vad-doc virtuoso-vad-demo virtuoso-vad-tutorial
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * extras: mirror.trouble-free.net
 * updates: mirrors.cmich.edu
 * base: centos.mbni.med.umich.edu
 * addons: mirror.skiplink.com
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package virtuoso-vad-doc.x86_64 0:6.0.3123-1.20091016 set to be updated
---> Package virtuoso-vad-demo.x86_64 0:6.0.3123-1.20091016 set to be updated
---> Package virtuoso-vad-tutorial.x86_64 0:6.0.3123-1.20091016 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                  Arch      Version                   Repository   Size
================================================================================
Installing:
 virtuoso-vad-doc         x86_64    6.0.3123-1.20091016       virtuoso     64 M
 virtuoso-vad-demo     x86_64     6.0.3123-1.20091016        virtuoso     9.1 M
 virtuoso-vad-tutorial    x86_64    6.0.3123-1.20091016       virtuoso    5.2 M

Transaction Summary
================================================================================
Install      3 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 69 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): virtuoso-vad-tutorial-6.0.3123-1.20091016.x86_64. | 5.2 MB     00:01  
(2/3): virtuoso-vad-demo-6.0.3123-1.20091016.x86_64.rpm         | 9.1 MB     00:00    
(3/3): virtuoso-vad-doc-6.0.3123-1.20091016.x86_64.rpm   |  64 MB     00:04     
--------------------------------------------------------------------------------
Total                                            12 MB/s |  69 MB     00:05     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : virtuoso-vad-doc                                  [1/3] 
  Installing     : virtuoso-vad-demo                                 [2/3]
  Installing     : virtuoso-vad-tutorial                             [3/3] 

Installed: virtuoso-vad-doc.x86_64 0:6.0.3123-1.20091016 virtuoso-vad-demo.x86_64 0:6.0.3123-1.20091016 virtuoso-vad-tutorial.x86_64 0:6.0.3123-1.20091016
Complete!
[root@domU-12-31-39-00-00-61 virtuoso]#

These VAD packages can then be installed by the Virtuoso Conductor UI from the System Admin->Packages tab where they will now be listed as available to install.

Safeguarding Your SPARQL End-point

Important

The following section should be added to the Virtuoso configuration file (/opt/virtuoso/database/virtuoso.ini) to control and safeguard your SPARQL end-point against excessive usage:

[SPARQL]
MaxCacheExpiration         = 1    ; Cache Expiration time in seconds that overrides Sponger's default cache invalidation scheme
ExternalQuerySource        = 1
ExternalXsltSource         = 1
ResultSetMaxRows           = 100000
;DefaultGraph               = http://demo.openlinksw.com/dataspace/person/demo
MaxQueryCostEstimationTime = 10000    ; in seconds
MaxQueryExecutionTime      = 30    ; in seconds
;ImmutableGraphs            = http://unknown:8890/dataspace
;PingService                = http://rpc.pingthesemanticweb.com/
DefaultQuery               = select distinct ?URI ?ObjectType where {?URI a ?ObjectType} limit 50
DeferInferenceRulesInit    = 1  ;  Defer Loading of inference rules at start up

Details about these settings can be found in the Virtuoso Online Documentation in the SPARQL Configuration File section. The "DeferInferenceRulesInit = 1" setting is particularly important when hosting large RDF data sets such as DBpedia, as it defers the load of the inference rules which can take quite some time (up to an hour) during server startup.

Using OpenLink Ajax Toolkit (OAT) Applications from your Virtuoso EC2 AMI instance

Install the OAT VAD package via the Admin UI, and then you can use the URL patterns below within your browser:

Entire OAT Demo Collection  http://your-ec2-instance-cname/oatdemo  
OpenLink Data Explorer  http://your-ec2-instance-cname/ode  
Interactive SPARQL Query Builder (iSPARQL)  http://your-ec2-instance-cname/isparql  
SQL Query Builder (iSQL)  http://your-ec2-instance-cname/qbe  
Forms Builder (for building Meshups based on RDF, SQL, or Web Services Data Sources)  http://your-ec2-instance-cname/formdesigner  
SQL DB Schema Designer (a Visual SQL-RDF Mapper is also on its way!)  http://your-ec2-instance-cname/dbdesigner  
To view the OAT Tree (there are some experimental demos that are not listed in the main demo app)  http://your-ec2-instance-cname/DAV/JS/  

Related Items

CategoryEC2

Powered By Virtuoso