File tree Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ if [[ "$os" == "windows" ]]; then
31
31
fi
32
32
33
33
if [[ " $arch " == " arm64" ]]; then
34
- instance_type=" t4g.small"
34
+ instance_type=" m6gd.medium"
35
+ enable_instance_storage=" true"
35
36
fi
36
37
37
38
cat << EOF > config.json
@@ -95,6 +96,10 @@ cat << EOF > config.json
95
96
{
96
97
"ParameterKey": "ScaleInIdlePeriod",
97
98
"ParameterValue": "60"
99
+ },
100
+ {
101
+ "ParameterKey": "EnableInstanceStorage",
102
+ "ParameterValue": "${enable_instance_storage:- false} "
98
103
}
99
104
]
100
105
EOF
Original file line number Diff line number Diff line change @@ -140,9 +140,10 @@ command:
140
140
/usr/local/bin/docker-low-disk-gc :
141
141
exit-status : 0
142
142
143
+ # test that we can build a docker image
143
144
docker buildx build -f tests/Dockerfile --progress=plain -t buildkite-postgres:latest tests :
144
145
exit-status : 0
145
- timeout : 30000
146
+ timeout : 60000
146
147
147
148
# Check docker userns is enabled
148
149
# Note that goss will evaluate the outer layer of templating, and docker will evaluate the second
@@ -166,7 +167,7 @@ command:
166
167
# Check that docker containers can run
167
168
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock docker:latest version :
168
169
exit-status : 0
169
- timeout : 30000
170
+ timeout : 60000
170
171
171
172
# Check that userns allows writing as buildkite-agent
172
173
sh -c 'docker run --rm -v "$PWD:/pwd" alpine:latest touch /pwd/test && stat -c %U:%G test' && rm test :
Original file line number Diff line number Diff line change 32
32
33
33
# Move docker root to the ephemeral device
34
34
if [[ " ${BUILDKITE_ENABLE_INSTANCE_STORAGE:- false} " == " true" ]]; then
35
+ mkdir -p /mnt/ephemeral/docker
35
36
cat <<< " $(jq '." data-root" =" /mnt/ephemeral/docker" ' /etc/docker/daemon.json)" > /etc/docker/daemon.json
36
37
fi
37
38
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ exec > >(tee -a /var/log/elastic-stack.log | logger -t user-data -s 2>/dev/conso
8
8
# Mount instance storage if we can
9
9
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html
10
10
11
- # Move docker root to the ephemeral device
12
11
if [[ " ${BUILDKITE_ENABLE_INSTANCE_STORAGE:- false} " != " true" ]]; then
13
12
echo " Skipping mounting instance storage"
14
13
exit 0
17
16
# shellcheck disable=SC2207
18
17
devices=($( nvme list | grep " Amazon EC2 NVMe Instance Storage" | cut -f1 -d' ' ) )
19
18
20
- if [ -z " ${devices[*]} " ]
21
- then
19
+ if [ -z " ${devices[*]} " ]; then
22
20
echo " No Instance Storage NVMe drives to mount" >&2
23
21
exit 0
24
22
fi
You can’t perform that action at this time.
0 commit comments