-
Notifications
You must be signed in to change notification settings - Fork 18
/
cilium-ubuntu.json
131 lines (131 loc) · 4.27 KB
/
cilium-ubuntu.json
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
131
{
"variables": {
"cpus": "8",
"disk_size": "81920",
"headless": "true",
"iso_checksum": "sha256:28ccdb56450e643bad03bb7bcf7507ce3d8d90e8bf09e38f6bd9ac298a98eaad",
"iso_name": "ubuntu-20.04.4-live-server-amd64.iso",
"memory": "12288",
"mirror": "http://releases.ubuntu.com",
"mirror_directory": "20.04",
"template": "ubuntu-20.04.4-amd64",
"version": "TIMESTAMP",
"cloud_token": "{{ env `VAGRANTCLOUD_TOKEN` }}",
"BUILD_ID": "{{ env `BUILD_ID` }}",
"NAME_PREFIX": "{{ env `NAME_PREFIX` }}",
"NAME_SUFFIX": "{{ env `NAME_SUFFIX` }}",
"CILIUM_BRANCH": "{{ env `CILIUM_BRANCH` }}"
},
"builders": [
{
"boot_command": [
"<enter><enter><f6><esc><wait> ",
"autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/",
"<enter>"
],
"boot_wait": "5s",
"disk_size": "{{user `disk_size`}}",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"guest_os_type": "Ubuntu_64",
"hard_drive_interface": "sata",
"headless": "{{ user `headless` }}",
"http_directory": "http",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
"output_directory": "packer-{{user `template`}}-virtualbox",
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now",
"ssh_password": "vagrant",
"ssh_username": "vagrant",
"ssh_timeout": "15m",
"ssh_handshake_attempts": "100",
"type": "virtualbox-iso",
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--memory",
"{{ user `memory` }}"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"{{ user `cpus` }}"
]
],
"virtualbox_version_file": ".vbox_version",
"vm_name": "{{ user `template` }}-{{ user `NAME_PREFIX` }}{{ user `BUILD_ID` }}"
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"echo 'vagrant' | sudo -S lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv",
"echo 'vagrant' | sudo -S resize2fs /dev/ubuntu-vg/ubuntu-lv"
]
},{
"type": "shell",
"execute_command": "echo 'vagrant' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'",
"expect_disconnect": true,
"scripts": [
"provision/ubuntu/netperf.sh"
]
},{
"type": "shell",
"execute_command": "echo 'vagrant' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'",
"expect_disconnect": true,
"scripts": [
"provision/ubuntu/kernel.sh"
]
},{
"type": "file",
"source": "provision/env.bash",
"destination": "/tmp/env.bash"
},{
"type": "shell",
"environment_vars": [
"ENV_FILEPATH=/tmp/env.bash",
"CILIUM_BRANCH={{ user `CILIUM_BRANCH` }}",
"NAME_PREFIX={{ user `NAME_PREFIX` }}"
],
"execute_command": "echo 'vagrant' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'",
"expect_disconnect": true,
"scripts": [
"provision/vagrant.sh",
"provision/ubuntu/install.sh",
"provision/golang.sh",
"provision/swap.sh",
"provision/registry.sh",
"provision/ubuntu/crio.sh",
"provision/ubuntu/containerd.sh",
"provision/pull-images.sh",
"provision/fix-home-ownership.sh"
]
}
],
"post-processors": [
[{
"output": "cilium-ginkgo-ubuntu-{{user `NAME_PREFIX`}}{{user `BUILD_ID`}}.box",
"type": "vagrant",
"compression_level": 9,
"keep_input_artifact": false
}, {
"type": "shell-local",
"inline": [
"/usr/bin/aws s3 cp cilium-ginkgo-ubuntu-{{user `NAME_PREFIX`}}{{user `BUILD_ID`}}.box s3://ciliumvagrantbaseboxes/"
]
}],[{
"output": "cilium-ginkgo-ubuntu-{{user `NAME_PREFIX`}}{{user `BUILD_ID`}}.box",
"type": "vagrant",
"compression_level": 9,
"keep_input_artifact": false
},{
"type": "vagrant-cloud",
"box_tag": "cilium/ubuntu{{ user `NAME_SUFFIX` }}",
"access_token": "{{user `cloud_token`}}",
"version": "{{ user `BUILD_ID` }}",
"box_download_url": "https://s3-us-west-2.amazonaws.com/ciliumvagrantbaseboxes/cilium-ginkgo-ubuntu-{{user `NAME_PREFIX`}}{{user `BUILD_ID`}}.box"
}]
]
}