Skip to content

Latest commit

 

History

History
212 lines (121 loc) · 7.04 KB

amazon.rst

File metadata and controls

212 lines (121 loc) · 7.04 KB

Building OpenMDAO-ready Machines on Amazon EC2

Building OpenMDAO-ready machines on Amazon EC2 can be daunting. Here is a checklist to make the process a little bit less difficult.

  • Log in to Amazon Web Services under the openmdao account.

    Enter your own username and password. If you don't HAVE a username or password, contact Keith or Justin to make an account for you. If you don't have a copy of lovejoykey.pem, get one from a team member or download it from the EC2 site.

  • Start an instance

    1. From the EC2 Dashboard-->Instances, click the Launch Instance button.

    2. When the Request Instances Wizard comes up, choose the Quick Start tab to get to Amazon-approved Windows AMIs (Amazon Machine Images). Choose the Windows version that suits you. (For Linux, look in Community AMIs for something other than SUSE; we use Ubuntu.)

    3. Choose the instance type.

      For 64-bit OS, choose Large (m1.large).

      For 32-bit OS, choose High-CPU Medium (c1.medium).

    4. On the next page of Instance Details, leave everything at the default setting except: "check the box to enable Termination Protection."

    5. Next, give the machine a name that will help you identify it (using OS, architecture, etc.)

    6. On the next page, choose lovejoykey from the existing key pairs.

    7. On the next page, choose Windows security group if you're standing up a Windows box; otherwise, choose the default group.

    8. Review your settings and click LAUNCH. Now the VM you've created will be up and running, and you can configure it for OpenMDAO.

WINDOWS

If you did a test install of OpenMDAO, get rid of any .openmdao dir. Make sure that neither account's home directory contains a .openmdao directory.

LINUX

On Linux, things are much easier. At the very start, you'll launch an instance of a machine. Once that instance is launched and configured properly, then you'll save an image of that machine. From then on out, you'll be able to spawn a bunch of instances from that one machine image.

  • So to start, simply choose the appropriate Linux distribution (Ubuntu Meerkat or Narwhal, in our case); the architecture (32- or 64-bit); and go.

  • Once the instance is up and running, select its checkbox and choose connect from the options menu to get the address.

    Connecting from the command line is much simpler because SSH is already up and running on these machines. The superuser name on these machines is ubuntu. Simply type the following (in a place where you can see the lovejoykey.pem):

    ssh -i lovejoykey.pem ubuntu@<instance name with dashed numbers>.compute-1.amazonaws.com
    
  • Once you have SSHed into the machine, do the following:

    sudo apt-get update
    sudo apt-get install git
    sudo apt-get install gcc
    sudo apt-get install gfortran
    sudo apt-get install python-numpy
    sudo apt-get install python-scipy
    sudo apt-get install python-matplotlib
    sudo apt-get install python-dev
    sudo apt-get install chromium-browser (or just dnld & install on Win)
    sudo apt-get install firefox
    
  • Unprivileged user:

    sudo adduser openmdao
    

    (Use password as defined in the password file.)

  • Once the user exists:

    1. Create a .ssh dir in openmdao home dir
    2. Copy the authorized_keys file over from root dir
    3. chown [??? check with Keith] the file and the .ssh folder over to openmdao
  • .openmdao dir:

    Make sure that neither account contains a .openmdao directory

  • Making an AMI image from an instance is the next and final step.

    An AMI is a machine image from which many instances can be spawned. Machine images can be public or private, but they are private by default.

    • In the Instances screen, check the box next to the desired image, then choose Make Amazon Machine Image (AMI).
    • Be sure to give the image a descriptive name, like Windows2008_64bit_py27_OpenMDAO.
    • After waiting a bit, you'll finally have an image from which you can spawn multiple instances. Good luck.