>> I meant how do *you* specify *the* block storage, I hope you’ll understand when I answer your question by saying “I don’t define any block storage”. Not explicitly. It happens in step 29 below where I select a volume using the AWS console and select “attach” and I then attach it to an instance. I don’t do any explicit device mapping. When I come to script the process below I’ll be able to script device mappings but right now I’m just manually (mostly) trying to make it work.
**** Antti -> would you like me to specify the block storage in a particular way using command line tools, which I can do but do not currently do. If there is a particular outcome you want let me know and I’ll do that. >> i.e. can you post concrete commands (both inside and outside and outside of >> rumprun)? It’s a mess but I’m just being pragmatic trying to get something to work so IO am doing this part manually and partlyu using the AWS console interface. The end goal is once I’ve found a path through it all, then I can write a clean document/script that ties it all together nicely in the optimal way. I won’t go into why it’s such a fiddly pile of goo, but it won’t be in the end when I document and script it. We’re very nearly there. Once step 30 works then hopefully all will be good. What I do right now to get a running EC2 VM is: ** prepare block device for nginx 1: create a 1 GB EBS volume using the AWS console 2: attach the EBS volume to my rump build server 3: format the EBS volume as ext2 with mkfs 4: mount the EBS volume to /mnt/ebs 5: copy into the EBS volume the nginx directory tree that contains the nginx configuration and website files 6: unmount /mnt/ebs 7: from the AWS console, detach the EBS volume from the build server ** build the nginx unikernel 8: clone rumprun from github 9: clone rump-nginx from github 10: modify callmain.c to ensure the hardcoded json is correct 11: move the rump-nginx data and config directories so they are in a single directory tree 12: modify rumpbake.conf to include ext2 file system 13: build rumprun with "build-rr.sh xen” 14: make sure rumptools are on the path 15: switch to the rump-nginx directory 16: RUMPRUN_CC=rumprun-xen-cc make clean 17: RUMPRUN_CC=rumprun-xen-cc make ** prepare block device which will be nginx kernel root block volume 18: create a 1 GB EBS volume using the AWS console 19: attach the EBS volume to my rump build server 20: format the EBS volume as ext4 with mkfs 21: mount the EBS volume to /mnt/ebs 22: run my hacked version of the mirage EC2 script, which installs grub and writes the nginx kernel onto the target EBS volume 23: unmount /mnt/ebs & tune2fs -L ‘/' /dev/xvdf 24: using the AWS console, detach the EBS volume from the build server ** prepare the nginx kernel on AWS for booting 25: using the AWS console, make a snapshot of the nginx kernel root block volume (AMI’s cannot be created from volumes, only from snapshots) 26: using the AWS console, select the snapshot and select “create image” (which means “create AMI”) 27: when creating the AMI, a dialog with many options comes up. Here the AKI (Amazon Kernel Image) must be specified which in this case is aki-880531cd (i.e. 64 bit pvgrub kernel running in AWS us-west-1 region). You have the opportunity at this point to specify additional storage by either defining a snapshot to attach to the AMI or specifying creation of a new, empty EBS device. I don’t add any storage at this point. 28: I launch an instance (i.e. a VM) from the AMI. The instance fails to start because it does not find the expected block device that was configured in hardcoded json. This is expected. I wait till it has shut down. 29: Using the AWS console I attach the ext2fs block device prepared which contains the nginx config files 30: I reboot the instance which then comes up but I have not yet got the kernel to mount the volume attached in step 29
