Creating an Amazon Machine Picture

Creating an Amazon Machine Picture (AMI) makes it quick and ordinary to rebuild a specific EC2 setup. This postbode illustrates the process by creating an AMI with ethminer and NVIDIA GPU drivers. Of course you’d never use this for mining Ether because the hardware costs are still too high!

Spin Up an Example

Very first we’ll need to create an EC2 example. We’ll request a g2.2xlarge spot example with the Ubuntu 16.04 base AMI. Once the request has bot fulfilled and the example is active wij can connect via SSH.

Now the joy embarks.

Installing Prerequisites

Update the APT cache.

Install make , gcc and the kernel header files. We’ll need thesis to build the NVIDIA driver.

Installing NVIDIA Driver

Download the NVIDIA drivers and run the installer.

Accept the license conditions. There will be a duo of warnings, which you can securely overlook. Choose to run nvidia-xconfig . When the installer has finished, reboot.

Obviously your connection will be cracked during the reboot, so reconnect. Check that the drivers are installed and a GPU detected.

Install ethminer

Next we’ll install ethminer . Wij could build it from source, but there’s a precompiled binary available too, so let’s go with that.

Unpack and budge the binary into a location on the execution path.

Check that it works.

Clean Up

Before wij create the AMI, quickly clean up the ubuntu huis folder. No sense te leaving cruft lounging around.

Create the AMI

The process of creating an AMI takes place on the EC2 instrumentenbord, so head back there ter your browser.

  1. Select Instances from the menukaart on the left and choose the example that we’ve bot working on.
  2. From the Deeds dropdown, select Photo and then Create Picture.
  3. Give it a suitable name and description.
  1. Select AMIs from the spijskaart on the left. The freshly created AMI should now be listed.
  2. At this stage you can securely terminate the example we’ve bot working on.

You can now lightly create fresh EC2 instances provisioned with this freshly minted AMI.

Going Public

Unless you specifically wany to keep your shiny fresh AMI to yourself, you most likely want to make it publicly accessible.

  1. Select AMIs from the spijskaart on the left. Choose your fresh AMI.
  2. From the Deeds dropdown, select Modify Picture Permissions.
  3. Switch the radio button from Private to Public.
  4. Press Save .

Share it with your friends. Bask te the warm glow of making other people’s lives lighter.

One thing to note: AWS will create a snapshot for this AMI and you will be billed for storage of this snapshot. It’s not prohibitively expensive, but it’s also not free.

Leave a Reply

Your email address will not be published. Required fields are marked *