Hello
Looking to build CentOS based micro EC2 instance bootable from Amazon EBS. Want that the image be minimal, so that I can add only the rpms I want.
Despite looking could not find a way to import a CentOS image from scratch or an existing minimal CentOS image that is bootable from EBS. My server must must persist, as I cannot handle issues with a dynamic server, so I want to use a server that can boot from EBS.
Am a EC2 newbie and a follow the instructions kind of a Sys Admin ;-) Please guide me to links, howtos and give experienced advice, in general.
With best regards. Sanjay.
On 01/29/11 12:36 AM, Sanjay Arora wrote:
Hello
Looking to build CentOS based micro EC2 instance bootable from Amazon EBS. Want that the image be minimal, so that I can add only the rpms I want.
Despite looking could not find a way to import a CentOS image from scratch or an existing minimal CentOS image that is bootable from EBS. My server must must persist, as I cannot handle issues with a dynamic server, so I want to use a server that can boot from EBS.
good luck with the persistence part in a cloud. the whole idea of clouds is to distribute your services and separate them from the physical instances. EC2 is *not* a replacement for a conventional static server.
Basically what Mathieu is wishing me luck for ;-)
I want to create a server which I can use while in development stage, use as a main image, copy of which I can instantiate as a base image, build a apache webserver app image or a qmail mail-server image or a workgroup /db / crm image etc......upgrade to an upper instance when I feel the micro instance is too tight a fit for the given use.
I don't have the resources to configure a dynamic ami to my specific requirements everytime. I'd rather create various images, spend some time everyday/week to update them, instantiate a copy of them whenever I need....just so when I save that all updates, changes to configuration etc. persist in that copy of instance.
At this stage, I am just creating my infrastructure, I don't need to run any image 24 hours, just for the period I am working on it. A static server would be the best bet but can't be as cost effective as Amazon....and I am on a shoestring budget.
On Sat, Jan 29, 2011 at 2:51 PM, Mathieu Baudier mbaudier@argeo.org wrote:
physical instances. EC2 is *not* a replacement for a conventional static server.
Could you please elaborate a bit? What do you think should be left on the physical servers? _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Sat, Jan 29, 2011 at 3:35 PM, Sanjay Arora sanjay.k.arora@gmail.com wrote:
Basically what Mathieu is wishing me luck for ;-)
Sorry, it was John!
On Sat, Jan 29, 2011 at 2:23 PM, John R Pierce pierce@hogranch.com wrote:
good luck with the persistence part in a cloud. the whole idea of clouds is to distribute your services and separate them from the physical instances. EC2 is *not* a replacement for a conventional static server.
Well, Data/OS Files have to be stored somewhere....EBS evolved to serve that need...initially Amazon did not support booting off EBS but now I think they do.
This creates an infrastructure for storing servers as well as EBS data volumes. Servers can be updated with patches, hardened. Copy images can be instantiated updated/upgraded and tested...etc.
Why do you say it is not a replacement for a conventional static server...to me it seems it is better...though one will need to handle lags/latencies in data access/persistence as storage is network attached & not direct attached.
Maybe I will gain an insight here...can you please elaborate.
With best regards. Sanjay.
On Sat, Jan 29, 2011 at 12:53:45AM -0800, John R Pierce wrote:
On 01/29/11 12:36 AM, Sanjay Arora wrote:
Hello
Looking to build CentOS based micro EC2 instance bootable from Amazon EBS. Want that the image be minimal, so that I can add only the rpms I want.
Despite looking could not find a way to import a CentOS image from scratch or an existing minimal CentOS image that is bootable from EBS. My server must must persist, as I cannot handle issues with a dynamic server, so I want to use a server that can boot from EBS.
good luck with the persistence part in a cloud. the whole idea of clouds is to distribute your services and separate them from the physical instances. EC2 is *not* a replacement for a conventional static server.
EC2 nowadays *does* have support for static/persistent boot volumes.
-- Pasi
Am 29.01.2011 09:36, schrieb Sanjay Arora:
Looking to build CentOS based micro EC2 instance bootable from Amazon EBS. Want that the image be minimal, so that I can add only the rpms I want.
Despite looking could not find a way to import a CentOS image from scratch or an existing minimal CentOS image that is bootable from EBS. My server must must persist, as I cannot handle issues with a dynamic server, so I want to use a server that can boot from EBS.
Hi Sanjay,
there are plenty of howtos to get centos in the cloud - google is your friend. But one note: since C5.5 you do not need Amazon's kernel+initrd anymore, the Centos shipped xenblk and xennet modules work just fine. And finally amazon ships a thing as "boot kernel" that behaves like pygrub and reads the grub.conf of your image and starts the inside configured kernel.
I had to use this cmdline to make the initrd: KVER=$(uname -a|awk '{print $3}')xen mkinitrd --omit-scsi-modules --with=xennet --with=xenblk --preload=xenblk -f /boot/initrd-${KVER}.img ${KVER}
and my modprobe.conf: alias eth0 xennet alias scsi_hostadapter xenblk
To get an image into the cloud I did: - format a 10GiB file with ext3 - install a minimal centos to it (yum with --installroot option) - put this into S3 as an AMI - start an instance of it - clone this to an EBS file with rsync - make a snapshot of this EBS - convert this snapshot to an EBS AMI - use your EBS instances...
Hth Rainer
In article 4D44212C.6050802@gmx.de, Rainer Traut tr.ml@gmx.de wrote:
I had to use this cmdline to make the initrd: KVER=$(uname -a|awk '{print $3}')xen
Don't need awk: KVER=$(uname -r)xen
Cheers Tony
Am 29.01.2011 15:27, schrieb Tony Mountifield:
In article4D44212C.6050802@gmx.de, Rainer Trauttr.ml@gmx.de wrote:
I had to use this cmdline to make the initrd: KVER=$(uname -a|awk '{print $3}')xen
Don't need awk: KVER=$(uname -r)xen
Thx, Tony. I wrote it at 3am for a presentation that day... :)
On Sat, Jan 29, 2011 at 7:46 PM, Rainer Traut tr.ml@gmx.de wrote:
To get an image into the cloud I did:
- format a 10GiB file with ext3
- install a minimal centos to it (yum with --installroot option)
- put this into S3 as an AMI
- start an instance of it
- clone this to an EBS file with rsync
- make a snapshot of this EBS
- convert this snapshot to an EBS AMI
- use your EBS instances...
Looking exactly for something like this...but more detailed. I have slow dsl...so I would rather use somebody else's centos image to build my own.
Have found many howtos but all seem to be for just for copying some other ami and then reconfiguring it, or else they are too technical for me to dive into.
Found one link http://jeevanullas.in/blog/2010/08/using-boxgrinder-to-build-your-own-ami-fo... which comes nearest to what I want, using a tool called boxgrinder. I'd rather not handcode because I don't really understand the syntax of initrd or grub...I'm more of a user and usually have a tutorial/detailed howto that I follow.
Can anyone tell me about more tools or scripts, that can help automate doing the steps required to build an ec2 ebs bootable instance....or a howto for a dummy.....though I am googling each of Rainer's steps to see if I can get better information individually than I could get on the subject as a single detailed howto.
BTW, should't 2-3 gb be enough for a base minimal install as data would/should go into a separate ebs volume?
Am 29.01.2011 16:32, schrieb Sanjay Arora:
On Sat, Jan 29, 2011 at 7:46 PM, Rainer Trauttr.ml@gmx.de wrote:
To get an image into the cloud I did:
- format a 10GiB file with ext3
- install a minimal centos to it (yum with --installroot option)
- put this into S3 as an AMI
- start an instance of it
- clone this to an EBS file with rsync
- make a snapshot of this EBS
- convert this snapshot to an EBS AMI
- use your EBS instances...
Looking exactly for something like this...but more detailed. I have slow dsl...so I would rather use somebody else's centos image to build my own.
Have found many howtos but all seem to be for just for copying some other ami and then reconfiguring it, or else they are too technical for me to dive into.
For building the image: http://bodgitandscarper.co.uk/category/amazon-ec2/
But as I said I had to use another mkinitrd cmd.
The image will be compressed once you upload it, mine was around 300mb.
Rainer