background preloader

EC2

Facebook Twitter

Web Services. Running DirectAdmin On EC2. Running DirectAdmin On Amazon EC2 Linux- Solved! We were able to install DirectAdmin (a Web hosting control panel) on Amazon’s Elastic Compute Cloud, branded as EC2. We would like to share the steps required to build a working instance of DirectAdmin on an Amazon server. First, I would like to personally thank Mark from DirectAdmin for being so accommodating and granting us a trial license.

His help is very much appreciated! Keep in mind that UNIXY‘s truly fully managed server service goes above and beyond. We take business dreams and make them a reality. Before we list the requirements, it is important to note that EC2 instances are Xen Virtual Machines. Here are the requirements: Instance of type LargeLinux CentOS 5 imageOne elastic (which is another word for static) IP address Go ahead and bring up the node as you would normally do. Once logged in as root, go ahead and download the DirectAdmin install tarball: Woaah! # reboot That’s all folks. Starting Amazon EC2 with Mac OS X - Robert Sosinski. Amazon EC2 (Elastic Cloud Compute) is making a lot of buzz in the tech industry, and rightfully so.

With EC2, you can ramp up to a massive server farm in a matter of minutes, while scaling back down to a single server when things calm down. The benefits are obvious, as you only pay for what you need and you have access to more computing power right when you need it. EC2 works on the idea of server instances. You start with building one instance, which only costs 10 cents per hour of operation. 1.7 Ghz Xeon CPU 1.75 GB of RAM 160 GB of local storage 250 MB/s network interface If your first instance gets some heavy traffic, EC2 can build another one automatically for another 10 cents an hour. Getting Started First off, you have to set up your computer so you can connect to and administer your Amazon EC2 account. 1. 2. 3. 4. 5. A PEM encoded X.509 certificate named something like cert-xxxxxxx.pem A PEM encoded RSA private key named something like pk-xxxxxxx.pem 6. What is PEM?

7. 8. 9. 10. 11. Command-Line Tools (ext) The Amazon EC2 command line interface tools (also called the CLI tools) wrap the Amazon EC2 API actions. These tools are written in Java and include shell scripts for both Windows and Linux, OS X, or Unix. Note Alternatively, you can use the AWS Command Line Interface (AWS CLI), which provides commands for a broad set of AWS products, including Amazon EC2. To get started with the AWS CLI, see the AWS Command Line Interface User Guide. For more information about the AWS CLI commands for Amazon EC2, see ec2 in the AWS Command Line Interface Reference. Before you can use the Amazon EC2 CLI tools on your computer or your instance, you must install the tools and set the environment variables used by the tools. Setting Up the Amazon EC2 CLI Tools on Amazon Linux Instances that you launch using an Amazon Linux AMI already include the Amazon EC2 CLI tools. Each time you use the Amazon EC2 CLI tools on your instance, you must provide your identity.

Source ~/.bashrc ec2-describe-regions Important. Generating a key pair (ext) Amazon EC2 uses public–key cryptography to encrypt and decrypt login information. Public–key cryptography uses a public key to encrypt a piece of data, such as a password, then the recipient uses the private key to decrypt the data.

The public and private keys are known as a key pair. To log in to your instance, you must create a key pair, specify the name of the key pair when you launch the instance, and provide the private key when you connect to the instance. Linux instances have no password, and you use a key pair to log in using SSH. Creating a Key Pair You can use Amazon EC2 to create your key pair. Alternatively, you could use a third-party tool and then import the public key to Amazon EC2.

Each key pair requires a name. Amazon EC2 stores the public key only, and you store the private key. The keys that Amazon EC2 uses are 2048-bit SSH-2 RSA keys. Launching and Connecting to Your Instance Note Key Pairs for Multiple Users Creating Your Key Pair Using Amazon EC2 $ ssh-keygen -y. SSHing into EC2 server. Создаём VPN-сервер в Amazon EC2.

Вступление. Создание Instance в Amazon EC2. Настройка DynDNS. Напоминаем, что все действия, описанные в статье, пользователь делает на свой страх и риск. Материал приведен исключительно в ознакомительных целях. ⇡#Вступление В этой статье будет достаточно подробно рассмотрено создание собственного VPN-сервера в облачной платформе Amazon Elastic Compute Cloud. У продвинутых пользователей наверняка возникнет один резонный вопрос. Идея поднятия VPN-сервера в Amazon EC2, мягко говоря, не нова. Итак, нам понадобятся следующие вещи: действующая банковская карта хотя бы с тремя долларами на счету, клиенты PuTTY и PuTTYgen с этого сайта, учетные записи в Amazon и DynDNS, а также немного свободного времени. ⇡#Создаём instance в Amazon EC2 Для начала входим в свой аккаунт на Amazon и переходим в консоль EC2.

