##// END OF EJS Templates
automation: support and use Debian Buster by default...
Gregory Szorc -
r43288:d1d919f6 default
parent child Browse files
Show More
@@ -54,6 +54,7 b' INSTANCE_TYPES_WITH_STORAGE = {'
54
54
55 AMAZON_ACCOUNT_ID = '801119661308'
55 AMAZON_ACCOUNT_ID = '801119661308'
56 DEBIAN_ACCOUNT_ID = '379101102735'
56 DEBIAN_ACCOUNT_ID = '379101102735'
57 DEBIAN_ACCOUNT_ID_2 = '136693071363'
57 UBUNTU_ACCOUNT_ID = '099720109477'
58 UBUNTU_ACCOUNT_ID = '099720109477'
58
59
59
60
@@ -807,7 +808,7 b' def create_ami_from_instance(ec2client, '
807 return image
808 return image
808
809
809
810
810 def ensure_linux_dev_ami(c: AWSConnection, distro='debian9', prefix='hg-'):
811 def ensure_linux_dev_ami(c: AWSConnection, distro='debian10', prefix='hg-'):
811 """Ensures a Linux development AMI is available and up-to-date.
812 """Ensures a Linux development AMI is available and up-to-date.
812
813
813 Returns an ``ec2.Image`` of either an existing AMI or a newly-built one.
814 Returns an ``ec2.Image`` of either an existing AMI or a newly-built one.
@@ -824,6 +825,13 b' def ensure_linux_dev_ami(c: AWSConnectio'
824 'debian-stretch-hvm-x86_64-gp2-2019-09-08-17994',
825 'debian-stretch-hvm-x86_64-gp2-2019-09-08-17994',
825 )
826 )
826 ssh_username = 'admin'
827 ssh_username = 'admin'
828 elif distro == 'debian10':
829 image = find_image(
830 ec2resource,
831 DEBIAN_ACCOUNT_ID_2,
832 'debian-10-amd64-20190909-10',
833 )
834 ssh_username = 'admin'
827 elif distro == 'ubuntu18.04':
835 elif distro == 'ubuntu18.04':
828 image = find_image(
836 image = find_image(
829 ec2resource,
837 ec2resource,
@@ -352,7 +352,7 b' def get_parser():'
352 '--distro',
352 '--distro',
353 help='Linux distribution to run tests on',
353 help='Linux distribution to run tests on',
354 choices=linux.DISTROS,
354 choices=linux.DISTROS,
355 default='debian9',
355 default='debian10',
356 )
356 )
357 sp.add_argument(
357 sp.add_argument(
358 '--filesystem',
358 '--filesystem',
@@ -21,6 +21,7 b' from .ssh import ('
21 # Linux distributions that are supported.
21 # Linux distributions that are supported.
22 DISTROS = {
22 DISTROS = {
23 'debian9',
23 'debian9',
24 'debian10',
24 'ubuntu18.04',
25 'ubuntu18.04',
25 'ubuntu19.04',
26 'ubuntu19.04',
26 }
27 }
@@ -190,14 +191,18 b' if [ "$LSB_RELEASE" = "stretch" ]; then'
190 cat << EOF | sudo tee -a /etc/apt/sources.list
191 cat << EOF | sudo tee -a /etc/apt/sources.list
191 # Need backports for clang-format-6.0
192 # Need backports for clang-format-6.0
192 deb http://deb.debian.org/debian stretch-backports main
193 deb http://deb.debian.org/debian stretch-backports main
194 EOF
195 fi
193
196
197 if [ "$LSB_RELEASE" = "stretch" -o "$LSB_RELEASE" = "buster" ]; then
198 cat << EOF | sudo tee -a /etc/apt/sources.list
194 # Sources are useful if we want to compile things locally.
199 # Sources are useful if we want to compile things locally.
195 deb-src http://deb.debian.org/debian stretch main
200 deb-src http://deb.debian.org/debian $LSB_RELEASE main
196 deb-src http://security.debian.org/debian-security stretch/updates main
201 deb-src http://security.debian.org/debian-security $LSB_RELEASE/updates main
197 deb-src http://deb.debian.org/debian stretch-updates main
202 deb-src http://deb.debian.org/debian $LSB_RELEASE-updates main
198 deb-src http://deb.debian.org/debian stretch-backports main
203 deb-src http://deb.debian.org/debian $LSB_RELEASE-backports main
199
204
200 deb [arch=amd64] https://download.docker.com/linux/debian stretch stable
205 deb [arch=amd64] https://download.docker.com/linux/debian $LSB_RELEASE stable
201 EOF
206 EOF
202
207
203 elif [ "$DISTRO" = "Ubuntu" ]; then
208 elif [ "$DISTRO" = "Ubuntu" ]; then
@@ -279,8 +284,8 b' elif [ "$DISTRO" = "Ubuntu" ]; then'
279 PACKAGES="$PACKAGES linux-tools-common"
284 PACKAGES="$PACKAGES linux-tools-common"
280 fi
285 fi
281
286
282 # Ubuntu 19.04 removes monotone.
287 # Monotone only available in older releases.
283 if [ "$LSB_RELEASE" != "disco" ]; then
288 if [ "$LSB_RELEASE" = "stretch" -o "$LSB_RELEASE" = "xenial" ]; then
284 PACKAGES="$PACKAGES monotone"
289 PACKAGES="$PACKAGES monotone"
285 fi
290 fi
286
291
General Comments 0
You need to be logged in to leave comments. Login now