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

沒有留言:

Obsidian 插件介紹:Text Generator

Text Generator 是 Obsidian 的一個插件,它可以根據給定的提示自動生成文本。這個插件使用 GPT-3 語言模型,能夠產生類似人類的文本,非常適合編寫故事、文章、電子郵件和其他類型文本。 主要功能: **生成文本:**根據提示生成各種長度的...