Возвращаемся в консоль EC2. На первом этапе нам предлагается выбрать Amazon Machine Image (AMI), этакий виртуальный образ диска с ОС. Выбираем в Instance Type пункт Micro (t1.micro). Sudo -s exit. EC2 - Elastic Comput Cloud. Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud. It is designed to make web-scale computing easier for developers. Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment. Amazon EC2 reduces the time required to obtain and boot new server instances to minutes, allowing you to quickly scale capacity, both up and down, as your computing requirements change. Amazon EC2 changes the economics of computing by allowing you to pay only for capacity that you actually use.

Introduction to Amazon EC2 (4:01) Amazon EC2 enables you to increase or decrease capacity within minutes, not hours or days. You have complete control of your instances. You have the choice of multiple instance types, operating systems, and software packages. Machine Images (AMIs) Creating an AMI (ext) An Amazon Machine Image (AMI) provides the information required to launch an instance, which is a virtual server in the cloud. You specify an AMI when you launch an instance, and you can launch as many instances from the AMI as you need. An AMI includes the following: A template for the root volume for the instance (for example, an operating system, an application server, and applications)Launch permissions that control which AWS accounts can use the AMI to launch instancesA block device mapping that specifies the volumes to attach to the instance when it's launched The following diagram summarizes the AMI lifecycle. You can search for an AMI that meets the criteria for your instance.

When you are connected to an instance, you can use it just like you use any other server. You can customize the instance that you launch from a public AMI and then save that configuration as a custom AMI for your own use. To create an Amazon EBS-backed AMI, see Creating an Amazon EBS-Backed Linux AMI. VM Import. VM Import/Export enables you to easily import virtual machine images from your existing environment to Amazon EC2 instances and export them back to your on-premises environment.

This offering allows you to leverage your existing investments in the virtual machines that you have built to meet your IT security, configuration management, and compliance requirements by bringing those virtual machines into Amazon EC2 as ready-to-use instances. You can also export imported instances back to your on-premises virtualization infrastructure, allowing you to deploy workloads across your IT infrastructure.

VM Import/Export is available at no additional charge beyond standard usage charges for Amazon EC2 and Amazon S3. To import your images, use the AWS CLI or other developer tools to import a virtual machine (VM) image from your VMware environment. If you use the VMware vSphere virtualization platform, you can also use the AWS Management Portal for vCenter to import your VM. Creating a new EC2 AMI from within VMware or from VMDK files – UK Ruby on Rails, Exalead, AWS, Consultancy. Update: Amazon have now added a VM Import feature that takes care of converting VMWare VMDK images into EC2 AMIs - check it out as it may work for you!

I've used VMware for many years to allow me to test and develop various server configurations and distributions. It's where I played with Linux-VServer, User Mode Linux (UML), Kernel Based Virtual Machine (KVM) and Xen. The relevent part to EC2 here is obviously that EC2 is also Xen based. So far when using EC2 I've stood on the shoulders of giants and taken existing AMIs and used them as they are or with modification. Always the control freak, I wanted to create my own AMI from scratch. Having slimmed down my hardware inventory (I got complaints about the various half built towers lying around!) Creating the AMI from VMware was easier than I thought - but just in case anyone else is looking to do it then I thought it worthy of a blog post. Converting VMDK files for use on EC2 Basic usage is: qemu-img convert -O raw input.vmdk output.raw. Troubleshooting ec2-bundle-vol errors.

This article explains how to resolve some of the common errors that you may encounter when bundling an AMI ( Amazon Machine Image) of an AWS EC2 instance. It is indeed a very good practice bundling your AMI frequently as the latest updates of your app gets stored directly to S3. So even if your instance gets crashed you can launch another instance of your latest ami and get your site back live in minutes!. But bundling can be a big hassle if we get stuck with rsync errors during the process. There are quite a few cases where rsync fails during bundling. 1) No space left on the device This usually happens when we specify the size of the / partition with the -s parameter that specifies size, in MB of the image file to create. 2) Size of /tmp By Default ec2-bundle-vol will try to bundle the image in /tmp. 3) rsync warning: some files vanished before they could be transferred. Partitioning with fdisk. This section shows you how to actually partition your hard drive with the fdisk utility.

