在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:packer开源软件地址:https://gitee.com/mirrors/packer开源软件介绍:PackerPacker is a tool for building identical machine images for multiple platformsfrom a single source configuration. Packer is lightweight, runs on every major operating system, and is highlyperformant, creating machine images for multiple platforms in parallel. Packercomes out of the box with support for many platforms, the full list of which canbe found at https://www.packer.io/docs/builders. Support for other platforms can be added via plugins. The images that Packer creates can easily be turned intoVagrant boxes. Quick StartNote: There is a greatintroduction and getting started guidefor those with a bit more patience. Otherwise, the quick start belowwill get you up and running quickly, at the sacrifice of not explaining somekey points. First, download a pre-built Packerbinary for your operating system orcompile Packeryourself. After Packer is installed, create your first template, which tells Packerwhat platforms to build images for and how you want to build them. In ourcase, we'll create a simple AMI that has Redis pre-installed. Save this file as variable "access_key" { type = string default = "${env("AWS_ACCESS_KEY_ID")}"}variable "secret_key" { type = string default = "${env("AWS_SECRET_ACCESS_KEY")}" sensitive = true}locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") }source "amazon-ebs" "quick-start" { access_key = "${var.access_key}" ami_name = "packer-example ${local.timestamp}" instance_type = "t2.micro" region = "us-east-1" secret_key = "${var.secret_key}" source_ami = "ami-af22d9b9" ssh_username = "ubuntu"}build { sources = ["source.amazon-ebs.quick-start"]} Next, tell Packer to build the image: $ packer build quick-start.pkr.hcl... Packer will build an AMI according to the "quick-start" template. The AMIwill be available in your AWS account. To delete the AMI, you must manuallydelete it using the AWS console. Packerbuilds your images, it does not manage their lifecycle. Where they go, howthey're run, etc., is up to you. DocumentationComprehensive documentation is viewable on the Packer website at https://www.packer.io/docs. Contributing to PackerSeeCONTRIBUTING.mdfor best practices and instructions on setting up your development environmentto work on Packer. Unmaintained PluginsAs contributors' circumstances change, development on a community maintainedplugin can slow. When this happens, HashiCorp may use GitHub's option to archive theplugin’s repository, to clearly signal the plugin's status to users. What does unmaintained mean?
If you are interested in maintaining an unmaintained or archived plugin, please reach out to us at [email protected]. |
请发表评论