1 Star 1 Fork 0

mojerro/compiler-explorer-infra

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
packer-builder.json 2.19 KB
一键复制 编辑 原始数据 按行查看 历史
mojerro 提交于 2022-09-27 03:12 . update
{
"builders": [
{
"type": "amazon-ebs",
"region": "us-east-1",
"access_key": "{{user `MY_ACCESS_KEY`}}",
"secret_key": "{{user `MY_SECRET_KEY`}}",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "ubuntu/images/*ubuntu-focal-20.04-amd64-server-*",
"root-device-type": "ebs"
},
"owners": ["099720109477"],
"most_recent": true
},
"instance_type": "c5.xlarge",
"ssh_username": "ubuntu",
"ami_name": "compiler-explorer builder packer 20.04 @ {{timestamp}}",
"tags": {"Site": "CompilerExplorer"},
"run_volume_tags": {"Site": "CompilerExplorer"},
"associate_public_ip_address": true,
"iam_instance_profile": "XaniaBlog",
"vpc_id": "vpc-17209172",
"security_group_id": "sg-f53f9f80",
"subnet_id": "subnet-1df1e135",
"ami_block_device_mappings": [
{
"device_name": "/dev/sda1",
"volume_size": 6,
"delete_on_termination": true,
"volume_type": "gp2"
}
],
"launch_block_device_mappings": [
{
"device_name": "/dev/sda1",
"volume_size": 24,
"delete_on_termination": true,
"volume_type": "gp2"
}
]
}
],
"variables": {
"BRANCH": "main",
"MY_ACCESS_KEY": "",
"MY_SECRET_KEY": ""
},
"provisioners": [
{ "type": "file", "source": "packer", "destination": "/home/ubuntu/" },
{
"type": "shell",
"execute_command" : "{{ .Vars }} sudo -E bash '{{ .Path }}'",
"inline": [
"set -euo pipefail",
"while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done",
"export DEBIAN_FRONTEND=noninteractive",
"cp /home/ubuntu/packer/known_hosts /home/ubuntu/.ssh/",
"rm -rf /home/ubuntu/packer",
"apt-get -y update",
"apt-get -y install git",
"git clone -b {{user `BRANCH`}} https://ghproxy.com/https://github.com/compiler-explorer/infra.git /infra",
"cd /infra",
"env PACKER_SETUP=yes bash setup-builder.sh 2>&1 | tee /tmp/setup.log"
]
}
]
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mojerro/compiler-explorer-infra.git
git@gitee.com:mojerro/compiler-explorer-infra.git
mojerro
compiler-explorer-infra
compiler-explorer-infra
main

搜索帮助