Linux allows only 4 primary partitions. You can have a much larger number of logical partitions by sub-dividing one of the primary partitions. Only one of the primary partitions can be sub-divided. Examples: Four primary partitions (see Section 5.2) Mixed primary and logical partitions (see Section 5.3) 5.1. fdisk usage fdisk is started by typing (as root) fdisk device at the command prompt. device might be something like /dev/hda or /dev/sda (see Section 2.1.1).

P print the partition table n create a new partition d delete a partition q quit without saving changes w write the new partition table and exit Changes you make to the partition table do not take effect until you issue the write (w) command. 5.2. The overview: Decide on the size of your swap space (see Section 4.4) and where it ought to go (see Section 4.4.3). Example: Side topics: 5.3. First I figure out how many partitions I want. 5.4. Table 7. Creating an EBS Backed AMI. There are tons of instructions out there on how to create an EBS backed images. Most of them don’t work for me because they are either out dated or the person’s instructions for copying the file structure doesn’t work. I finally found instructions though that do work. So here is how I did it: 1) Start Up an Instance The first thing I do is start up an instance. Everyone has instructions on how to do this from the command line.

But I’m lazy and find that Amazon’s API tools change regularly which is annoying and makes it difficult to follow the instructions other people have written. Go to EC2 in the AWS Console. Once the server is up and running, I update everything, configure it, transfer data onto it, blah blah blah. 2) Create a New EBS Volume The next thing I do is create an EBS Volume, again doing it in the AWS Console.

First that the volume is large enough to hold everything. Second that the volume is in the same availability zone as the instance you started up in step 1. Creating an EBS boot image from instance-store AMI - Thomas Jaehnel. When I started experimenting with Amazon's ec2 I ran into the issue that I wanted to test on the cheapest instance type possible, which is t1.micro but does not support instance-store AMI images. Since a lot of prepacked images are available only as instance-store images, it's a lot easier to start from one of those than to roll your own from scratch.

To convert an instance-store image into an EBS backed AMI you need to perform the following steps: Boot up an instance-store AMIec2run ami-xxx create a volume big enough to hold your root partitionec2addvol -s X -z <zone> The zone has to be the same as the current intance attach the volume to the instanceec2attvol vol-xxx -i <intance> -d /dev/sdd create a file system log into your instance andmkfs.ext3 /dev/sdd mount the diskmount /dev/sdd /ebs copy the root partition over to the volume Install cpipe if unavailabletar cpS / | cpipe -vt -b 1024 | tar xpS -C /ebs detach the volumeec2detvol vol-xxx.

How to build your own S3- and EBS-backed instances. Converting S3-backed AMI to EBS-backed AMI. The recent introduction of Boot From EBS for EC2 opens up a lot of new possibilities. But there are some bootstrapping issues to deal with. There aren't many EBS-backed AMI's available yet and, given the rather complex process involved in porting them, it may take a while for them to show up. This article will walk through the process of converting a popular S3-based AMI to an EBS-backed AMI. I don't guarantee that this is the best process and I certainly wouldn't recommend that anyone use the resulting EBS-backed AMI for anything other than testing and further development, but it puts a stake in the ground regarding a potential process.

I'm sure I will hear about the shortcomings and possible improvements! As a starting point, I'm going to use one of Eric Hammond's excellent Ubuntu AMI's. Ami-eef61587 alestic-64/ubuntu-9.04-jaunty-base-64-20091011.manifest.xml This same basic process should work for other Linux-based AMI's. Safe Use of Shared AMIs (ext) Features. Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud.

It is designed to make web-scale computing easier for developers. Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment. Amazon EC2 reduces the time required to obtain and boot new server instances to minutes, allowing you to quickly scale capacity, both up and down, as your computing requirements change. Amazon EC2 changes the economics of computing by allowing you to pay only for capacity that you actually use. Amazon EC2 provides developers the tools to build failure resilient applications and isolate themselves from common failure scenarios. Introduction to Amazon EC2 (4:01) Amazon EC2 enables you to increase or decrease capacity within minutes, not hours or days. Pricing. Instance Purchasing Options. Spot Instances.

Running Red Hat Enterprise Linux.