-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.env.sample
81 lines (69 loc) · 2.59 KB
/
build.env.sample
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
set -a
OS_CLOUD=openstack
#CONSTRUCTOR_REPO_PATH=$(pwd)
PACKER_LOG=1
PKR_VAR_SKIP_IMAGE_CREATION='false'
PKR_VAR_CONSTRUCTOR_EXEC_PROVISIONER_TASK_INSTALL='true'
PKR_VAR_OS_CLOUD=${OS_CLOUD}
PKR_VAR_FLAVOR_NAME=vd.2
PKR_VAR_FLOATING_IP_NETWORK=public-2
PKR_VAR_NETWORK_DISCOVERY_CIDRS=192.168.199.0/24
PKR_VAR_SYSTEM_DISTRIBUTION_VERSION_NAME=jammy
PKR_VAR_SYSTEM_DISTRIBUTION_VERSION_NUMBER=22.04
PKR_VAR_VOLUME_SIZE=20
PKR_VAR_TARGET_SSH_USERNAME=ubuntu
PKR_VAR_SYSTEM_DISTRIBUTION_NAME=ubuntu
#
# [ amd64, arm64 ]
#
PKR_VAR_SYSTEM_DISTRIBUTION_ARCH=amd64
#
# https://cloud-images.ubuntu.com/releases/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64-disk-kvm.img
#
PKR_VAR_SOURCE_IMAGE_URL="$(
printf 'https://cloud-images.ubuntu.com/releases/releases/%s/release/ubuntu-%s-server-cloudimg-%s-disk-kvm.img' \
"${PKR_VAR_SYSTEM_DISTRIBUTION_VERSION_NUMBER}" \
"${PKR_VAR_SYSTEM_DISTRIBUTION_VERSION_NUMBER}" \
"${PKR_VAR_SYSTEM_DISTRIBUTION_ARCH}"
)"
PKR_VAR_PACKER_FIRMWARE_NAME=bios
PKR_VAR_TARGET_IMAGE_BUILD_UUID="$(
pkgx +github.com/util-linux/util-linux uuidgen
)"
PKR_VAR_TARGET_IMAGE_BUILD_TAG=ci
PKR_VAR_TARGET_IMAGE_BUILD_VERSION=v0.1
PKR_VAR_TARGET_IMAGE_BUILD_OWNER=jupytercloud
PKR_VAR_TARGET_IMAGE_BUILD_ORGANIZATION=jupytercloud-project
PKR_VAR_TARGET_IMAGE_BUILD_YEAR=$( date '+%Y' )
PKR_VAR_TARGET_IMAGE_BUILD_MONTH=$( date '+%m' )
PKR_VAR_TARGET_IMAGE_BUILD_DAY=$( date '+%d' )
PKR_VAR_TARGET_IMAGE_BUILD_TIME=$( date '+%H%M%S' )
PKR_VAR_TARGET_IMAGE_BUILD_DATETIME="$(
printf '%s%s%s%s' \
${PKR_VAR_TARGET_IMAGE_BUILD_YEAR} \
${PKR_VAR_TARGET_IMAGE_BUILD_MONTH} \
${PKR_VAR_TARGET_IMAGE_BUILD_DAY} \
${PKR_VAR_TARGET_IMAGE_BUILD_TIME}
)"
PKR_VAR_BUILD_TOOL_NAME='packer'
PKR_VAR_BUILD_TOOL_VERSION="$(
PACKER_LOG=0 pkgx +packer.io packer version \
| cut -d ' ' -f 2
)"
PKR_VAR_TARGET_IMAGE_FORMAT='qcow2'
PKR_VAR_TARGET_IMAGE_NAME="$(
printf '%s-%s-%s-%s-%s-%s-%s-%s-%s-%s.%s' \
"${PKR_VAR_SYSTEM_DISTRIBUTION_NAME}" \
"${PKR_VAR_SYSTEM_DISTRIBUTION_VERSION_NUMBER}" \
"${PKR_VAR_SYSTEM_DISTRIBUTION_VERSION_NAME}" \
"${PKR_VAR_SYSTEM_DISTRIBUTION_ARCH}" \
"${PKR_VAR_PACKER_FIRMWARE_NAME}" \
"${PKR_VAR_TARGET_IMAGE_BUILD_ORGANIZATION}" \
"${PKR_VAR_TARGET_IMAGE_BUILD_TAG}" \
"${PKR_VAR_TARGET_IMAGE_BUILD_VERSION}" \
"${PKR_VAR_TARGET_IMAGE_BUILD_OWNER}" \
"${PKR_VAR_TARGET_IMAGE_BUILD_DATETIME}" \
"${PKR_VAR_TARGET_IMAGE_FORMAT}"
)"
PKR_VAR_VOLUME_NAME=${PKR_VAR_TARGET_IMAGE_NAME}
set +a