summaryrefslogtreecommitdiff
path: root/contrib/cirrus/packer/libpod_images.json
blob: 9dac3e8ea52862e21a7353303e84a5d216521c10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
{
  "variables": {
    "FEDORA_CNI_COMMIT": "{{env `FEDORA_CNI_COMMIT`}}",
    "CNI_COMMIT": "{{env `CNI_COMMIT`}}",
    "CRIO_COMMIT": "{{env `CRIO_COMMIT`}}",
    "CRIU_COMMIT": "{{env `CRIU_COMMIT`}}",
    "RUNC_COMMIT": "{{env `RUNC_COMMIT`}}",

    "CENTOS_BASE_IMAGE": "{{env `CENTOS_BASE_IMAGE`}}" ,
    "UBUNTU_BASE_IMAGE": "{{env `UBUNTU_BASE_IMAGE`}}",
    "FEDORA_BASE_IMAGE": "{{env `FEDORA_BASE_IMAGE`}}",
    "RHEL_BASE_IMAGE": "{{env `RHEL_BASE_IMAGE`}}",

    "GOSRC": "{{env `GOSRC`}}",
    "PACKER_BASE": "{{env `PACKER_BASE`}}",
    "SCRIPT_BASE": "{{env `SCRIPT_BASE`}}",

    "SERVICE_ACCOUNT": "{{env `SERVICE_ACCOUNT`}}",
    "GCP_PROJECT_ID": "{{env `GCP_PROJECT_ID`}}",
    "BUILT_IMAGE_SUFFIX": "{{env `BUILT_IMAGE_SUFFIX`}}",
    "GCE_SSH_USERNAME": "{{env `GCE_SSH_USERNAME`}}",
    "RHSM_COMMAND": "{{env `RHSM_COMMAND`}}"
  },
  "sensitive-variables": [
    "GCP_PROJECT_ID", "SERVICE_ACCOUNT", "GCE_SSH_USERNAME", "RHSM_COMMAND"
  ],
  "builders": [
    {
      "name": "rhel-7",
      "type": "googlecompute",
      "project_id": "{{user `GCP_PROJECT_ID`}}",
      "zone": "us-central1-a",
      "source_image": "{{user `RHEL_BASE_IMAGE`}}",
      "image_name": "{{user `RHEL_BASE_IMAGE`}}{{user `BUILT_IMAGE_SUFFIX`}}",
      "image_family": "{{user `RHEL_BASE_IMAGE`}}-libpod",
      "service_account_email": "{{user `SERVICE_ACCOUNT`}}",
      "communicator": "ssh",
      "ssh_username": "ec2-user",
      "ssh_pty": "true"
    },{
      "name": "centos-7",
      "type": "googlecompute",
      "project_id": "{{user `GCP_PROJECT_ID`}}",
      "zone": "us-central1-a",
      "source_image": "{{user `CENTOS_BASE_IMAGE`}}",
      "image_name": "{{user `CENTOS_BASE_IMAGE`}}{{user `BUILT_IMAGE_SUFFIX`}}",
      "image_family": "{{user `CENTOS_BASE_IMAGE`}}-libpod",
      "service_account_email": "{{user `SERVICE_ACCOUNT`}}",
      "communicator": "ssh",
      "ssh_username": "{{user `GCE_SSH_USERNAME`}}",
      "ssh_pty": "true"
    },{
      "name": "fedora-28",
      "type": "googlecompute",
      "project_id": "{{user `GCP_PROJECT_ID`}}",
      "zone": "us-central1-a",
      "source_image": "{{user `FEDORA_BASE_IMAGE`}}",
      "image_name": "{{user `FEDORA_BASE_IMAGE`}}{{user `BUILT_IMAGE_SUFFIX`}}",
      "image_family": "{{user `FEDORA_BASE_IMAGE`}}-libpod",
      "service_account_email": "{{user `SERVICE_ACCOUNT`}}",
      "communicator": "ssh",
      "ssh_username": "fedora",
      "ssh_pty": "true"
    },{
      "name": "ubuntu-18",
      "type": "googlecompute",
      "project_id": "{{user `GCP_PROJECT_ID`}}",
      "zone": "us-central1-a",
      "source_image": "{{user `UBUNTU_BASE_IMAGE`}}",
      "image_name": "{{user `UBUNTU_BASE_IMAGE`}}{{user `BUILT_IMAGE_SUFFIX`}}",
      "image_family": "{{user `UBUNTU_BASE_IMAGE`}}-libpod",
      "service_account_email": "{{user `SERVICE_ACCOUNT`}}",
      "communicator": "ssh",
      "ssh_username": "{{user `GCE_SSH_USERNAME`}}",
      "ssh_pty": "true"
    }
  ],
  "provisioners": [
    {
      "type": "file",
      "source": "{{user `GOSRC`}}",
      "destination": "/tmp/libpod"
    },{
      "type": "shell",
      "only": ["rhel-7"],
      "script": "{{user `GOSRC`}}/{{user `PACKER_BASE`}}/rhel_setup.sh",
      "environment_vars": [
        "SCRIPT_BASE={{user `SCRIPT_BASE`}}",
        "CNI_COMMIT={{user `CNI_COMMIT`}}",
        "CRIO_COMMIT={{user `CRIO_COMMIT`}}",
        "CRIU_COMMIT={{user `CRIU_COMMIT`}}",
        "RUNC_COMMIT={{user `RUNC_COMMIT`}}",
        "RHSM_COMMAND={{user `RHSM_COMMAND`}}"
      ]
    },{
      "type": "shell",
      "only": ["centos-7"],
      "script": "{{user `GOSRC`}}/{{user `PACKER_BASE`}}/centos_setup.sh",
      "environment_vars": [
        "SCRIPT_BASE={{user `SCRIPT_BASE`}}",
        "CNI_COMMIT={{user `CNI_COMMIT`}}",
        "CRIO_COMMIT={{user `CRIO_COMMIT`}}",
        "CRIU_COMMIT={{user `CRIU_COMMIT`}}",
        "RUNC_COMMIT={{user `RUNC_COMMIT`}}"
      ]
    },{
      "type": "shell",
      "only": ["fedora-28"],
      "script": "{{user `GOSRC`}}/{{user `PACKER_BASE`}}/fedora_setup.sh",
      "environment_vars": [
        "SCRIPT_BASE={{user `SCRIPT_BASE`}}",
        "CNI_COMMIT={{user `FEDORA_CNI_COMMIT`}}",
        "CRIO_COMMIT={{user `CRIO_COMMIT`}}",
        "CRIU_COMMIT={{user `CRIU_COMMIT`}}",
        "RUNC_COMMIT={{user `RUNC_COMMIT`}}"
      ]
    },{
      "type": "shell",
      "only": ["ubuntu-18"],
      "script": "{{user `GOSRC`}}/{{user `PACKER_BASE`}}/ubuntu_setup.sh",
      "environment_vars": [
        "SCRIPT_BASE={{user `SCRIPT_BASE`}}",
        "CNI_COMMIT={{user `CNI_COMMIT`}}",
        "CRIO_COMMIT={{user `CRIO_COMMIT`}}",
        "CRIU_COMMIT={{user `CRIU_COMMIT`}}",
        "RUNC_COMMIT={{user `RUNC_COMMIT`}}"
      ]
    }
  ]
}