Skip to content

Commit

Permalink
Updated the OpenSSL, CMake and Device SDK version and added dependent…
Browse files Browse the repository at this point in the history
… libs for local proxy integration tests (#441)

* updated the OpenSSL version and added dependent lib

* updated SDK version of integ tests

* updated SDK tag

* updated CMake version for installing SDK

* removed libssl-dev which was causing CMake built failure

* typo

* cmake prereq

* installing openssl

* installing openssl
  • Loading branch information
HarshGandhi-AWS committed Dec 7, 2023
1 parent 00f68ce commit cb81641
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ RUN yum -y update \
gcc-c++ \
softhsm \
zlib-devel \
perl-IPC-Cmd \
perl-Pod-Html \
&& yum clean all \
&& rm -rf /var/cache/yum

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ RUN yum -y update \
make \
gcc \
gcc-c++ \
perl-IPC-Cmd \
perl-Pod-Html \
&& yum clean all \
&& rm -rf /var/cache/yum

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM public.ecr.aws/amazonlinux/amazonlinux:2.0.20230307.0

ARG OPENSSL_VERSION=1.1.1n
ARG OPENSSL_VERSION=3.0.8

RUN yum -y update && yum -y install \
autoconf \
Expand All @@ -14,6 +14,8 @@ RUN yum -y update && yum -y install \
perl \
softhsm \
tar \
perl-IPC-Cmd \
perl-Pod-Html \
wget


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM registry.access.redhat.com/ubi8/ubi

ARG OPENSSL_VERSION=1.1.1n
ARG OPENSSL_VERSION=3.0.8

RUN yum -y update && yum -y install \
autoconf \
Expand All @@ -13,6 +13,8 @@ RUN yum -y update && yum -y install \
make \
perl \
tar \
perl-IPC-Cmd \
perl-Pod-Html \
wget


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:18.04

ARG OPENSSL_VERSION=1.1.1n
ARG OPENSSL_VERSION=3.0.8

RUN apt-get update && apt-get install -y \
wget \
Expand Down
20 changes: 20 additions & 0 deletions .github/docker-images/integration-tests/amazonlinux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@ ARG BASE_IMAGE
ARG PRE_RELEASE_IMAGE
FROM ${BASE_IMAGE} AS build_integration_tests

###############################################################################
# Install pre-built CMake
###############################################################################
WORKDIR /tmp
RUN curl -sSL https://github.com/Kitware/CMake/releases/download/v3.28.0/cmake-3.28.0.tar.gz -o cmake-3.28.0.tar.gz \
&& tar -zxvf cmake-3.28.0.tar.gz \
&& cd cmake-3.28.0 \
&& ./bootstrap \
&& make -j 2 \
&& make install

###############################################################################
# Install Prerequisites
###############################################################################

RUN yum -y update && yum -y install \
autoconf \
libtool \
Expand All @@ -14,10 +29,15 @@ RUN mkdir -p /root/integration-tests/build \
&& cmake .. -DCMAKE_BUILD_TYPE=DEBUG \
&& cmake --build . --target aws-iot-device-client-integration-tests

###############################################################################
# Actual docker image
###############################################################################

FROM ${PRE_RELEASE_IMAGE} AS runner

###############################################################################
# Install openssl for libssl dependency.
###############################################################################
RUN yum update -y && yum install -y libatomic libcurl-devel openssl-devel libuuid-devel wget && \
rm -rf /var/cache/yum && \
yum clean all
Expand Down
21 changes: 21 additions & 0 deletions .github/docker-images/integration-tests/ubi8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@ ARG BASE_IMAGE
ARG PRE_RELEASE_IMAGE
FROM ${BASE_IMAGE} AS build_integration_tests

###############################################################################
# Install pre-built CMake
###############################################################################
WORKDIR /tmp
RUN curl -sSL https://github.com/Kitware/CMake/releases/download/v3.28.0/cmake-3.28.0.tar.gz -o cmake-3.28.0.tar.gz \
&& tar -zxvf cmake-3.28.0.tar.gz \
&& cd cmake-3.28.0 \
&& ./bootstrap \
&& make -j 2 \
&& make install

###############################################################################
# Install Prerequisites
###############################################################################

RUN #yum update -y && yum install -y libcurl-devel openssl-devel libuuid-devel make gcc gcc-c++ git zlib-devel

COPY ./integration-tests /root/integration-tests
Expand All @@ -10,10 +25,16 @@ RUN mkdir -p /root/integration-tests/build \
&& cmake .. -DCMAKE_BUILD_TYPE=DEBUG \
&& cmake --build . --target aws-iot-device-client-integration-tests

###############################################################################
# Actual docker image
###############################################################################

FROM ${PRE_RELEASE_IMAGE} AS runner

###############################################################################
# Install openssl for libssl dependency.
###############################################################################

RUN yum update -y && yum install -y libatomic libcurl-devel openssl-devel libuuid-devel wget && \
rm -rf /var/cache/yum && \
yum clean all
Expand Down
52 changes: 51 additions & 1 deletion .github/docker-images/integration-tests/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,58 @@ ARG BASE_IMAGE
ARG PRE_RELEASE_IMAGE
FROM ${OS} AS build_localproxy

ARG OPENSSL_VERSION=3.0.8

###############################################################################
# Install prereqs for CMake
###############################################################################
RUN apt-get update -qq \
&& apt-get -y install \
git \
clang-format \
curl \
build-essential \
wget \
libc6-dbg \
softhsm \
zlib1g-dev \
&& apt-get clean


###############################################################################
# Install OpenSSL 3.0.8
###############################################################################
WORKDIR /tmp
RUN wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
&& tar -zxvf openssl-${OPENSSL_VERSION}.tar.gz \
&& cd openssl-${OPENSSL_VERSION} \
&& ./config \
&& make \
&& make install \
&& ldconfig

###############################################################################
# Install pre-built CMake
###############################################################################
WORKDIR /tmp
RUN curl -sSL https://github.com/Kitware/CMake/releases/download/v3.28.0/cmake-3.28.0.tar.gz -o cmake-3.28.0.tar.gz \
&& tar -zxvf cmake-3.28.0.tar.gz \
&& cd cmake-3.28.0 \
&& ./bootstrap \
&& make -j 2 \
&& make install

###############################################################################
# Install Prerequisites
###############################################################################

RUN apt update && apt upgrade -y && \
apt install -y git libboost-all-dev autoconf automake \
wget libtool curl make g++ unzip cmake libssl-dev

###############################################################################
# Install Dependencies
###############################################################################

RUN mkdir /home/dependencies
WORKDIR /home/dependencies
Expand Down Expand Up @@ -74,16 +119,21 @@ RUN mkdir -p /root/integration-tests/build \
&& cmake .. -DCMAKE_BUILD_TYPE=DEBUG \
&& cmake --build . --target aws-iot-device-client-integration-tests

###############################################################################
# Actual docker image
###############################################################################

FROM ${PRE_RELEASE_IMAGE} AS runner
RUN apt-get update && apt-get install -y libcurl4-openssl-dev libssl-dev uuid-dev zlib1g-dev libpulse-dev wget ssh ca-certificates wget apt-utils

RUN mkdir -p /home/aws-iot-securetunneling-localproxy/certs && \
cd /home/aws-iot-securetunneling-localproxy/certs && \
wget https://www.amazontrust.com/repository/AmazonRootCA1.pem && \
openssl rehash ./
###############################################################################
# Copy the binaries from builder stages.
###############################################################################

# # Copy the binaries from builder stages.
COPY --from=build_localproxy /home/aws-iot-securetunneling-localproxy/localproxy /localproxy
COPY --from=build_integration_tests /root/integration-tests/build/aws-iot-device-client-integration-tests /aws-iot-device-client-integration-tests
COPY --from=build_integration_tests /root/integration-tests/source/tunneling/test-tunnel.sh /test-tunnel.sh
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.13)
project(aws-iot-device-client-integration-tests)

set(OPENSSL_USE_STATIC_LIBS TRUE)
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/CMakeLists.txt.gtest
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.13)

project(googletest-download NONE)

Expand Down
4 changes: 2 additions & 2 deletions integration-tests/CMakeLists.txt.libawscpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.13)
project(aws-sdk-cpp NONE)
include(ExternalProject)

ExternalProject_Add(aws-sdk-cpp
GIT_REPOSITORY https://github.com/aws/aws-sdk-cpp.git
GIT_TAG 1.11.56
GIT_TAG 1.11.219
LIST_SEPARATOR "|"
CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF
-DBUILD_ONLY=iot|iotsecuretunneling
Expand Down

0 comments on commit cb81641

Please sign in to comment.