Diff for /wikisrc/amazon_ec2.mdwn between versions 1.23 and 1.24

version 1.23, 2011/02/19 04:34:56 version 1.24, 2011/02/19 16:13:13
Line 201  if [ -f etc/rc.d/ec2-init ]; then Line 201  if [ -f etc/rc.d/ec2-init ]; then
 fi  fi
 """]]  """]]
   
 You can then proceed to modifying the system living under */mnt/ec2*, so it can fit your needs (adding custom binaries, packages, etc). When done, build the *NetBSD-AMI.img* ffs image, via [[!template id=man name=makefs section=8]], or **nbmakefs**, from the [toolchain](http://www.netbsd.org/docs/guide/en/chap-build.html#chap-build-tools):  You can then proceed to modifying the system living under */mnt/ec2*, so it can fit your needs (adding custom binaries, packages, etc). When done, build the *NetBSD-AMI.img.gz* ffs image, via [[!template id=man name=makefs section=8]], or **nbmakefs**, from the [toolchain](http://www.netbsd.org/docs/guide/en/chap-build.html#chap-build-tools):
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
 $ makefs -t ffs -B le -s 256m -N /mnt/ec2/etc/ -o density=32k NetBSD-AMI.img /mnt/ec2/   $ makefs -t ffs -B le -s 256m -N /mnt/ec2/etc/ -o density=32k NetBSD-AMI.img /mnt/ec2/ 
Line 218  $ gzip -9n NetBSD-AMI.img Line 218  $ gzip -9n NetBSD-AMI.img
   
 # Upload NetBSD to EC2  # Upload NetBSD to EC2
   
 We must now upload our NetBSD system to EC2. For that, we will have to create a minimalist EC2 instance, to which we will copy our files to construct our snapshots. For that, we will use an Amazon Linux AMI instance.  We must now upload our NetBSD system to EC2. For that, we will have to create a minimalist EC2 instance, to which we will copy our files to construct our snapshots. We will use an Amazon Linux AMI instance.
   
 EC2 being localized in geographical regions, you have to carefully choose the AMI identifier you want to use there. This depends on where you want to execute your instance. Amazon Linux AMI IDs are listed on [the main page](http://aws.amazon.com/amazon-linux-ami/) of the project, by regions. Choose ones backed by EBS.  EC2 being localized in geographical regions, you have to carefully choose the AMI identifier you want to use there. This depends on where you want to execute your instance. Amazon Linux AMI IDs are listed on [the main page](http://aws.amazon.com/amazon-linux-ami/) of the project, by regions. Choose ones backed by EBS.
   
Line 226  The examples listed here assume that the Line 226  The examples listed here assume that the
   
 ## Create an Amazon Linux instance  ## Create an Amazon Linux instance
   
 Creating an instance straightforward. Amazon provides [different types of instances](http://aws.amazon.com/ec2/pricing/), with varying levels of billing and reliability. We will use a [*micro* instance](http://aws.amazon.com/ec2/faqs/#How_much_compute_power_do_Micro_instances_provide); its pricing is almost free.  Creating an instance is straightforward. Amazon provides [different types of instances](http://aws.amazon.com/ec2/pricing/), with varying levels of billing and reliability. We will use a [*micro* instance](http://aws.amazon.com/ec2/faqs/#How_much_compute_power_do_Micro_instances_provide); its pricing is almost free.
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
 $ ec2-run-instances ami-74f0061d -t t1.micro -z us-east-1c -k $EC2_SSH_KEYNAME  $ ec2-run-instances ami-74f0061d -t t1.micro -z us-east-1c -k $EC2_SSH_KEYNAME
Line 281  GROUP           default  Line 281  GROUP           default 
 PERMISSION              default ALLOWS  tcp     22      22      FROM    CIDR    0.0.0.0/0  PERMISSION              default ALLOWS  tcp     22      22      FROM    CIDR    0.0.0.0/0
 """]]  """]]
   
 We can now upload the kernel and the NetBSD disk image created earlier, *NetBSD-AMI.img*, to our instance host:  We can now upload the kernel and the NetBSD disk image created earlier, *NetBSD-AMI.img.gz*, to our instance host:
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
 # Upload kernel to Linux AMI  # Upload kernel to Linux AMI

Removed from v.1.23  
changed lines
  Added in v.1.24


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb