In last couple of weeks I have been working with MikelAngelo capstan team to add a feature 'compose-remote' that allows composing and uploading files to a remote OSv instance with cpiod running.
This feature is aimed to help speed-up creation of OSv AWS immutable amis which right now is extremely slow if one wants to import pre-baked OSv raw image as a snapshot and create an AMI of it. The new idea is that every time user wanted to create final application AMI he/she would create a bootstrap or 'base" AMI (cmdline=''/tools/cpiod.so --prefix /") in a traditional way, start EC2 instance with running cpiod, upload extra files using capstan and take a snapshot and create new AMI which I tested and is much faster. This could be applied to all other cases where uploading to a remote instance makes more sense. The only remaining problem how one set new cmdline. There is a least one way of achieving it. One would bake in cloud-init module in a base AMI and have it set cmdline using httpserver and proper command in user data ec2 start. There are many downsides - it would not work in non cloud-init friendly environments, cloud init is pretty heavy and complicated tool to achieve something so simple and depends on httpserver. Please it does not let me create immutable AMIs with preset cmdline. Here is my idea: create simple new tool - setcmdline.so that would behave like so: - set new cmdline if it is passed non-empty explicit cmdline - set new cmdline from a content of file /cmdline if one present and delete it - do not change cmdline otherwise Now user would use it in one of 2 ways - set cmdline of base AMI like so: - '/tools/cpiod.so --prefix /; /tools/setcmdline.so' and have capstan upload a file /cmdline with appropriate content when uploading all other files - '*/tools/cpiod.so --prefix /; /tools/setcmdline.so "**runscript /run/the_config**"'* Another alternative I toyed with would be to enhance cpiod to handle new 'setcmdline' command but it seems pretty hackish and also requires modification of capstan. What do you think? Waldek -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.