Installing WebMO on Amazon Web Services
Amazon Web Services (AWS) services allows one to create virtual machines in Amazon's computing cloud. One can choose the computer type (CPU's, RAM, disk) and OS (linux distros). While this is a commercial service, the cost can be surprisingly low (<$1/day), and even lower if the instance is run only when needed. There are many other advantages, such as zero initial capital cost and no hardware maintenance. We have found cloud computing to be an ideal solution for deploying WebMO and computational chemistry engines, especially for educational purposes.
Setup an AWS account
Create an AWS "root" Account:
Go to aws.amazon.comand click "sign in to console". Next click "create a new AWS account". Provide the requested information. Part of the sign-up procedure involves receiving a phone call and entering a verification code using the phone keypad. You will also need to supply credit card details as part of this step, similar to any amazon service. It could take 24 hours for your AWS account to be activated.
Create and Set-up an IAM Account Alias:
Sign into your AWS root account. In the AWS console click the "services" dropdown menu. Under "Security, Identity, and Compliance" click "IAM". Under "IAM Resources" click "users". Click the Add User button. Enter a User name, select AWS Management Console access, choose Custom password, and enter the initial password, and optionally uncheck Require password reset. Initially select Attach existing policies directly and select AdministratorAccess to provide full access to this user (this can be changed later)
Do not add any Tags
Review the settings, and click the Create User button
Send an email to the new IAM user alerting them to the account creation
Set-up SSH Keys:
In the "Services" dropdown click "EC2". Then click "key pairs". Import your public key from /users/user/.ssh (if none exist use the command ssh-keygen).
Create a Virtual Machine Instance
In the AWS console under the "services" dropdown, select "EC2". Then, select "launch instance".
Under "Choose AMI": select your desired Operating System: Ubuntu 18.04 is well supported as are any of the flavors of Amazon Linux (very similar to Centos)
Under "Choose Instance": select your Instance Type: t2.small or t2.medium are pretty reasonable
Dont Change anything in "configure instance details"
Under "add storage": change size to 10 or 30 GiB
Under "add tags": add a name tag to name your instance
Under "configure security group": If you know your public IP address then enter it in the source field for SSH. Furthermore, add rules for HTTP and HTTPS.
Review and Launch:
You will be prompted to choose the ssh key you wish to use. Use the one associated with your computer.
You will be taken to the instances page. Click on the instance you made. A window will open at the bottom of the screen
Find and Copy the IPv4 Public Address from the Window
open a terminal instance on your computer and type the command ssh ubuntu@publicIP for an ubuntu machine or ec2-user@publicIP for amazon linux where "publicIP" is the IPv4 address you copied. You should now be in your vm instance. Congratulations!
Verifiy SSH Access
Test some unix commands:
(Note: Ctrl-+ or Apple-+ will enlarge the text size in the terminal screen.)
Set a WebMO Administrator Password
In the Developers Console, click the ###.###.###.### link under External IP (near bottom right). In the newly opened tab, navigate to
Log in with the username "admin" and a blank password. Set an administrative password when prompted. Enter your registration information. You are brought to the WebMO administration menu. Since a user was already created and mopac was already installed, simply click Logout.
Access and use WebMO
If a browser tab to your virtual machine is not displayed, click the External IP link for your virtual machine in the Developers Console. Navigate to
<displayed IP address>/webmo
Log in with the username and password you supplied to the installation script. Run a test job.
Shutdown Virtual Machine
When WebMO is not being actively used, you will want to shut it down to avoid incurring CPU usage charges. From the AWS console, select your virtual machine and click "actions" "instance state" "stop".
Note that you still incur disk storage charges ($2/month for 50GB) even if the virtual machine is not running.
Restarting Virtual Machine
From the AWS console, select your virtual machine and click "actions" "instance state" "start".
Eliminating Virtual Machine
From the AWS console, select your virtual machine and click "actions" "instance state" "terminate".
Assuming that one creates a 1 vCPU instance with a 50GB disk, the annual costs are
CPU: $440/year * 70% * 1year = $308
Disk: $2/month * 12 months = $24
TOTAL: $332 for one year of continuous availability (<$1/day!)
If one runs the instance for just one month of the year (e.g., for a computational chemistry lab), then the cost would be
CPU: $440/year * 1 year/12 = $37
Disk: $2/month * 12 months = $24
TOTAL: $61 for one month of use during the year ($2/day for one month!)
Very low-cost configurations can be built, e.g., a f1-micro with a 10 GB disk (runs mopac only):
$49 + $5 = $54 for one year of continuous availability ($0.15 per day!)
$6 + $5 = $11 for one month of use during the year (perfect for low cost computing!)
Alternatively, a research-level configuration could be built, e.g., a 4 vCPU with a 500GB disk for one summer:
CPU: 4cpu * $440cpu/year * 70% * 1year/4 = $308
Disk: $20/month * 3 months = $60
TOTAL: $368 for three months of continuous availability (<$4/day)
CPU usage charges can be significantly lowered by stopping the virtual machine when it is not being used and then restarting the virtual machine when needed. See above.
Disk storage charges can be lowered by snapshotting the disk, deleting the disk, and then restoring the disk from the snapshot when needed.
To access the WebMO administration pages, log into WebMO as username "admin" with the administration password. You can now access the User Manager to add additional users, Job Manager to monitor jobs, Interface Manager to enable other engines (which need to be installed separately), etc.
Adding additional computational engines:
run the commands-
$ ./sitc/install --skip_webmo="true" --skip_update="true" --engines="foo" (where foo is the engine, or engines separated by commas, that you wish to install)
$ ./sitc/scripts/common/enable_in_webmo ./sitc/engines.log /home/webmo/public_html/cgi-bin/webmo/interfaces/
Some engines require a file to be downloaded beforehand. Run
for more information.
Upgrading WebMO to Pro or Enterprise:
Upload the webmo distribution into /home/webmo/download. As the webmo system user:
$ cd WebMO.install
$ find /home/webmo -name globals.int
$ perl upgrade.pl
Have you backed up your present WebMO installation [y/n]:y
Continue with upgrade [y/n]:y
License number: ####-####-####
Do you wish to purge deleted jobs? [y/n]:y
Set up SSH (useful for scp):
$ sudo apt remove openssh-server (Openssh-server may not be there in the first place, if so then an error message will be returned. Ignore it and move to the next step)
$ sudo apt install openssh-server
Then open /etc/ssh/sshd_config with a text editor of your choice. Ensure that the the field of PasswordAuthentication is "yes" and that there is no # in front of it. Add the line "AllowUsers user" to the bottom of the file where "user" is the username you created. Save and quit from the file.run commands-
$ sudo apt install dnsutils
$ dig +short myip.opendns.com @resolver1.opendns.com (shows you the external IP you need in order to ssh/scp to the your linux app)
Other Linux Distributions:
The sitc.tar.gz script supports the following linux distributions on WSL:
- Ubuntu 18.04 LTS