Run Nexus OSS 2.0.1 on Amazon EC2: Here’s an AMI


March 9, 2012 By Tim O'Brien

We cut an simple EC2 image with Nexus OSS 2.0.1 running on Ubuntu 2.0.1. If you are thinking about adopting a repository manager, Nexus OSS is often the first step in this journey. While most of our audience downloads Nexus to a workstation to try it out, several of you have asked for EC2 images over the past few years. Here’s a video that demonstrates how you can use a pre-made EC2 image that automatically starts Nexus and makes is possible to get up and running in minutes.

To use this image:

  1. Sign into your AWS Management Console.
  2. Click on the EC2 tab.
  3. Click on Launch Instance.
  4. Select the Classic Wizard and click Continue.
  5. When selecting an AMI, click on Community AMIs and then search for “sonatype”. This search tends to take a minute (or longer).
  6. Once the search is complete, you should see an AMI with the following identifiers (select this AMI):
    • AMI ID: ami-14aa727d
    • Manifest ID: sonatype-nexus-2.0.1-ubuntu-10
  7. We recommend running Nexus on an m1.small instance (or higher).
  8. There is no special configuration other than the security group…
  9. Make sure that the Security Group for this instance allows inbound TCP on ports: 80, 22, and 8081.
  10. That’s it. Launch the instance.

Once you’ve launched the instance, it takes about 3-4 minutes for the instance to startup. Copy the public hostname and go to “http://:8081/nexus” in a browser. Login with the default administrator credentials: admin/admin123.

This instance has had as little customization as possible. It is a stock Ubuntu 11.10 instance, Nexus is installed in /opt, there is a Nexus user, and Nexus is configured to startup automatically. There has been no effort to secure or lock down this machine.

If you do end up depending on this image as a foundation for your own production instance of Nexus OSS you will likely want to do three things:

  • Change the default password for Nexus (that’s a must).
  • Secure the machine. Whether this means locking down inbound and outbound access with a firewall or putting the machine on an Amazon managed VPN, this is entirely up to you. Just understand that you are on your own when it comes to instance security – we’re just publishing a template.
  • Mount an EBS volume and move /opt/sonatype-work to it. This machine doesn’t have much space to work with, and the storage that comes with an instance (on /mnt) isn’t the most reliable storage around. With an EBS volume you’ll get something you can take a nightly snapshot of and a volume that will survive instance termination.

That’s it for now, if you find this useful, please let us know. We’d like to make it as easy as possible for people to start using a repository manager and this is part of that overall effort.

  • Jamie

    “running on Ubuntu 2.0.1″ 

    Typo?

  • Ronen Perez

    cannot find the image. was it deleted/

    • http://www.discursive.com Tim O’Brien

      Nope it’s still there, but it looks like the AMI ID changed.  New info:

      Once the search is complete, you should see an AMI with the following identifiers (select this AMI):AMI ID: ami-14aa727dManifest ID: sonatype-nexus-2.0.1-ubuntu-10

  • thomas fuller

    I’ve been having a fairly difficult time getting the instance to boot properly and I’m following the instructions as described here. The problem appears in the Status Checks — only 1/2 has passed.

    All I see in the logs that stands out as a potential problem is:

    EXT3-fs: sda1: couldn’t mount because of unsupported optional features (240).
    EXT2-fs: sda1: couldn’t mount because of unsupported optional features (240).
    Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(8,1)
    Linux version 2.6.16-xenU (builder@xenbat.amazonsa) (gcc version 4.0.1 20050727 (Red Hat 4.0.1-5)) #1 SMP Mon May 28 03:41:49 SAST 2007

    Has anyone else encountered this problem?

    Thanks,

    Tom

    • http://techprepper.com TechPrepper

      Thomas, I too am getting the same problem.  The instance won’t boot for me either and the reported Status Checks for me is also 1/2.  Did you solve the issue yet?

      • mlabour

        Thomas/ Rodney, I am getting the exact same issue. Please did you guys find a solution? Thank you for your help
        Rebooting did not help. I am still seeing
        EXT3-fs: sda1: couldn’t mount because of unsupported optional features (240).EXT2-fs: sda1: couldn’t mount because of unsupported optional features (240).
        Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(8,1)
        Linux version 2.6.16-xenU (root@ip-10-204-118-8) (gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)) #14 SMP Wed Nov 23 08:48:06 EST 2011

        • Eric Evans

          I’m getting exactly the same problem as well. I also tried rebooting, as well as stopping/starting.

          I guess I’ll have to roll my own AMI…

    • Crash

      I ran into the same issue:

      EXT3-fs: sda1: couldn’t mount because of unsupported optional features (240).
      EXT2-fs: sda1: couldn’t mount because of unsupported optional features (240).
      Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(8,1)

      We followed the instructions by the letter. Unfortunately no solution is described here. I hope this saves some time to the next people trying to use this image.

  • Matt Senter

    Is this still supported? It doesn’t seem to work.