diff options
author | Dave Wallace <dwallacelf@gmail.com> | 2020-05-28 14:56:07 -0400 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2020-05-28 15:45:04 -0400 |
commit | 9da67d4b8e0f47bcd50e2ec70b72bf06a0b6e908 (patch) | |
tree | d2476cd611acd57c1a482af425a31d58125819c7 /docker/vpp/vpp-ubuntu16 | |
parent | 0e4d21ba4f01911130e2ed54bd1faff8baf8b5b0 (diff) |
Update Nomad docker image files for VPP & CSIT
- The docker image files were originally created by Ed Kern
for the Nomad container proof of concept build infrastructure
for the VPP project. The original source files and commit
history can be found in the respective repositories at
https://github.com/snergfdio
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Iff0a8fc76e8a1d2b56dfea6daff688b237338568
Diffstat (limited to 'docker/vpp/vpp-ubuntu16')
-rw-r--r-- | docker/vpp/vpp-ubuntu16/files/badkey | 27 | ||||
-rw-r--r-- | docker/vpp/vpp-ubuntu16/files/lf-update-java-alternatives | 57 | ||||
-rw-r--r-- | docker/vpp/vpp-ubuntu16/files/packagecloud | 1 | ||||
-rw-r--r-- | docker/vpp/vpp-ubuntu16/files/packagecloud_api | 3 | ||||
-rw-r--r-- | docker/vpp/vpp-ubuntu16/files/pc_push | 39 | ||||
-rw-r--r-- | docker/vpp/vpp-ubuntu16/files/sshconfig | 3 |
6 files changed, 130 insertions, 0 deletions
diff --git a/docker/vpp/vpp-ubuntu16/files/badkey b/docker/vpp/vpp-ubuntu16/files/badkey new file mode 100644 index 000000000..2270aff09 --- /dev/null +++ b/docker/vpp/vpp-ubuntu16/files/badkey @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAslDXf4kZOQI8OGQQdIF8o83nBM0B4fzHLYLxxiY2rKiQ5MGM +mQa7p1KKzmd5/NlvFRnXefnjSDQljjPxEY7mh457rX2nXvqHD4GUXZPpBIE73rQ1 +TViIAXdDzFXJ6ee4yX8ewmVakzYBnlUPDidkWyRnjm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orpECgYBubXfQj8KhUs0fdx3Y3Ehdni/ZdlG7F1qx4YBq +mx5e7d+Wd6Hn5Z3fcxO9+yrvypS3YN5YrJzuZSiuCSWdP9RcY7y5r1ZQRv1g0nTZ +MDWZUiNea4cddTd8xKxFB3tV4SkIZi8LustuzDVWa0Mlh4EOmP6uf6c5WxtqRsEL +UwORFwKBgEjZsfmZGBurjOtSrcsteulOB0D2nOqPVRWXmbSNJT/l73DkEllvVyA/ +wdW39nyFrA2Qw1K2F+l8DkzMd/WEjmioSWCsvTkXlvrqPfByKg01zCbYy/mhRW7d +7sQrPOIl8ygsc3JrxmvzibdWmng1MehvpAM1ogWeTUa1lsDTNJ/6 +-----END RSA PRIVATE KEY----- diff --git a/docker/vpp/vpp-ubuntu16/files/lf-update-java-alternatives b/docker/vpp/vpp-ubuntu16/files/lf-update-java-alternatives new file mode 100644 index 000000000..8484a711b --- /dev/null +++ b/docker/vpp/vpp-ubuntu16/files/lf-update-java-alternatives @@ -0,0 +1,57 @@ +#!/bin/bash +# SPDX-License-Identifier: EPL-1.0 +############################################################################## +# Copyright (c) 2018 The Linux Foundation and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +############################################################################## + +# This script takes the java-version variable to set the proper alternative +# for java, javac and java_sdk_openjdk for ubuntu or centos/fedora/redhat distros + +JAVA_ENV_FILE="/tmp/java.env" + +update-java-redhat() { + if [[ "${SET_JDK_VERSION//[a-zA-Z]/}" = "11" ]]; then + export JAVA_HOME="/usr/lib/jvm/java-11-openjdk" + else + export JAVA_HOME="/usr/lib/jvm/java-1.${SET_JDK_VERSION//[a-zA-Z:-]/}.0-openjdk" + fi + sudo /usr/sbin/alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 1 + sudo /usr/sbin/alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 1 + sudo /usr/sbin/alternatives --install /usr/lib/jvm/java-openjdk java_sdk_openjdk "${JAVA_HOME}" 1 + sudo /usr/sbin/alternatives --set java "${JAVA_HOME}/bin/java" + sudo /usr/sbin/alternatives --set javac "${JAVA_HOME}/bin/javac" + sudo /usr/sbin/alternatives --set java_sdk_openjdk "${JAVA_HOME}" + echo JAVA_HOME="$JAVA_HOME" > "$JAVA_ENV_FILE" +} + +update-java-ubuntu() { + export JAVA_HOME="/usr/lib/jvm/java-${SET_JDK_VERSION//[a-zA-Z:-]/}-openjdk-amd64" + sudo /usr/bin/update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 1 + sudo /usr/bin/update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 1 + sudo /usr/bin/update-alternatives --install /usr/lib/jvm/java-openjdk java_sdk_openjdk "${JAVA_HOME}" 1 + sudo /usr/bin/update-alternatives --set java "${JAVA_HOME}/bin/java" + sudo /usr/bin/update-alternatives --set javac "${JAVA_HOME}/bin/javac" + sudo /usr/bin/update-alternatives --set java_sdk_openjdk "${JAVA_HOME}" + echo JAVA_HOME="$JAVA_HOME" > "$JAVA_ENV_FILE" +} + +echo "---> Updating Java version" +OS=$(facter operatingsystem | tr '[:upper:]' '[:lower:]') + +case "${OS}" in + fedora|centos|redhat) + echo "---> RedHat type system detected" + update-java-redhat + ;; + ubuntu) + echo "---> Ubuntu system detected" + update-java-ubuntu + ;; +esac +java -version +echo JAVA_HOME="${JAVA_HOME}" diff --git a/docker/vpp/vpp-ubuntu16/files/packagecloud b/docker/vpp/vpp-ubuntu16/files/packagecloud new file mode 100644 index 000000000..98322206d --- /dev/null +++ b/docker/vpp/vpp-ubuntu16/files/packagecloud @@ -0,0 +1 @@ +{"url":"https://packagecloud.io","token":"$token"} diff --git a/docker/vpp/vpp-ubuntu16/files/packagecloud_api b/docker/vpp/vpp-ubuntu16/files/packagecloud_api new file mode 100644 index 000000000..9f5374895 --- /dev/null +++ b/docker/vpp/vpp-ubuntu16/files/packagecloud_api @@ -0,0 +1,3 @@ +machine packagecloud.io +login $pclogin +password diff --git a/docker/vpp/vpp-ubuntu16/files/pc_push b/docker/vpp/vpp-ubuntu16/files/pc_push new file mode 100644 index 000000000..3fdc8d373 --- /dev/null +++ b/docker/vpp/vpp-ubuntu16/files/pc_push @@ -0,0 +1,39 @@ +#!/bin/bash +# REPO is an Environment variable + +set -x + +echo "STARTING PACKAGECLOUD PUSH" + +sleep 10 + +if [ -f /usr/bin/zypper ]; then + FACTER_OS="openSUSE" +else + FACTER_OS=$(/usr/bin/facter operatingsystem) +fi + +if [ -f ~/.packagecloud ]; then + case "$FACTER_OS" in + Ubuntu) + FACTER_LSBNAME=$(/usr/bin/facter lsbdistcodename) + DEBS=$(find . -type f -iname '*.deb') + package_cloud push "${REPO}/${STREAM}/ubuntu/${FACTER_LSBNAME}/main/" ${DEBS} + ;; + CentOS) + FACTER_OSMAJREL=$(/usr/bin/facter operatingsystemmajrelease) + FACTER_ARCH=$(/usr/bin/facter architecture) + RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm') + package_cloud push "${REPO}/${STREAM}/el/${FACTER_OSMAJREL}/os/${FACTER_ARCH}/" ${RPMS} + ;; + openSUSE) + # Use /etc/os-release on openSUSE to get $VERSION + . /etc/os-release + RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm' | grep -v 'vpp-ext-deps') + VPP_EXT_RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm' | grep 'vpp-ext-deps') + package_cloud push "${REPO}/${STREAM}/opensuse/${VERSION}/" ${RPMS} + # This file may have already been uploaded. Don't error out if it exists. + package_cloud push "${REPO}/${STREAM}/opensuse/${VERSION}/" ${VPP_EXT_RPMS} --skip-errors + ;; + esac +fi diff --git a/docker/vpp/vpp-ubuntu16/files/sshconfig b/docker/vpp/vpp-ubuntu16/files/sshconfig new file mode 100644 index 000000000..8dd13540f --- /dev/null +++ b/docker/vpp/vpp-ubuntu16/files/sshconfig @@ -0,0 +1,3 @@ +Host * + StrictHostKeyChecking no + UserKnownHostsFile=/dev/null |