User Tools

Site Tools


platform:aws

Note: GAMS on Demand on the Amazon Elastic Compute Cloud is currently not available (07/2012)

Using GAMS on the Amazon Elastic Compute Cloud

Introduction

A GAMS on demand system is now available on the Amazon Elastic Computing Cloud (EC2) platform. With GAMS on demand you can run the GAMS/Base system and all solvers which are included for free in the GAMS/Base system on as many machines as you like for as long as you like, without having to purchase new computers or new GAMS licenses. Currently the GAMS on demand system includes these solvers in unlimited versions: GAMS/COIN-OR Solvers (LP/MIP/MINLP/NLP), the GAMS/LOGMIP Solver (MIP/MINLP), the GAMS/MILES Solver (MCP) and GAMS/NLPEC. Usage is charged at an hourly rate, giving you significant new flexibility in the use of GAMS.

GAMS on demand allows you to use the GAMS system on 64-bit Windows and Linux virtual machines (15 GB memory and 4 virtual cores with 2 EC2 Compute Units each).

To use GAMS on demand, you'll need to perform several steps:

  1. Create an Amazon Web Services (AWS) account. All access to GAMS on demand will be done through your Amazon AWS account.
  2. Subscribe to GAMS on demand. There is no fee for this step; it simply adds GAMS on demand as an option on your AWS Management Console.
  3. Each time you wish to use a GAMS on demand machine, you'll need to log in to the AWS Management Console to start an instance. When your machine is ready, you connect to it through an 'ssh' client. When you are done with your session, you will need to return to the AWS Management Console and terminate your machine. You will be charged for the time from when you start the instance to when you terminate your machine.
  4. Start an GAMS on demand system
  5. Optional: Create permanent storage for Windows that will persist when an Instance is deleted
  6. Manage the instance; activate or deactivate. An active instance is charged by the hour

GAMS on demand runs under a Linux or Windows virtual machine (instances) using Amazon Elastic Compute Cloud (EC2). Basic familiarity with Windows and Linux is required to use GAMS on demand, but no prior experience with Amazon EC2 is necessary.

This document illustrates the steps to sign up and run GAMS on demand. Experienced users of Amazon EC2 can modify these steps to fit your specific needs. Please note that when you shut down (=terminate) your virtual machine, your work is not saved.

Sign-up for GAMS on Demand

Please click on this link to sign-up for GAMS on Demand. You have to do this only once; later you can use the following URL: http://aws.amazon.com/console/ to manage your account.

You must sign-up for GAMS on Demand before you will be able to use it even if you already have an Amazon EC2 account. If you are new to Amazon EC2, please follow the instructions to sign up for Amazon EC2; this step requires a credit card and a telephone number you can be reached. You will receive an automated phone call to establish your credentials. The security code seen on the registration page needs to be entered on the phone.

Login to the Management Console

Sign in to the Amazon Web Services (AWS) Management Console for EC2 at http://aws.amazon.com/console/

