Update executor to Ubuntu 20.04, also with python3

Change-Id: Ieda93331a71ab5d8e7a29a13ce64f92573f2567c
diff --git a/jjb/ci-management/ci-management.yaml b/jjb/ci-management/ci-management.yaml
index 2e6ae75..519f9ac 100644
--- a/jjb/ci-management/ci-management.yaml
+++ b/jjb/ci-management/ci-management.yaml
@@ -9,9 +9,7 @@
       - '{project-name}-ci-jobs'
       - '{project-name}-packer-jobs':
           platforms:
-            - 'centos-7'
-            - 'ubuntu-16.04'
-            - 'ubuntu-18.04'
+            - 'ubuntu-20.04'
           templates:
             - basebuild
 
diff --git a/packer/provision/basebuild.sh b/packer/provision/basebuild.sh
index 6946432..6491a24 100644
--- a/packer/provision/basebuild.sh
+++ b/packer/provision/basebuild.sh
@@ -15,11 +15,11 @@
     apt-get clean
 
     # set up docker repo
-    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
-    sudo add-apt-repository \
-        "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
-         $(lsb_release -cs) \
-         stable"
+    sudo mkdir -p /etc/apt/keyrings
+    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
+    echo \
+    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
+    $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
 
     apt-get update
     apt-get install -y \
@@ -34,16 +34,15 @@
         maven \
         nodejs \
         npm \
-        python \
-        python-pip \
-        python-virtualenv \
-        python3-software-properties \
         rsync \
         ssh \
-        zip
+        zip \
+        python \
+        python3-pip \
+        python3-software-properties \
+        python3.8-venv
         # end of apt-get install list
 
-    npm install -g npm@latest # install latest npm, since apt installs old version (v3.5.2)
     npm install -g bower
     npm install karma --save-dev
 
diff --git a/packer/templates/basebuild.json b/packer/templates/basebuild.json
index 48b02c6..2f87bd4 100644
--- a/packer/templates/basebuild.json
+++ b/packer/templates/basebuild.json
@@ -5,6 +5,7 @@
     "security_group_id": null,
     "source_ami_filter_name": null,
     "source_ami_filter_owner": null,
+    "source_ami_filter_product_code": "",
     "subnet_id": null,
     "distro": null,
     "cloud_user_data": null,
@@ -22,6 +23,7 @@
       "source_ami_filter": {
         "filters": {
           "name": "{{user `source_ami_filter_name`}}",
+          "product-code": "{{user `source_ami_filter_product_code`}}",
           "root-device-type": "ebs",
           "virtualization-type": "hvm"
         },
diff --git a/packer/vars/ubuntu-18.04.json b/packer/vars/ubuntu-18.04.json
deleted file mode 100644
index 37e4ba7..0000000
--- a/packer/vars/ubuntu-18.04.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "source_ami_filter_name": "*ubuntu*18.04*",
-  "source_ami_filter_owner": "aws-marketplace",
-  "source_ami_filter_product_code": "3iplms73etrdhxdepv72l6ywj",
-  "ssh_user": "ubuntu",
-
-  "distro": "Ubuntu 18.04",
-  "arch": "x86_64",
-  "cloud_user_data": "provision/null_data.sh"
-}
diff --git a/packer/vars/ubuntu-20.04.json b/packer/vars/ubuntu-20.04.json
new file mode 100644
index 0000000..2faf415
--- /dev/null
+++ b/packer/vars/ubuntu-20.04.json
@@ -0,0 +1,10 @@
+{
+  "source_ami_filter_name": "*ubuntu-focal-20.04-amd64-server*",
+  "source_ami_filter_owner": "679593333241",
+  "source_ami_filter_product_code": "a8jyynf4hjutohctm41o2z18m",
+  "ssh_user": "ubuntu",
+
+  "distro": "Ubuntu 20.04",
+  "arch": "x86_64",
+  "cloud_user_data": "provision/null_data.sh"
+}