Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate Ubuntu 18.04 #1468

Merged
merged 5 commits into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

strategy:
fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions .jenkins/docker/base/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e

SOURCE_DIR=$(dirname "$0")
BUILD_DIR="${PWD}"
UBUNTU_VERSION="18.04"
UBUNTU_VERSION="20.04"
IMAGE_TAG="latest"

usage() {
Expand All @@ -19,7 +19,7 @@ usage() {
echo " See https://github.com/openenclave/openenclave/blob/master/DOCKER_IMAGES.md for release versions"
echo ""
echo "Options:" 1>&2
echo " -u Ubuntu release version [Default: 18.04]" 1>&2
echo " -u Ubuntu release version [Default: 20.04]" 1>&2
echo " -t Tag for the Docker image [Default: latest]" 1>&2
exit 1
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ library "OpenEnclaveJenkinsLibrary@${params.OECI_LIB_VERSION}"

pipeline {
agent {
label 'ACC-1804'
label 'nonSGX-ubuntu-2004'
}
options {
timeout(time: 360, unit: 'MINUTES')
Expand Down Expand Up @@ -73,7 +73,6 @@ pipeline {
steps {
dir("${env.BASE_DOCKERFILE_DIR}/build") {
sh """
../build.sh -m "${params.MYST_VERSION}" -o "${params.OE_BASE_CONTAINER_TAG}" -u "18.04" -t "${MYST_BASE_CONTAINER_TAG}"
../build.sh -m "${params.MYST_VERSION}" -o "${params.OE_BASE_CONTAINER_TAG}" -u "20.04" -t "${MYST_BASE_CONTAINER_TAG}"
"""
}
Expand All @@ -86,13 +85,10 @@ pipeline {
steps {
script {
docker.withRegistry(params.CONTAINER_REPO, env.INTERNAL_REPO_CREDS) {
base_1804_image = docker.image("mystikos-bionic:${MYST_BASE_CONTAINER_TAG}")
base_2004_image = docker.image("mystikos-focal:${MYST_BASE_CONTAINER_TAG}")
common.exec_with_retry { base_1804_image.push() }
common.exec_with_retry { base_2004_image.push() }

if ( params.TAG_LATEST ) {
common.exec_with_retry { base_1804_image.push('latest') }
common.exec_with_retry { base_2004_image.push('latest') }
}
}
Expand Down Expand Up @@ -132,13 +128,9 @@ pipeline {
CONTAINER_REPO = params.CONTAINER_REPO - ~"^(https|http)://"
BASE_2004_PSW = helpers.dockerGetAptPackageVersion("${CONTAINER_REPO}/mystikos-focal:${MYST_BASE_CONTAINER_TAG}", "libsgx-enclave-common")
BASE_2004_DCAP = helpers.dockerGetAptPackageVersion("${CONTAINER_REPO}/mystikos-focal:${MYST_BASE_CONTAINER_TAG}", "libsgx-ae-id-enclave")
BASE_1804_PSW = helpers.dockerGetAptPackageVersion("${CONTAINER_REPO}/mystikos-bionic:${MYST_BASE_CONTAINER_TAG}", "libsgx-enclave-common")
BASE_1804_DCAP = helpers.dockerGetAptPackageVersion("${CONTAINER_REPO}/mystikos-bionic:${MYST_BASE_CONTAINER_TAG}", "libsgx-ae-id-enclave")
println "Ubuntu 20.04 PSW: ${BASE_2004_PSW}"
println "Ubuntu 20.04 DCAP: ${BASE_2004_DCAP}"
println "Ubuntu 18.04 PSW: ${BASE_1804_PSW}"
println "Ubuntu 18.04 DCAP: ${BASE_1804_DCAP}"
if (BASE_2004_PSW == "N/A" || BASE_2004_DCAP == "N/A" || BASE_1804_PSW == "N/A" || BASE_1804_DCAP == "N/A") {
if (BASE_2004_PSW == "N/A" || BASE_2004_DCAP == "N/A") {
error("Failed to get package versions")
}
}
Expand All @@ -150,7 +142,6 @@ pipeline {
fi
echo "\$(head -n 2 DOCKER_IMAGES.md)" > DOCKER_IMAGES_new.md
echo "| Mystikos Base Ubuntu 20.04 | ${params.CONTAINER_REPO}/mystikos-focal:${MYST_BASE_CONTAINER_TAG} | ${params.MYST_VERSION} | ${OE_BASE_CONTAINER_TAG} | ${BASE_2004_PSW} | ${BASE_2004_DCAP} |" >> DOCKER_IMAGES_new.md
echo "| Mystikos Base Ubuntu 18.04 | ${params.CONTAINER_REPO}/mystikos-bionic:${MYST_BASE_CONTAINER_TAG} | ${params.MYST_VERSION} | ${OE_BASE_CONTAINER_TAG} | ${BASE_1804_PSW} | ${BASE_1804_DCAP} |" >> DOCKER_IMAGES_new.md
echo "\$(tail -n +3 DOCKER_IMAGES.md)" >> DOCKER_IMAGES_new.md
mv DOCKER_IMAGES_new.md DOCKER_IMAGES.md
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def containers_to_build = [

pipeline {
agent {
label 'ACC-1804-DC4'
label 'nonSGX-ubuntu-2004'
}
options {
timeout(time: 360, unit: 'MINUTES')
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/pipelines/code-coverage.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pipeline {
}
environment {
TEST_CONFIG = 'Code Coverage'
UBUNTU_VERSION = '18.04'
UBUNTU_VERSION = '20.04'
VM_GENERATION = 'v3'
MYST_SCRIPTS = "${WORKSPACE}/scripts"
JENKINS_SCRIPTS = "${WORKSPACE}/.jenkins/scripts"
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/pipelines/manual-pr.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pipeline {
axes {
axis {
name 'OS_VERSION'
values '18.04', '20.04'
values '20.04'
}
axis {
name 'TEST_PIPELINE'
Expand Down
18 changes: 6 additions & 12 deletions .jenkins/pipelines/nightly.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pipeline {
axes {
axis {
name 'OS_VERSION'
values '18.04', '20.04'
values '20.04'
}
axis {
name 'TEST_PIPELINE'
Expand All @@ -94,18 +94,8 @@ pipeline {
}
}
excludes {
// Skip builds with Ubuntu 18.04 and v3
exclude {
axis {
name 'OS_VERSION'
values '18.04'
}
axis {
name 'VM_GENERATION'
values 'v3'
}
}
// Skip builds with Ubuntu 20.04 and v2
vtikoo marked this conversation as resolved.
Show resolved Hide resolved
// But include 'Unit' and 'Solutions' tests
exclude {
axis {
name 'OS_VERSION'
Expand All @@ -115,6 +105,10 @@ pipeline {
name 'VM_GENERATION'
values 'v2'
}
axis {
name 'TEST_PIPELINE'
values 'DotNet', 'DotNet-P1', 'Azure-SDK', 'PyTorch', 'OpenMP-Testsuite'
}
}
}
stages {
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/pipelines/p1-tests.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pipeline {
axes {
axis {
name 'OS_VERSION'
values '18.04', '20.04'
values '20.04'
}
axis {
name 'TEST_PIPELINE'
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/pipelines/pr.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ pipeline {
axes {
axis {
name 'OS_VERSION'
values '18.04', '20.04'
values '20.04'
}
axis {
name 'TEST_PIPELINE'
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/pipelines/release.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pipeline {
axes {
axis {
name 'OS_VERSION'
values '18.04', '20.04'
values '20.04'
}
axis {
name 'TEST_PIPELINE'
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/pipelines/standalone/azure-sdk-tests.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline {
timestamps ()
}
parameters {
choice(name: "UBUNTU_VERSION", choices: ["18.04", "20.04"])
choice(name: "UBUNTU_VERSION", choices: ["20.04"])
string(name: "REPOSITORY", defaultValue: "deislabs/mystikos")
string(name: "BRANCH", defaultValue: "main", description: "Branch to build")
string(name: "PULL_REQUEST_ID", defaultValue: "", description: "If you are building a pull request, enter the pull request ID number here. (ex. 789)")
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/pipelines/standalone/dotnet-p1-tests.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline {
timestamps ()
}
parameters {
choice(name: "UBUNTU_VERSION", choices: ["18.04", "20.04"])
choice(name: "UBUNTU_VERSION", choices: ["20.04"])
string(name: "REPOSITORY", defaultValue: "deislabs/mystikos")
string(name: "BRANCH", defaultValue: "main", description: "Branch to build")
string(name: "PULL_REQUEST_ID", defaultValue: "", description: "If you are building a pull request, enter the pull request ID number here. (ex. 789)")
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/pipelines/standalone/dotnet-tests.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline {
timestamps ()
}
parameters {
choice(name: "UBUNTU_VERSION", choices: ["18.04", "20.04"])
choice(name: "UBUNTU_VERSION", choices: ["20.04"])
string(name: "REPOSITORY", defaultValue: "deislabs/mystikos")
string(name: "BRANCH", defaultValue: "main", description: "Branch to build")
string(name: "PULL_REQUEST_ID", defaultValue: "", description: "If you are building a pull request, enter the pull request ID number here. (ex. 789)")
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/pipelines/standalone/openmp-testsuite.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline {
timestamps ()
}
parameters {
choice(name: "UBUNTU_VERSION", choices: ["18.04", "20.04"])
choice(name: "UBUNTU_VERSION", choices: ["20.04"])
string(name: "REPOSITORY", defaultValue: "deislabs/mystikos")
string(name: "BRANCH", defaultValue: "main", description: "Branch to build")
string(name: "PULL_REQUEST_ID", defaultValue: "", description: "If you are building a pull request, enter the pull request ID number here. (ex. 789)")
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/pipelines/standalone/pytorch-tests.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline {
timestamps ()
}
parameters {
choice(name: "UBUNTU_VERSION", choices: ["18.04", "20.04"])
choice(name: "UBUNTU_VERSION", choices: ["20.04"])
string(name: "REPOSITORY", defaultValue: "deislabs/mystikos")
string(name: "BRANCH", defaultValue: "main", description: "Branch to build")
string(name: "PULL_REQUEST_ID", defaultValue: "", description: "If you are building a pull request, enter the pull request ID number here. (ex. 789)")
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/pipelines/standalone/solutions-tests.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline {
timestamps ()
}
parameters {
choice(name: "UBUNTU_VERSION", choices: ["18.04", "20.04"])
choice(name: "UBUNTU_VERSION", choices: ["20.04"])
string(name: "REPOSITORY", defaultValue: "deislabs/mystikos")
string(name: "BRANCH", defaultValue: "main", description: "Branch to build")
string(name: "PULL_REQUEST_ID", defaultValue: "", description: "If you are building a pull request, enter the pull request ID number here. (ex. 789)")
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/pipelines/standalone/unit-tests.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline {
timestamps ()
}
parameters {
choice(name: "UBUNTU_VERSION", choices: ["18.04", "20.04"])
choice(name: "UBUNTU_VERSION", choices: ["20.04"])
string(name: "REPOSITORY", defaultValue: "deislabs/mystikos")
string(name: "BRANCH", defaultValue: "main", description: "Branch to build")
string(name: "PULL_REQUEST_ID", defaultValue: "", description: "If you are building a pull request, enter the pull request ID number here. (ex. 789)")
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/scripts/code-coverage/download-dotnet.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt update
6 changes: 3 additions & 3 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document contains instructions to build mystikos on Linux

## Building from source

Mystikos is compatible with **Ubuntu 18.04 and 20.04**. It may be compiled with or
Mystikos is compatible with **Ubuntu 20.04**. It may be compiled with or
without SGX capability.

## Install the prerequisites
Expand All @@ -29,11 +29,11 @@ The build process will automatically install all prerequisite for OE SDK first,
including the Intel SGX driver and Intel Platform Software, and then build the
project. Finally, it installs the build outputs to `/opt/mystikos`.

Mystikos can be used to run applications on a non-SGX-capable Ubuntu 18.04
Mystikos can be used to run applications on a non-SGX-capable Ubuntu 20.04
machine while running with the Linux target (simulation mode). Obviously you
need an SGX-capable machine to try out the SGX target. There are multiple ways
which you might procure an SGX-capable machine, including but not limited to:
- buy or build an Intel NUC (TODO: include specific model number)
- use a [`DCsv2`-series (from DC1s_v2 up to DC8_V2) VM on Azure](https://aka.ms/accgetstarted)
- use a [`DCsv2`-series (from DC1s_v2 up to DC8s_V2) VM on Azure](https://aka.ms/accgetstarted)
- or use another cloud provider which also has SGX support
- use your own servers
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ Mystikos.

# Installation Guide for Ubuntu

Mystikos may be built and installed on Ubuntu 18.04 and 20.04.
Mystikos may be built and installed Ubuntu 20.04.

## Install from Released Package

To install Mystikos using one of the released packages, please follow the appropriate guide to install on [Ubuntu 18.04](doc/user-install-ubuntu-1804.md) or [Ubuntu 20.04](doc/user-install-ubuntu-2004.md).
To install Mystikos using one of the released packages, please follow the appropriate guide to install on [Ubuntu 20.04](doc/user-install-ubuntu-2004.md).

## Install From Source

Expand Down
5 changes: 3 additions & 2 deletions doc/user-getting-started-docker-c++.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ The expected outputs, of course, are "1 4 9".

We provide a `Dockerfile` for building and running the application as follows.
Note this is a multi-stage dockerfile as `boost-dev` is only required for
building. We can skip it in the final image to save space.
building. We can skip it in the final image to save space.
> :warning: In this example we use Ubuntu 18.04, but you should use the latest supported Ubuntu LTS version instead.

```docker
# stage 1 build
Expand Down Expand Up @@ -107,4 +108,4 @@ For more complex C++ programs that are already working with Mystikos, please see

* [The test suite for msgpack for C++](https://github.com/deislabs/mystikos/tree/main/solutions/msgpack_c)
* [The test suite for Azure SDK for C++](https://github.com/deislabs/mystikos/tree/main/tests/azure-sdk-for-cpp)
* [The C++ test suite for llvm project](https://github.com/deislabs/mystikos/tree/main/tests/libcxx)
* [The C++ test suite for llvm project](https://github.com/deislabs/mystikos/tree/main/tests/libcxx)
1 change: 1 addition & 0 deletions doc/user-install-ubuntu-1804.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Installation Guiide for Ubuntu 18.04
> :warning: Ubuntu 18.04 is no longer supported. Please use the latest supported Ubuntu LTS version instead.

## 1. Install Intel Drivers

Expand Down
2 changes: 1 addition & 1 deletion docker/build-myst/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:20.04

COPY ./build-myst.sh /build-myst.sh
RUN /bin/chmod 777 /build-myst.sh
Expand Down
16 changes: 6 additions & 10 deletions prereqs/Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
OS_NAME=$(shell lsb_release -cs | xargs)
OS_VERSION=$(shell lsb_release -rs | xargs)

DRIVER=sgx_linux_x64_driver_1.35.bin
DRIVER_URL=https://download.01.org/intel-sgx/sgx-dcap/1.7/linux/distro/ubuntu18.04-server
DRIVER=sgx_linux_x64_driver_1.41.bin
DRIVER_URL=https://download.01.org/intel-sgx/sgx-dcap/1.16/linux/distro/ubuntu20.04-server

PIP_INSTALL=python3-pip
PIP=pip3
ifeq ("$(OS_NAME)", "bionic")
PIP_INSTALL=python-pip
PIP=pip
endif

all:
test -e package-installed || $(MAKE) packages
Expand All @@ -27,18 +23,18 @@ package_repo:

packages: package_repo
$(MAKE) wait_dpkg
sudo apt install -y gdb dkms libssl-dev cryptsetup-bin curl libcurl4-openssl-dev clang-10 clang-format-10 pkg-config $(PIP_INSTALL)
sudo apt install -y gdb dkms libssl-dev cryptsetup-bin curl libcurl4-openssl-dev clang-11 clang-format-11 pkg-config $(PIP_INSTALL)
$(MAKE) wait_dpkg
sudo apt install -y libsgx-enclave-common libsgx-quote-ex libsgx-dcap-ql libsgx-dcap-ql-dev az-dcap-client
ifeq ("$(OS_NAME)", "bionic")
python -m $(PIP) install --upgrade $(PIP)
ifeq ("$(OS_NAME)", "focal")
python3 -m $(PIP) install --upgrade $(PIP)
endif
$(PIP) install cmake && sudo ln -f -s $(HOME)/.local/bin/cmake /usr/bin/cmake
touch package-installed

install_sgx_driver:
ifndef CDPX_BYPASS
ifeq ("$(OS_NAME)", "bionic")
ifeq ("$(OS_NAME)", "focal")
wget $(DRIVER_URL)/$(DRIVER)
sudo bash ./$(DRIVER)
endif
Expand Down
6 changes: 2 additions & 4 deletions samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

## Prerequsites to run samples

Follow the [installation guide](../README.md#installation-guide-for-ubuntu-1804) to set up prerequsites for the samples.
Follow the [installation guide](../README.md#installation-guide-for-ubuntu) to set up prerequsites for the samples.

[Download the Mystikos package from GitHub and set up the path](../README.md#download-mystikos) as described in the documentation or

[build Mystikos from source and install the package](../BUILDING.md).
[Download the Mystikos package from GitHub and set up the path](../README.md##install-from-released-package) as described in the documentation or [build Mystikos from source and install the package](../BUILDING.md).

## Common SGX Sample Information

Expand Down
2 changes: 1 addition & 1 deletion samples/confidential_ml/AKSDockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mystikos.azurecr.io/mystikos-bionic:latest
FROM mystikos.azurecr.io/mystikos-focal:latest

RUN apt-get update && apt-get install -y curl
ENV MYST=./opt/mystikos/bin/myst
Expand Down
2 changes: 1 addition & 1 deletion samples/docker_aks/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mystikos.azurecr.io/mystikos-bionic:latest
FROM mystikos.azurecr.io/mystikos-focal:latest

ADD appdir/bin/hello /appdir/bin/hello
ADD config.json config.json
Expand Down
Loading