2020年8月26日 星期三

Packer 101

What is packer?
A:Packer is a free and open source tool for creating golden image for multiple platform from a single source configuration.

  • Packer works works on json files

  • What are on Packer json ?

1.builder(required): Builders are components of packer to create machine image
* type
* iso_url (required)
* iso_checksum (required)
* iso_checksum_type (required)
* ssh_username (optional)
* shutdown_command (optional)
* vm_name (optional)
* guest_os_type (optional)
* disk_size (optional)
* http_directory (optional)
* boot_wait (optional)
* boot_command (optional)
* floppy_file (optional)

there are several type of buildfer

builder 說明
amazon-ebs is able to create Amazon AMIs backed by EBS volumes for use in EC2
docker {
"builders": [{
"type":
"docker",
"image":
"alpine",
"export_path":
"alpine-basic.tar"
}]
}
  1. varaibles (option): such as AWS access and secret key "variables": {
    "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
    "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
    "region": "us-east-1"
    },
    3.provisioners (options)

4.pos-processors(options)
* type
* override
* virtualbox
* output
Packer commands

查看 example.json 結構

packer inspect example.json

驗證 example.json 語法

packer validate example.json

產生 vm image

packer build example.json

沒有留言:

如何下載Facebook 相簿跟影片

影片:透過chrome plug-in : Video Downloader for Facebook<sup>TM</sup> 相簿: 透過chrome plug-in : Tampermonkey 搭配script : Facebo...