Meridio: Update versions to Ubuntu 22.04 41/16041/3
authorLionel Jouin <lionel.jouin@est.tech>
Wed, 16 Nov 2022 13:31:46 +0000 (14:31 +0100)
committerrobert.tomczyk <robert.tomczyk.est@gmail.com>
Thu, 17 Nov 2022 14:07:47 +0000 (14:07 +0000)
Meridio is not supporting kernel 4.15 provided with Ubuntu 18.04.
The image has to be updated to new OS version - 22.04.

Note: In Ubuntu 22.04 the RSA ssh keys are rejectd. This keys is
used by default for packer. In Packer v1.8.2 new parameter is introduced
temporary_key_pair_type which allows to change key type.

Change-Id: I148a96a8114559ceb0a666916796fe16c91e992a

infra/jenkins/slave-setup/nordix-nsm-build-server/README.md
infra/jenkins/slave-setup/nordix-nsm-build-server/configure-image-ubuntu2204.sh [moved from infra/jenkins/slave-setup/nordix-nsm-build-server/configure-image-ubuntu1804.sh with 95% similarity]
infra/jenkins/slave-setup/nordix-nsm-build-server/nordix-nsm-build-server-ubuntu2204-kna.json [moved from infra/jenkins/slave-setup/nordix-nsm-build-server/nordix-nsm-build-server-ubuntu1804-kna.json with 73% similarity]

index 622e47b83ccc021b2dee3ec45a15c289904ee9f5..eee81d1407e4f75f0cb4b9305c3edfc4af332195 100644 (file)
@@ -1,5 +1,6 @@
 ## Description
 Packer files for creating virtual machine image used for Nordix NSM build server.
+Note: Please use Packer v1.8.2 or above for the `temporary_key_pair_type` parameter
 
 ## Steps To Run
  1. Source OpenStack RC file `source <openstack-rc-file.sh>`to set environment variables used by packer e.g. OS_USERNAME, OS_PASSWORD and OS_AUTH_URL
similarity index 95%
rename from infra/jenkins/slave-setup/nordix-nsm-build-server/configure-image-ubuntu1804.sh
rename to infra/jenkins/slave-setup/nordix-nsm-build-server/configure-image-ubuntu2204.sh
index 77cc82ef85201e1b518217f7159be03cbf15443e..7b4fdf986c7e1aff8e96091cd0b10c33cf520fc7 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 # ============LICENSE_START=======================================================
-#  Copyright (C) 2021 The Nordix Foundation. All rights reserved.
+#  Copyright (C) 2022 The Nordix Foundation. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@ sudo apt update
 sudo apt upgrade -y
 
 # install basic dependencies
+sudo apt update
 sudo apt install -y make openjdk-11-jre-headless apt-transport-https ca-certificates curl gnupg jq software-properties-common build-essential
 
 # If you have a issue with Let's Encrypt certificate when cloning repo due to DST Root CA X3 Expiration:
@@ -36,10 +37,10 @@ sudo rm -rf /usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt
 sudo update-ca-certificates --fresh --verbose
 
 # set versions of various things for NSM for visibility and ease of maintenance
-DOCKER_CE_VERSION="5:20.10.17~3-0~ubuntu-bionic"
-DOCKER_CE_CLI_VERSION="5:20.10.17~3-0~ubuntu-bionic"
-CONTAINERD_IO_VERSION="1.6.6-1"
-GO_VERSION="1.19"
+DOCKER_CE_VERSION="5:20.10.21~3-0~ubuntu-jammy"
+DOCKER_CE_CLI_VERSION="5:20.10.21~3-0~ubuntu-jammy"
+CONTAINERD_IO_VERSION="1.6.9-1"
+GO_VERSION="1.19.3"
 GO_LINT_VERSION="1.47.2"
 FOSSA_CLI_VERSION="1.1.7"
 KUBECTL_VERSION="v1.25.0"
@@ -47,7 +48,7 @@ HELM_VERSION="v3.10.1"
 YQ_VERSION="v4.21.1"
 
 # install docker-ce, docker-ce-cli, containerd.io and mark them hold
-sudo apt remove -y docker docker-engine docker.io containerd runc
+sudo apt remove -y docker docker.io containerd runc
 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
 echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
similarity index 73%
rename from infra/jenkins/slave-setup/nordix-nsm-build-server/nordix-nsm-build-server-ubuntu1804-kna.json
rename to infra/jenkins/slave-setup/nordix-nsm-build-server/nordix-nsm-build-server-ubuntu2204-kna.json
index d4a3bb4c66153a73f6c57f0bbff91438977d86b8..67c00591bb79217fe4ab55325afb594e9a027fe6 100644 (file)
@@ -5,10 +5,11 @@
             "region": "Kna1",
             "domain_name": "CCP_Domain_34466",
             "identity_endpoint": "https://kna1.citycloud.com:5000",
-            "image_name": "nordix-nsm-build-ubuntu1804",
+            "image_name": "nordix-nsm-build-ubuntu2204",
             "ssh_username": "ubuntu",
-            "source_image_name": "Ubuntu 18.04 Bionic Beaver 20190724.1",
+            "source_image_name": "Ubuntu 22.04 Jammy Jellyfish 20220810",
             "flavor": "2C-4GB",
+            "temporary_key_pair_type": "ed25519",
             "networks": [
                 "f9bdffa1-bd17-43d8-9eb5-c4ff09947bfe"
             ],
@@ -22,7 +23,7 @@
             "destination": "/home/ubuntu/authorized_keys.packer"
         },
         {
-            "script": "configure-image-ubuntu1804.sh",
+            "script": "configure-image-ubuntu2204.sh",
             "type": "shell"
         }
     ]