從Docker圖像到幾秒鐘
基礎設施變得不必要地複雜。傳統的容器部署解決方案(例如Kubernetes和ECS)本質上為您提供了需要自己的配置,縮放和網絡的容器,同時在VMS池中運行時,還具有自己的單獨的配置,擴展和網絡。這種間接層的遺留層是由於歷史上比容器更難提供的事實而增長的。
不再。使用VMIFY VM映像以單個命令的形式以秒為單位創建,使您可以消除此遺產間接性,同時使您的基礎架構更簡單,更可靠,更安全。
VMIFY將您的docker圖像拍攝,並在幾秒鐘內將其編譯成最小,安全和完全烘烤的AWS AMIS。
只需一個簡單的命令:
$ vmify hello-world

然後,您可以使用CloudFormation和TerraForm將此AMI作為代碼部署過程集成到現有的基礎架構中。或者,您可以簡單地使用AWS自動化組,EC2 RunInstances API或AWS控制台啟動實例。
VMIFY將Docker映像與機器圖像相結合,將其與超小型內存中的Linux OS結合使用VMIFY NANOOS。這使您的Docker映像可以直接在EC2虛擬硬件上啟動。
VMIFY NANOOS僅由Linux內核和僅重1 MB的超小型內存初始系統組成。它所做的就是為當前機器加載所需的驅動程序,設置一個ACPI守護程序,以反應重新啟動和PowerOff事件,並啟用基於NTP的時鐘同步以防止時鐘漂移。之後,它通過從僅讀取的磁盤分區加載並在限制的Chroot環境中啟動其入口點和CMD來傳遞到您的容器圖像。
由於圖像已經完全備份,因此沒有運行時的配置,也沒有登機碼守護程序。實例立即引導,並保證每次都100%相同。
整個系統的活動部件較少。所有磁盤訪問都是僅讀取的,可確保卷永遠不會修改。寫入由TMPFS覆蓋層處理,並具有可配置數量的交換空間,生活在每個啟動時擦拭的單獨短暫音量。
首先,您需要的全新是IAM用戶,具有以下策略:
{
"Version" : " 2012-10-17 " ,
"Statement" : [
{
"Sid" : " vmify " ,
"Effect" : " Allow " ,
"Action" : [
" ebs:StartSnapshot " ,
" ebs:PutSnapshotBlock " ,
" ebs:CompleteSnapshot " ,
" ec2:DescribeSnapshots " ,
" ec2:RegisterImage "
],
"Resource" : " * "
}
]
}將用戶的憑據添加到~/.aws/credentials中的新[vmify]部分(AWS CLI使用的相同文件):
[vmify]
aws_access_key_id = AKIAXXXXXXXXXXXXXXXX
aws_secret_access_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx最後,確保你有
VMify 0.0.2 Pre-release
From Docker Image to Cloud in Seconds
Usage:
vmify [args] image
AWS credentials are retrieved from the [vmify] profile in ~/.aws/credentials
Examples:
vmify nginx
vmify -d -r=us-east-1 -s:dev.hpet.max-user-freq=64 -s:vm.panic_on_oom=0 nginx:latest
Params:
image The Docker image to compile into an AMI
Args:
-q Quiet mode: only print AWS AMI id upon completion
-t Timings displayed in output
-d Debug output turned on during boot
-b reBoot instead of terminating upon entrypoint exit
-a=arch Arch for the image (x64 or arm64, default: current cpu arch)
-r=region Region in AWS to use (default: us-east-1)
-w=number sWap size (in GiB) to use, 0 to disable swap (default: 1)
-k=args Kernel arguments
-s:key=val Sysctl to set with this value
-h or -? Show this help message
VMIFY與以下AWS區域合作:
af-south-1 , ap-east-1 , ap-northeast-1 , ap-northeast-2 , ap-northeast-3 , ap-south-1 ,
ap-southeast-1 , ap-southeast-2 , ap-southeast-3 , ca-central-1 , eu-central-1 ,
eu-north-1 , eu-south-1 , eu-west-1 , eu-west-2 , eu-west-3 , me-south-1 , sa-east-1 ,
us-east-1 , us-east-2 , us-west-1 , us-west-2
VMIFY創建的AMI與以下實例類型兼容:
t3 , t3a , m6i , m5 , m5a , m5n , m5zn , C6I , c6i , c6a , c5 ,C5A, C5N , c5a ,R5, c5n , r5 , r5b , r5a , r5n
t4g , m6g , c6g , c6gn , r6g