Windows

  • Select “Launch Instance”
  • Select “Community AMI”
  • A long list will appear with different system configurations. We can quickly search for a GAMS system by entering GAMS in the search field and press the Enter key.
  • Click on “Select” for the Windows platform. (The Linux version will be described later)
  • Select “Extra Large” for the “Instance Type”. Currently this is the only type available for a pre-installed GAMS system.
  • Make sure “Launch Instances” is selected and click on “Continue”. (The option “Request Spot Instances” is not available for a GAMS on demand system)
  • For the options “Kernel ID” and the “RAM Disk ID” leave these fields at “Use Default” and Click “Continue”.
  • Select the option: “Proceed without a Key Pair” and click “Continue”
  • In the next screen, leave “Security Groups” at “default” and click “Continue”.
  • The next screen shows all options selected so far; we can now start the instance with a click on “Launch”. Note that this will start the hourly charge for the machine!
  • Starting of the Instance will take a few minutes. Go back to the console page (http://aws.amazon.com/console/) to see if your instance is running. Wait for the status to change from “pending” to “running”. It may be necessary to click on “Refresh”.
  • After the Instance becomes active, we still need to allow Windows Remote Desktop access to the instance we created:
  • In the Window on the left, select “Security Groups”, and verify that “RDP” is visible in the column “Connection Method”. If this is not the case, select “RDP” in the “Custom…” drop box and click on “Save”.
  • Go back to the Instances page, and copy the IP address to reach the Instance from “Public DNS”. This is the address used in Remote Desktop. An option to retrieve a link and detailed instructions can be found under: “Instance Actions” and select “Connect”.
  • After starting Remote Desktop and copying the IP address, or use the shortcut link you can download connect to your instance.
  • Ignore the certificate warning and connect.
  • Login as user “gams” with password “gams” (without the quotes). Note: when reconnecting to this instance, the user is always set to “Administrator”, change this to gams when logging in.
  • You will be asked to change the password.
  • You should see the Windows Desktop on the remote machine.
  • We can share our local disk drive(s) with the Instance. To do this, Logout from the Instance and edit the Remote Desktop file. * Right mouse click on the file and select “Edit”.
  • Select the tab “Local Resources” and click on “More..” and select the drive(s) you want to share. Go back to the “General” tab and select “Save” to save the changes.
  • When the Instance is started again, verify that the drives from your local machine are now visible on the Instance.

Keep in mind that when you stop an instance, all files created on the Instance will disappear and be lost. So copy those files back to your local computer or create a permanent file storage on the Amazon Cloud.

Linux

To connect to the Linux version of GAMS on Demand, you will need a ssh client on your PC. A popular, free choice for Windows is PuTTY, which can be downloaded here. If you are using PuTTY, you will also need to install PuTTYgen. For Mac OS X and Linux, a basic ssh client is normally installed and can be accessed from the terminal prompt.

  • Start the console using: http://aws.amazon.com/console/ and sign in to the AWS console.
  • Select “Launch Instance”
  • Select “Community AMI”
  • A long list will appear with different system configurations. We can quickly search for a GAMS system by entering GAMS in the search field and press the Enter key.
  • Click on “Select” for the Linux platform
  • Select “Extra Large” for the “Instance Type”. Currently this is the only type available for a pre-installed GAMS system.
  • Make sure “Launch Instances” is selected and click on “Continue”. (The option “Request Spot Instances” is not available for a pre-installed GAMS system)
  • For the options “Kernel ID” and the “RAM Disk ID” leave these fields at “Use Default” and Click “Continue”.
  • A Linux instance requires a key pair for access. If you created a key pair previously, select the pair from the existing Key Pair List. If you never created a key pair or want to create a new pair, proceed as follows:
    • Select “Create a New Key Pair”, enter a name (in this example we use ec2Paul) and select “Create & Download your Key Pair”. You will be prompted to save the file ec2Paul.pem. Make note of the location of the file for later use.
    • Next we need to create a security group for SSH access. Select “Create a new Security Group”.
    • Enter a name, “SSH” and description “SSH ec2 Access”. From the “Select…” drop down box, select SSH and click “Add Rule”. Click “Continue”.
  • Below a screenshot showing the Instance parameters before launching:

  • Click “Launch” to start the Instance; note that this is the moment you will be charged by the hour the instance is active.
  • Starting of the Instance will take a few minutes. Go back to the console page (aws.amazon.com/console/) to see if your instance is running. Wait for the status to change from “pending” to “running”. It may be necessary to click on “Refresh”.
  • Select the running instance to see the “Public DNS” field. This is the machine to connect to.
  • Most Linux distributions will use OpenSSH, so it's easy to connect.
  • Set access permissions for the key pair file “ec2Paul.pem” saved earlier to make it private - this keeps the SSH client happy. From the Linux command prompt, do chmod 600 ec2Paul.pem
  • The login user is root, so we can now connect: ssh -i ec2Paul.pem root@ec2-75-101-177-221.compute-1.amazonaws.com to get access to the machine. It is also possible to access the machine from Windows, but you may have to convert the key pair into a different format, a format understood by the Windows client.

Optional: Create permanent storage on the cloud

  • This storage option is not required to operate GAMS on the Cloud. It can be convenient however when you want to access the Instance from a different computer and have access to your files.
  • First check the “Zone” your instance is running in; the attached disk drive has to run in the same zone.
  • From the management console select “Volumes”.
  • Create a volume size suitable to your requirements, select the zone your instance is running in and click “Create Volume”.
  • On the same screen, Click “Attach volume”, the “Instances” drop down box should contain your instance. Select the “Device” identifier and click “Attach”.
  • Windows
    • After logging in again, you will see the “Initialize Disk Wizard” in the Remote Desktop session click “Ok”.
    • On the taskbar, click Start and run “diskmgmt.msc” to start the disk management console.
    • Right mouse click the new disk and click “Create Volume”, assign one of the available drive letters and click “Ok”. Your new disk drive is now available under “My Computer”; this disk drive will not be destroyed when the “Instance” is deleted. Keep in mind that there is a small charge for such a volume.

Manage the instance; activate or deactivate

An active instance is charged by the hour

  • To see the current running instance, go to the management console:http://aws.amazon.com/console/
  • The right hand side of this window shows the current status:

  • If you no longer need the running instance or the optional storage:
    • Click on “Instances”, select the running Instance and from the drop down list “Instance Actions” select “Terminate”.
    • In a similar fashion you can delete the permanent file storage: Select “Volumes”, select the volume you want to delete and select “Delete”.
  • Click on “EC2 Dashboard” and “Refresh” to make sure there no longer is a running Instance.

Note: GAMS on Demand on the Amazon Elastic Compute Cloud is currently not available (07/2012)

platform/aws.txt · Last modified: 2012/11/19 10:26 by support