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

version 1.23, 2011/02/19 04:34:56 version 1.25, 2011/02/22 22:47:51
Line 101  ftp -a 'http://ftp.netbsd.org/pub/NetBSD Line 101  ftp -a 'http://ftp.netbsd.org/pub/NetBSD
 tar -xzpf src.tar.gz  tar -xzpf src.tar.gz
 cd src  cd src
 # build distribution and kernel  # build distribution and kernel
 ./build.sh -O ../obj -T ../tools -D ../dest -R ../release -m amd64 -U distribution  ./build.sh -O ../obj -T ../tools -D ../dest -R ../release -V INSTALLSETS="base etc" -m amd64 -U distribution
 ./build.sh -O ../obj -T ../tools -m amd64 kernel=XEN3_DOMU  ./build.sh -O ../obj -T ../tools -m amd64 kernel=XEN3_DOMU
 # install distribution in /mnt/ec2  # install distribution in /mnt/ec2
 ./build.sh -O ../obj -T ../tools -D ../dest -R ../release -U install=/mnt/ec2  ./build.sh -O ../obj -T ../tools -D ../dest -R ../release -U install=/mnt/ec2
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.25


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