├── version ├── debian ├── compat ├── format ├── on-imagebuilder.install ├── rules ├── control └── changelog ├── .gitignore ├── ipxe ├── default.ipxe ├── general.h ├── dhcp.h └── Dockerfile ├── oem ├── raid │ ├── entry.bash │ └── Dockerfile ├── dell-raid │ ├── entry.bash │ └── Dockerfile ├── intel-flash │ ├── entry.bash │ └── Dockerfile ├── quanta-flash │ ├── entry.bash │ └── Dockerfile └── secure-erase │ ├── entry.bash │ └── Dockerfile ├── docker-entrypoint.sh ├── extra ├── make-cfg.sh ├── gen-debversion.sh └── make-deb.sh ├── Dockerfile ├── .bintray-deb.json.in ├── discovery ├── entry.bash └── Dockerfile ├── .bintray-gen.json ├── syslinux ├── Dockerfile └── 0001-Fix-compiling-failure-on-Ubuntu-14.04.patch ├── .travis.yml ├── HWIMO-BUILD ├── Vagrantfile ├── README.md └── LICENSE /version: -------------------------------------------------------------------------------- 1 | 2.60.7 -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vagrant 3 | -------------------------------------------------------------------------------- /ipxe/default.ipxe: -------------------------------------------------------------------------------- 1 | #!ipxe 2 | echo MonoRail iPXE 3 | set user-class MonoRail 4 | autoboot 5 | -------------------------------------------------------------------------------- /debian/on-imagebuilder.install: -------------------------------------------------------------------------------- 1 | common var/renasar/on-http/static/http 2 | pxe/* var/renasar/on-tftp/static/tftp 3 | -------------------------------------------------------------------------------- /ipxe/general.h: -------------------------------------------------------------------------------- 1 | // # general configuration file for iPXE 2 | 3 | #define IMAGE_COMBOOT 4 | #define CONSOLE_SYSLOG 5 | #define VLAN_CMD 6 | -------------------------------------------------------------------------------- /oem/raid/entry.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | curl -s http://$SERVER:$PORT/api/current/tasks/bootstrap.js?macAddress=$MAC | node > /tmp/bootstrap.log 4 | exit $? 5 | -------------------------------------------------------------------------------- /oem/dell-raid/entry.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | curl -s http://$SERVER:$PORT/api/current/tasks/bootstrap.js?macAddress=$MAC | node > /tmp/bootstrap.log 4 | exit $? 5 | -------------------------------------------------------------------------------- /oem/intel-flash/entry.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | curl -s http://$SERVER:$PORT/api/current/tasks/bootstrap.js?macAddress=$MAC | node > /tmp/bootstrap.log 4 | exit $? 5 | -------------------------------------------------------------------------------- /oem/quanta-flash/entry.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | curl -s http://$SERVER:$PORT/api/current/tasks/bootstrap.js?macAddress=$MAC | node > /tmp/bootstrap.log 4 | exit $? 5 | -------------------------------------------------------------------------------- /oem/secure-erase/entry.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | curl -s http://$SERVER:$PORT/api/current/tasks/bootstrap.js?macAddress=$MAC | node > /tmp/bootstrap.log 4 | exit $? 5 | -------------------------------------------------------------------------------- /docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright 2016, EMC, Inc. 4 | 5 | # set -x 6 | 7 | cp -a -f /RackHD/downloads/* /RackHD/files/ 8 | 9 | while true; do 10 | date; 11 | sleep 120; # 2 minutes 12 | # sleep 21600; # 6 hours 13 | done 14 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | 4 | # Uncomment this to turn on verbose mode. 5 | export DH_VERBOSE=1 6 | 7 | %: 8 | dh $@ 9 | 10 | override_dh_auto_configure: 11 | # do nothing 12 | 13 | override_dh_auto_build: 14 | # do nothing 15 | 16 | override_dh_usrlocal: 17 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: on-imagebuilder 2 | Section: net 3 | Priority: optional 4 | Maintainer: Joe Heck 5 | Build-Depends: debhelper (>= 8.0.0) 6 | Standards-Version: 3.9.4 7 | 8 | 9 | Package: on-imagebuilder 10 | Architecture: all 11 | Depends: ${misc:Depends} 12 | Description: on-imagebuilder 13 | Common microkernel files for monorail workflow engine. 14 | -------------------------------------------------------------------------------- /extra/make-cfg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script will modify .bintray-deb.json for deployment on bintray 4 | 5 | # Ensure we're always in the right directory. 6 | SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" 7 | cd $SCRIPT_DIR/.. 8 | 9 | #Modify bintray cfg 10 | #Use different COMPONENT to differ the apt source of release and ci-builds 11 | VERSION=$(./extra/gen-debversion.sh) 12 | 13 | sed -e "s/#REVERSION#/${VERSION}/g" \ 14 | .bintray-deb.json.in > .bintray-deb.json -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:latest 2 | 3 | # on-imagebuilder docker build just package the static files into an image. 4 | # So before docker build the static files must have been built and stored 5 | # in on-imagebuilder directory. Default folders are common and pxe. 6 | # You can use your own folders with 7 | # docker build --build-arg common= ... 8 | # Following Dockerfile rules, the path must be inside the context of the build. 9 | 10 | ARG common_files=./common/* 11 | ARG pxe_files=./pxe/* 12 | 13 | RUN mkdir -p /RackHD/downloads 14 | COPY ${pxe_files} /RackHD/downloads/ 15 | 16 | RUN mkdir -p /RackHD/downloads/common 17 | COPY ${common_files} /RackHD/downloads/common/ 18 | 19 | VOLUME /RackHD/files 20 | 21 | COPY ./docker-entrypoint.sh /docker-entrypoint.sh 22 | 23 | CMD [ "/docker-entrypoint.sh" ] 24 | 25 | -------------------------------------------------------------------------------- /extra/gen-debversion.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ex 3 | 4 | # 5 | # This script will generate var DEBRANCH 6 | # DEBRANCH format is ${SYMBOL}-${DATESTRING} 7 | # 8 | 9 | DEBDIR="./debian" 10 | if [ ! -d "${DEBDIR}" ]; then 11 | echo "Debian directory ${DEBDIR} doesn't exist" 12 | exit 1 13 | fi 14 | 15 | # Version in changelog will be assigned when branch created 16 | # The version in pushed tag will be exactly the same with that in changelog 17 | VERSION=$(dpkg-parsechangelog | grep ^Version | cut -d' ' -f2 | cut -d' ' -f1) 18 | GIT_COMMIT_DATE=$(git show -s --pretty="format:%ci") 19 | DATE_STRING=$(date -d "$GIT_COMMIT_DATE" -u +"%Y%m%dUTC") 20 | GIT_COMMIT_HASH=$(git show -s --pretty="format:%h") 21 | if [ -z "$DEBVERSION" ]; then 22 | DEBVERSION=${VERSION}-${DATE_STRING}-${GIT_COMMIT_HASH} 23 | fi 24 | echo $DEBVERSION 25 | -------------------------------------------------------------------------------- /.bintray-deb.json.in: -------------------------------------------------------------------------------- 1 | { 2 | "package": { 3 | "name": "on-imagebuilder", 4 | "repo": "debian", 5 | "subject": "rackhd-mirror", 6 | "vcs_url": "https://github.com/RackHD/on-imagebuilder.git", 7 | "licenses": ["Apache-2.0"] 8 | }, 9 | 10 | "version": { 11 | "name": "#REVERSION#" 12 | }, 13 | 14 | "files": 15 | [ 16 | { 17 | "includePattern": "deb/(.*)", 18 | "uploadPattern": "$1", 19 | "matrixParams": 20 | { 21 | "override": 1, 22 | "deb_distribution": "trusty", 23 | "deb_component": "staging", 24 | "deb_architecture": "amd64" 25 | } 26 | } 27 | ], 28 | "publish": true 29 | } 30 | -------------------------------------------------------------------------------- /discovery/entry.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #start lldp daemon 4 | lldpd -dd & 5 | mv -f /usr/bin/ipmitool /usr/bin/ipmitool.real 6 | cat > /usr/bin/ipmitool < \$OUTPUT 10 | REALEXIT=\$? 11 | EXIT=\$REALEXIT 12 | if [ \$REALEXIT -ne 0 ]; then 13 | grep -A1 "Mezz Slot" \$OUTPUT | grep -q "Device not present" 14 | if [ \$? -eq 0 ]; then 15 | EXIT=0 16 | fi 17 | grep -A1 "FRU Device Description" \$OUTPUT | grep -q "Device not present" 18 | if [ \$? -eq 0 ]; then 19 | EXIT=0 20 | fi 21 | fi 22 | cat \$OUTPUT 23 | rm -f \$OUTPUT 24 | exit \$EXIT 25 | EOF 26 | chmod 755 /usr/bin/ipmitool 27 | 28 | curl -s http://$SERVER:$PORT/api/current/tasks/bootstrap.js?macAddress=$MAC | node > /tmp/bootstrap.log 29 | exit $? 30 | -------------------------------------------------------------------------------- /.bintray-gen.json: -------------------------------------------------------------------------------- 1 | { 2 | "package": { 3 | "name": "on-imagebuilder", 4 | "repo": "binary", 5 | "subject": "rackhd" 6 | }, 7 | 8 | "version": { 9 | "name": "1.0" 10 | }, 11 | 12 | "files": 13 | [ 14 | { 15 | "includePattern": "/tmp/on-imagebuilder/builds/(.*)", "uploadPattern": "builds/$1", 16 | "matrixParams": { "override": 1 } 17 | }, 18 | { 19 | "includePattern": "/tmp/on-imagebuilder/ipxe/(.*)", "uploadPattern": "ipxe/$1", 20 | "matrixParams": { "override": 1 } 21 | }, 22 | { 23 | "includePattern": "/tmp/on-imagebuilder/syslinux/(.*)", "uploadPattern": "syslinux/$1", 24 | "matrixParams": { "override": 1 } 25 | } 26 | ], 27 | "publish": true 28 | } -------------------------------------------------------------------------------- /oem/quanta-flash/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:jessie 2 | 3 | RUN apt-get update && apt-get install --no-install-recommends -y \ 4 | ipmitool \ 5 | python \ 6 | curl \ 7 | vim-tiny \ 8 | less \ 9 | ca-certificates \ 10 | sudo \ 11 | ifupdown \ 12 | udev \ 13 | && rm -rf /var/lib/apt/lists/* 14 | 15 | ENV NODE_VERSION 4.6.2 16 | RUN curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ 17 | && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ 18 | && rm "node-v$NODE_VERSION-linux-x64.tar.gz" 19 | 20 | RUN mkdir -p /opt/ami \ 21 | && mkdir -p /opt/socflash 22 | 23 | ADD ami /opt/ami 24 | ADD socflash /opt/socflash 25 | 26 | RUN chmod 755 /opt/ami/* \ 27 | && chmod 755 /opt/socflash/* 28 | 29 | ADD entry.bash /usr/local/bin/ 30 | CMD /usr/local/bin/entry.bash 31 | -------------------------------------------------------------------------------- /discovery/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:jessie 2 | 3 | RUN apt-get update && apt-get install --no-install-recommends -y \ 4 | ipmitool \ 5 | python \ 6 | curl \ 7 | vim-tiny \ 8 | less \ 9 | ca-certificates \ 10 | sudo \ 11 | dmidecode \ 12 | ifupdown \ 13 | lshw \ 14 | lsscsi \ 15 | pciutils \ 16 | ethtool \ 17 | smartmontools \ 18 | ohai \ 19 | lldpd \ 20 | hdparm \ 21 | udev \ 22 | && rm -rf /var/lib/apt/lists/* 23 | 24 | ENV NODE_VERSION 4.6.2 25 | RUN curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ 26 | && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ 27 | && rm "node-v$NODE_VERSION-linux-x64.tar.gz" 28 | ADD entry.bash /usr/local/bin/ 29 | CMD /usr/local/bin/entry.bash 30 | -------------------------------------------------------------------------------- /syslinux/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:jessie 2 | 3 | RUN apt-get update && apt-get install --no-install-recommends -y \ 4 | vim-tiny \ 5 | less \ 6 | python \ 7 | ca-certificates \ 8 | sudo \ 9 | git \ 10 | binutils-dev \ 11 | mktemp \ 12 | mtools \ 13 | nasm \ 14 | perl \ 15 | mingw32-binutils \ 16 | mingw-w64 \ 17 | e2fslibs-dev \ 18 | build-essential \ 19 | && rm -rf /var/lib/apt/lists/* 20 | 21 | ENV GITTAG syslinux-4.04 22 | 23 | RUN git clone https://git.kernel.org/pub/scm/boot/syslinux/syslinux.git \ 24 | && cd syslinux \ 25 | && git checkout $GITTAG 26 | 27 | WORKDIR syslinux 28 | 29 | ENV BUILD_ARTIFACT_PATH /build-syslinux-artifact-path 30 | RUN mkdir $BUILD_ARTIFACT_PATH 31 | 32 | ENV PATCH 0001-Fix-compiling-failure-on-Ubuntu-14.04.patch 33 | ADD $PATCH . 34 | 35 | RUN git apply $PATCH \ 36 | && make clean \ 37 | && make \ 38 | && cp gpxe/src/bin/undionly.kkpxe $BUILD_ARTIFACT_PATH 39 | 40 | CMD tail -f /dev/null 41 | -------------------------------------------------------------------------------- /oem/raid/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:jessie 2 | 3 | RUN apt-get update && apt-get install --no-install-recommends -y \ 4 | ipmitool \ 5 | python \ 6 | curl \ 7 | vim-tiny \ 8 | less \ 9 | ca-certificates \ 10 | sudo \ 11 | ifupdown \ 12 | dmidecode \ 13 | lshw \ 14 | lsscsi \ 15 | pciutils \ 16 | ethtool \ 17 | smartmontools \ 18 | ohai \ 19 | lldpd \ 20 | initramfs-tools \ 21 | apt-utils \ 22 | udev \ 23 | && rm -rf /var/lib/apt/lists/* 24 | 25 | ENV NODE_VERSION 4.6.2 26 | RUN curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ 27 | && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ 28 | && rm "node-v$NODE_VERSION-linux-x64.tar.gz" 29 | 30 | ARG STORCLI=storcli_1.17.08_all.deb 31 | ADD $STORCLI . 32 | RUN dpkg -i $STORCLI \ 33 | && rm $STORCLI 34 | 35 | ADD entry.bash /usr/local/bin/ 36 | CMD /usr/local/bin/entry.bash 37 | -------------------------------------------------------------------------------- /oem/secure-erase/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:jessie 2 | 3 | RUN apt-get update && apt-get install --no-install-recommends -y \ 4 | ipmitool \ 5 | python \ 6 | curl \ 7 | vim-tiny \ 8 | less \ 9 | ca-certificates \ 10 | sudo \ 11 | ifupdown \ 12 | sg3-utils \ 13 | hdparm \ 14 | coreutils \ 15 | scrub \ 16 | lsscsi \ 17 | lshw \ 18 | gdisk \ 19 | udev \ 20 | && rm -rf /var/lib/apt/lists/* 21 | 22 | ENV NODE_VERSION 4.6.2 23 | RUN curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ 24 | && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ 25 | && rm "node-v$NODE_VERSION-linux-x64.tar.gz" 26 | 27 | ARG PERCCLI=perccli_1.11.03-1_all.deb 28 | ADD $PERCCLI . 29 | RUN dpkg -i $PERCCLI \ 30 | && rm $PERCCLI 31 | 32 | ARG STORCLI=storcli_1.17.08_all.deb 33 | ADD $STORCLI . 34 | RUN dpkg -i $STORCLI \ 35 | && rm $STORCLI 36 | 37 | ADD entry.bash /usr/local/bin/ 38 | CMD /usr/local/bin/entry.bash 39 | -------------------------------------------------------------------------------- /oem/dell-raid/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:jessie 2 | 3 | RUN apt-get update && apt-get install --no-install-recommends -y \ 4 | ipmitool \ 5 | python \ 6 | curl \ 7 | vim-tiny \ 8 | less \ 9 | ca-certificates \ 10 | sudo \ 11 | ifupdown \ 12 | dmidecode \ 13 | lshw \ 14 | lsscsi \ 15 | pciutils \ 16 | ethtool \ 17 | smartmontools \ 18 | ohai \ 19 | lldpd \ 20 | initramfs-tools \ 21 | apt-utils \ 22 | hdparm \ 23 | udev \ 24 | && rm -rf /var/lib/apt/lists/* 25 | 26 | ENV NODE_VERSION 4.6.2 27 | RUN curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ 28 | && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ 29 | && rm "node-v$NODE_VERSION-linux-x64.tar.gz" 30 | 31 | ARG PERCCLI=perccli_1.11.03-1_all.deb 32 | ADD $PERCCLI . 33 | RUN dpkg -i $PERCCLI \ 34 | && rm $PERCCLI 35 | 36 | ADD entry.bash /usr/local/bin/ 37 | CMD /usr/local/bin/entry.bash 38 | -------------------------------------------------------------------------------- /oem/intel-flash/Dockerfile: -------------------------------------------------------------------------------- 1 | # Debian:wheezy is chosen to install lib32bz2-1.0 2 | FROM debian:wheezy 3 | 4 | RUN apt-get update && apt-get install --no-install-recommends -y \ 5 | ipmitool \ 6 | python \ 7 | curl \ 8 | vim-tiny \ 9 | less \ 10 | ca-certificates \ 11 | sudo \ 12 | ifupdown \ 13 | lib32z1 \ 14 | lib32ncurses5 \ 15 | lib32bz2-1.0 \ 16 | lib32gcc1 \ 17 | lib32stdc++6 \ 18 | unzip \ 19 | udev \ 20 | && rm -rf /var/lib/apt/lists/* 21 | 22 | ENV NODE_VERSION 4.6.2 23 | RUN curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ 24 | && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ 25 | && rm "node-v$NODE_VERSION-linux-x64.tar.gz" 26 | 27 | RUN mkdir -p /opt/intel 28 | 29 | ENV FLASHUPDT flashupdt 30 | ADD $FLASHUPDT /opt/intel 31 | 32 | ENV SYSCFG syscfg 33 | ADD $SYSCFG /opt/intel 34 | 35 | RUN chmod 755 /opt/intel/$FLASHUPDT \ 36 | && chmod 755 /opt/intel/$SYSCFG 37 | 38 | ADD entry.bash /usr/local/bin/ 39 | CMD /usr/local/bin/entry.bash 40 | -------------------------------------------------------------------------------- /ipxe/dhcp.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * At some point, ipxe folk decided to lower timeout values 4 | * for the dhcp proxy stage of dhcp init quite a bit. This 5 | * makes some sense, since it can greatly speed up the 6 | * situation where a dhcp server exist, but the proxy 7 | * server does not response and the intend is to continue 8 | * through to boot from disk anyway. However, for rackhd 9 | * case: 10 | * 1) that's not our use case (we either don't response to 11 | * dhcp at all OR we do want to use the proxy feature) 12 | * 2) The hooks to allow specialized profiles introduce a 13 | * 1 second delay when there is nothing there that 14 | * wants to use the hook (the normal case, by far) 15 | * 3) If you throw in slightly complex switch setup (MLAG 16 | * with native vlan, as an example), that stabilization 17 | * time can introduce a little more delay. 18 | * In this unlucky situation, 2 and 3 conspire to make the 19 | * first ipxe (monorail.ipxe) that goes out just barely, but 20 | * fairly consistently, miss the 4 second window the code 21 | * is cranked down to by default. Bummer. 22 | * 23 | * So, these defines push these back to the PXE spec defaults. 24 | * You can look at the real src/config/dhcp.h for comments about 25 | * each of these and what they mean. 26 | */ 27 | #undef DHCP_DISC_PROXY_TIMEOUT_SEC 28 | #undef DHCP_REQ_PROXY_TIMEOUT_SEC 29 | #undef PXEBS_MAX_TIMEOUT_SEC 30 | #define DHCP_DISC_PROXY_TIMEOUT_SEC 11 /* as per PXE spec */ 31 | #define DHCP_REQ_PROXY_TIMEOUT_SEC 7 /* as per PXE spec */ 32 | #define PXEBS_MAX_TIMEOUT_SEC 7 /* as per PXE spec */ 33 | -------------------------------------------------------------------------------- /extra/make-deb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ex 3 | 4 | # Ensure we're always in the right directory. 5 | SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" 6 | cd $SCRIPT_DIR/.. 7 | output_path=/tmp/on-imagebuilder 8 | 9 | # this appends a datestring formatting specifically to be increasing 10 | # based on the last date of the commit in this branch to provide increasing 11 | # DCH version numbers for building debian packages for bintray. 12 | if [ -z "$DEBFULLNAME" ]; then 13 | export DEBFULLNAME=`git log -n 1 --pretty=format:%an` 14 | fi 15 | 16 | if [ -z "$DEBEMAIL" ]; then 17 | export DEBEMAIL=`git log -n 1 --pretty=format:%ae` 18 | fi 19 | 20 | if [ -z "$DEBVERSION" ]; then 21 | export DEBVERSION=$(./extra/gen-debversion.sh) 22 | fi 23 | 24 | if [ -z "$DEBPKGVER" ]; then 25 | export DEBPKGVER=`git log -n 1 --pretty=oneline --abbrev-commit` 26 | fi 27 | 28 | if [ -z "$DCHOPTS" ]; then 29 | export DCHOPTS="-v ${DEBVERSION} -u low ${DEBPKGVER} -b -m" 30 | fi 31 | 32 | echo "DEBDIR: $DEBDIR" 33 | echo "DEBFULLNAME: $DEBFULLNAME" 34 | echo "DEBEMAIL: $DEBEMAIL" 35 | echo "DEBVERSION: $DEBVERSION" 36 | echo "DEBPKGVER: $DEBPKGVER" 37 | echo "DCHOPTS: $DCHOPTS" 38 | 39 | 40 | if [ -d packagebuild ]; then 41 | rm -rf packagebuild 42 | fi 43 | mkdir packagebuild 44 | pushd packagebuild 45 | rsync -av ../debian . 46 | mkdir common 47 | mkdir pxe 48 | sudo cp $output_path/builds/* common/ 49 | sudo cp $output_path/syslinux/* pxe/ 50 | sudo cp $output_path/ipxe/* pxe/ 51 | git log -n 1 --pretty=format:%h.%ai.%s > commitstring.txt 52 | dch ${DCHOPTS} 53 | debuild --no-lintian --no-tgz-check -us -uc 54 | popd 55 | if [ ! -d deb ]; then 56 | mkdir deb 57 | fi 58 | 59 | cp -a *.deb deb/ 60 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | on-imagebuilder (2.60.7) UNRELEASED; urgency=low 2 | 3 | * Initial release 4 | * release 1.0.0 5 | * release 1.1.0 6 | * release 1.2.0 7 | * release 1.3.0 8 | * release 2.0.0 9 | * release 2.1.0 10 | * release 2.2.0 11 | * release 2.3.0 12 | * release 2.4.0 13 | * release 2.5.0 14 | * release 2.6.0 15 | * release 2.7.0 16 | * release 2.7.1 17 | * release 2.8.0 18 | * release 2.9.0 19 | * release 2.10.0 20 | * release 2.10.1 21 | * release 2.11.0 22 | * release 2.12.0 23 | * release 2.13.0 24 | * release 2.14.0 25 | * release 2.15.0 26 | * release 2.16.0 27 | * release 2.17.0 28 | * release 2.18.0 29 | * release 2.19.0 30 | * release 2.20.0 31 | * release 2.21.0 32 | * release 2.22.0 33 | * release 2.23.0 34 | * release 2.24.0 35 | * release 2.25.0 36 | * release 2.26.0 37 | * release 2.27.0 38 | * release 2.28.0 39 | * release 2.29.0 40 | * release 2.30.0 41 | * release 2.31.0 42 | * release 2.32.0 43 | * release 2.33.0 44 | * release 2.34.0 45 | * release 2.35.0 46 | * release 2.36.0 47 | * release 2.37.0 48 | * release 2.38.0 49 | * release 2.39.0 50 | * release 2.40.0 51 | * release 2.41.0 52 | * release 2.42.0 53 | * release 2.43.0 54 | * release 2.44.0 55 | * release 2.45.0 56 | * release 2.46.0 57 | * release 2.47.0 58 | * release 2.48.0 59 | * release 2.49.0 60 | * release 2.50.0 61 | * release 2.51.0 62 | * release 2.52.0 63 | * release 2.53.0 64 | * release 2.54.0 65 | * release 2.60.0 66 | * release 2.60.1 67 | * release 2.60.2 68 | * release 2.60.3 69 | * release 2.60.4 70 | * release 2.60.5 71 | * release 2.60.6 72 | * release 2.60.7 73 | 74 | -- rackhd Fri, 06 Jul 2018 22:31:33 +0000 75 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: bash 2 | sudo: required 3 | dist: trusty 4 | services: 5 | - docker 6 | addons: 7 | apt: 8 | packages: 9 | - dh-make 10 | - devscripts 11 | - debhelper 12 | - fakeroot 13 | before_script: 14 | - sudo apt-get update -q 15 | - sudo pip install ansible==2.0.2.0 16 | - sudo modprobe overlayfs 17 | script: 18 | - sudo ./build_all.sh 19 | before_deploy: 20 | - sudo chmod 644 /tmp/on-imagebuilder/builds/* 21 | - sudo chmod 644 /tmp/on-imagebuilder/ipxe/* 22 | - sudo chmod 644 /tmp/on-imagebuilder/syslinux/* 23 | - ./extra/make-cfg.sh 24 | - ./extra/make-deb.sh 25 | deploy: 26 | - provider: bintray 27 | file: .bintray-deb.json 28 | user: $MIRROR_BINTRAY_USER 29 | key: $MIRROR_BINTRAY_KEY 30 | on: 31 | branch: master 32 | 33 | - provider: bintray 34 | file: .bintray-gen.json 35 | user: $BINTRAY_USER 36 | key: $BINTRAY_KEY 37 | on: 38 | branch: master 39 | 40 | notifications: 41 | slack: 42 | rooms: 43 | - secure: "LL9DcQQBGZ7IhpzGHRsjFGjEjGFBCG5y4yDIWeGhKZGpFPzbHF2BJXRqdsnDiRozJ2b8BbYPDAcxwEUb6k8pN2Q8TWbGEzHApBfK/ak0T4X49mbjb3I/v218MUkMjPT5G6kTUY1t8WekQDt3Wo5IokZN1iOvy+Trz40/hsRuhN5YCH3MHUrWMCIlwJVbXD1kofw090CY9xc6XVmzgXMHXyVA+TfkOzJQ2T1DCdw4wqe5p3O9Y9/um3NGbCMbbpCTto2iMoiGOu03S+m/YDOgtT+15ieST3nhvFnuskpeWbYQ89nLqNbwjXchBr0G1Wy7l3M3eARA+drYHW7MnNwbUuTRn+EyLUu/xs32iRfMS4K77KD5zXfKnKWzpMLh3ckwpcliL7njoDoCn76p1d5GmlaBTyCWKNJudmAzgDYawmZOAfVzn/Keag5LoAdkQ9s3nVS2A1c/p1oGCWxYT69mZqigSClrlWO1uyUpReiw+2ZJNIerwn1aRQWCFcNefnTw+G81fxzRq68hJsg3MhrpQu57DIALg7ZJ95WqpfG91y0YaXgqfP3TDDtsxYSVGKcNsqTqPeNkatjaZuqqVVb/LfISIIoGV57/0CQbsA6seH8veJAtMn19kBCBJRqwPC6grMBOcd9nzZCLipW0a6cRWiomhfeLteo/vewmbo4c/kU=" 44 | on_success: never 45 | on_failure: always 46 | on_start: never 47 | on_pull_requests: false 48 | -------------------------------------------------------------------------------- /syslinux/0001-Fix-compiling-failure-on-Ubuntu-14.04.patch: -------------------------------------------------------------------------------- 1 | From 5136b8eb33bdd7e1ca9f9a3e649cb11ff979c350 Mon Sep 17 00:00:00 2001 2 | From: Andrew Hou 3 | Date: Thu, 14 Jan 2016 11:50:48 +0800 4 | Subject: [PATCH] Fix compiling failure on Ubuntu 14.04 5 | 6 | 1. Disable default devel config that has strict gcc 4.8.1 check on Ubuntu 14.04.3 7 | 2. Fix new ext2_fs.h location on Ubuntu 14.04.3 8 | 3. Apply new mingw64 tool on Ubuntu 14.04.3 9 | --- 10 | MCONFIG | 2 +- 11 | libinstaller/linuxioctl.h | 2 +- 12 | win64/find-mingw64.sh | 1 + 13 | 3 files changed, 3 insertions(+), 2 deletions(-) 14 | 15 | diff --git a/MCONFIG b/MCONFIG 16 | index a71fd13..b5adefa 100644 17 | --- a/MCONFIG 18 | +++ b/MCONFIG 19 | @@ -77,7 +77,7 @@ UMAKEDEPS = -Wp,-MT,$@,-MMD,$(dir $@).$(notdir $@).d 20 | 21 | # Items that are only appropriate during development; this file is 22 | # removed when tarballs are generated. 23 | --include $(topdir)/MCONFIG.devel 24 | +#-include $(topdir)/MCONFIG.devel 25 | 26 | # Local additions, like -DDEBUG can go here 27 | -include $(topdir)/MCONFIG.local 28 | diff --git a/libinstaller/linuxioctl.h b/libinstaller/linuxioctl.h 29 | index 7ef919a..100fd86 100644 30 | --- a/libinstaller/linuxioctl.h 31 | +++ b/libinstaller/linuxioctl.h 32 | @@ -19,7 +19,7 @@ 33 | 34 | #undef SECTOR_SIZE /* Defined in msdos_fs.h for no good reason */ 35 | #undef SECTOR_BITS 36 | -#include /* EXT2_IOC_* */ 37 | +#include /* EXT2_IOC_* */ 38 | 39 | #ifndef FAT_IOCTL_GET_ATTRIBUTES 40 | # define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32) 41 | diff --git a/win64/find-mingw64.sh b/win64/find-mingw64.sh 42 | index c45db56..eadaab5 100755 43 | --- a/win64/find-mingw64.sh 44 | +++ b/win64/find-mingw64.sh 45 | @@ -4,6 +4,7 @@ cc="$1" 46 | 47 | for prefix in \ 48 | mingw64- \ 49 | + x86_64-w64-mingw32- \ 50 | x86_64-pc-mingw64- \ 51 | x86_64-pc-mingw64msvc- \ 52 | x86_64-pc-mingw32- \ 53 | -- 54 | 1.9.1 55 | -------------------------------------------------------------------------------- /HWIMO-BUILD: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Build debian package for all images created by on-imagebuilder 5 | # 6 | # Input (environment variables): 7 | # * PKG_VERSION: The version of debian package, 8 | # such as: 1.3.1 (official release); 9 | # 10 | 11 | set -e 12 | output_path=/tmp/on-imagebuilder 13 | rm -rf $output_path 14 | mkdir -p $output_path 15 | bintray_repo=http://dl.bintray.com/rackhd/binary/builds 16 | #build static files 17 | sudo ./build_all.sh 18 | 19 | #prepare workplace for deb build 20 | rm -rf on-static-common* 21 | sudo rm -rf packagebuild 22 | mkdir packagebuild 23 | pushd packagebuild 24 | 25 | mkdir common 26 | mkdir pxe 27 | 28 | #add Microkernel images from bintray 29 | pushd $output_path/builds/ 30 | wget $bintray_repo/base.trusty.3.16.0-25-generic.squashfs.img 31 | wget $bintray_repo/discovery.overlay.cpio.gz 32 | wget $bintray_repo/initrd.img-3.16.0-25-generic 33 | wget $bintray_repo/vmlinuz-3.16.0-25-generic 34 | popd 35 | 36 | #copy static files 37 | sudo chmod 644 /tmp/on-imagebuilder/builds/* 38 | sudo chmod 644 /tmp/on-imagebuilder/ipxe/* 39 | sudo chmod 644 /tmp/on-imagebuilder/syslinux/* 40 | cp $output_path/builds/* common/ 41 | cp $output_path/syslinux/* pxe/ 42 | cp $output_path/ipxe/* pxe/ 43 | 44 | rsync -av ../debian . 45 | 46 | export DEBEMAIL="hwimo robots " 47 | export DEBFULLNAME="The HWIMO Robots" 48 | 49 | # If PKG_VERSION is not set as an environment variable 50 | # compute it as below: 51 | if [ -z "$PKG_VERSION" ];then 52 | GIT_COMMIT_DATE=$(git show -s --pretty="format:%ci") 53 | DATE_STRING=$(date -d "$GIT_COMMIT_DATE" -u +"%Y%m%dUTC") 54 | 55 | GIT_COMMIT_HASH=$(git show -s --pretty="format:%h") 56 | 57 | CHANGELOG_VERSION=$(dpkg-parsechangelog --show-field Version) 58 | 59 | PKG_VERSION="$CHANGELOG_VERSION-$DATE_STRING-$GIT_COMMIT_HASH" 60 | fi 61 | 62 | if [[ $PKG_VERSION =~ ^([0-9]+\.){2}[0-9]+$ ]];then 63 | # If version looks like 1.2.3, the build is official build. 64 | # So update the distribution of changelog from "UNRELEASED" to "unstable" 65 | dch -r "" 66 | else 67 | COMMIT_STR=`git log -n 1 --oneline` 68 | dch -v $PKG_VERSION -u low $COMMIT_STR -b -m 69 | fi 70 | 71 | debuild --no-lintian --no-tgz-check -us -uc 72 | popd 73 | 74 | sudo rm -rf packagebuild 75 | -------------------------------------------------------------------------------- /ipxe/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:jessie 2 | 3 | RUN apt-get update && apt-get install --no-install-recommends -y \ 4 | ipmitool \ 5 | python \ 6 | curl \ 7 | vim-tiny \ 8 | less \ 9 | ca-certificates \ 10 | sudo \ 11 | dmidecode \ 12 | ifupdown \ 13 | git \ 14 | liblzma-dev \ 15 | libz-dev \ 16 | syslinux \ 17 | genisoimage \ 18 | binutils-dev \ 19 | build-essential \ 20 | libiberty-dev \ 21 | udev \ 22 | && rm -rf /var/lib/apt/lists/* 23 | 24 | ENV GITBRANCH fd6d1f4660a37d75acba1c64e2e5f137307bbc31 25 | 26 | RUN git clone https://github.com/ipxe/ipxe.git \ 27 | && cd ipxe \ 28 | && git checkout $GITBRANCH 29 | 30 | WORKDIR ipxe/src 31 | ADD general.h config/local 32 | ADD dhcp.h config/local 33 | ADD default.ipxe . 34 | 35 | ENV BUILD_ARTIFACT_PATH /build-ipxe-artifact-path 36 | RUN mkdir $BUILD_ARTIFACT_PATH 37 | 38 | ###### 39 | # Group of ops to build our "general code", which is to say 40 | # the monorail.ipxe base image. The group build boths the 41 | # production monorail.ipxe, but also a couple of debug ones. 42 | RUN make clean \ 43 | && make EMBED=default.ipxe \ 44 | && cp bin/ipxe.pxe $BUILD_ARTIFACT_PATH/monorail.ipxe \ 45 | && cp bin/undionly.kpxe $BUILD_ARTIFACT_PATH/monorail-undionly.kpxe 46 | 47 | # Build the Intel specific/only version of iPXE 48 | RUN make bin/intel.pxe EMBED=default.ipxe \ 49 | && cp bin/intel.pxe $BUILD_ARTIFACT_PATH/monorail.intel.ipxe 50 | 51 | # Now for a version of the same to help debug communication issues. 52 | RUN make DEBUG=dhcp:9,tftp,config:9,netdevice bin/ipxe.pxe EMBED=default.ipxe \ 53 | && cp bin/ipxe.pxe $BUILD_ARTIFACT_PATH/monorail.ipxe.com_debug 54 | 55 | # Now for a version of the same to help debug more device-type issues. Note, this is called 56 | # ".debug" to match existing use of .debug. 57 | RUN make DEBUG=pci,device,intel bin/ipxe.pxe EMBED=default.ipxe \ 58 | && cp bin/ipxe.pxe $BUILD_ARTIFACT_PATH/monorail.ipxe.debug 59 | 60 | ##### 61 | # Group of ops for EFI builds targets 62 | # disable COMBOOT in general.h for EFI builds 63 | RUN sed -i '3 s/^/\/\//' config/local/general.h \ 64 | && make bin-x86_64-efi/snponly.efi EMBED=default.ipxe \ 65 | && make bin-i386-efi/snponly.efi \ 66 | && cp bin-x86_64-efi/snponly.efi $BUILD_ARTIFACT_PATH/monorail-efi64-snponly.efi \ 67 | && cp bin-i386-efi/snponly.efi $BUILD_ARTIFACT_PATH/monorail-efi32-snponly.efi 68 | 69 | CMD tail -f /dev/null 70 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # All Vagrant configuration is done below. The "2" in Vagrant.configure 5 | # configures the configuration version (we support older styles for 6 | # backwards compatibility). Please don't change it unless you know what 7 | # you're doing. 8 | Vagrant.configure(2) do |config| 9 | # The most common configuration options are documented and commented below. 10 | # For a complete reference, please see the online documentation at 11 | # https://docs.vagrantup.com. 12 | 13 | # Every Vagrant development environment requires a box. You can search for 14 | # boxes at https://atlas.hashicorp.com/search. 15 | config.vm.box = "rackhd/rackhd" 16 | 17 | config.vm.provider "virtualbox" do |v| 18 | v.memory = 2048 19 | v.cpus = 2 20 | v.customize ["modifyvm", :id, "--nictype1", "virtio"] 21 | end 22 | 23 | # Disable automatic box update checking. If you disable this, then 24 | # boxes will only be checked for updates when the user runs 25 | # `vagrant box outdated`. This is not recommended. 26 | # config.vm.box_check_update = false 27 | 28 | # Create a forwarded port mapping which allows access to a specific port 29 | # within the machine from a port on the host machine. In the example below, 30 | # accessing "localhost:8080" will access port 80 on the guest machine. 31 | # config.vm.network "forwarded_port", guest: 80, host: 8080 32 | 33 | # Create a private network, which allows host-only access to the machine 34 | # using a specific IP. 35 | # config.vm.network "private_network", ip: "192.168.33.10" 36 | 37 | # Create a public network, which generally matched to bridged network. 38 | # Bridged networks make the machine appear as another physical device on 39 | # your network. 40 | # config.vm.network "public_network" 41 | 42 | # Share an additional folder to the guest VM. The first argument is 43 | # the path on the host to the actual folder. The second argument is 44 | # the path on the guest to mount the folder. And the optional third 45 | # argument is a set of non-required options. 46 | # config.vm.synced_folder "../data", "/vagrant_data" 47 | 48 | # Provider-specific configuration so you can fine-tune various 49 | # backing providers for Vagrant. These expose provider-specific options. 50 | # Example for VirtualBox: 51 | # 52 | # config.vm.provider "virtualbox" do |vb| 53 | # # Display the VirtualBox GUI when booting the machine 54 | # vb.gui = true 55 | # 56 | # # Customize the amount of memory on the VM: 57 | # vb.memory = "1024" 58 | # end 59 | # 60 | # View the documentation for the provider you are using for more 61 | # information on available options. 62 | 63 | # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies 64 | # such as FTP and Heroku are also available. See the documentation at 65 | # https://docs.vagrantup.com/v2/push/atlas.html for more information. 66 | # config.push.define "atlas" do |push| 67 | # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" 68 | # end 69 | 70 | # Enable provisioning with a shell script. Additional provisioners such as 71 | # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the 72 | # documentation for more information about their specific syntax and use. 73 | config.vm.provision "shell", inline: <<-SHELL 74 | sudo apt-get -y install python-software-properties 75 | sudo apt-add-repository ppa:ansible/ansible 76 | sudo apt-get -y update 77 | sudo apt-get -y install ansible 78 | 79 | cd /vagrant 80 | sudo sh ./build_all.sh 81 | SHELL 82 | end 83 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | on-imagebuilder [![Build Status](https://travis-ci.org/RackHD/on-imagebuilder.svg?branch=master)](https://travis-ci.org/RackHD/on-imagebuilder) 2 | =============== 3 | 4 | Copyright 2015-2018, Dell EMC, Inc. 5 | 6 | This repository contains a set of scripts that uses [Docker](https://www.docker.com) to build 7 | docker images that run in [RancherOS](https://rancher.com/rancher-os), primarily for use 8 | with the [on-taskgraph workflow engine](https://github.com/rackhd/on-taskgraph). 9 | 10 | Requirements 11 | --------------- 12 | 13 | - Docker 14 | 15 | Overview 16 | --------------- 17 | 18 | ### Bootstrap process 19 | 20 | The images produced by these scripts are intended to be netbooted and run in RAM. 21 | The typical flow for how these images are used/booted is this: 22 | 23 | - Netboot `RacherOS`(kernel and initrd) via PXE/iPXE 24 | - The custom cloud-config file requests a `rackhd/micro` docker image from the boot server. 25 | It then starts a container with full container capabilities using the `rackhd/micro` docker image. 26 | 27 | Getting started 28 | --------------- 29 | 30 | ### Building default images and ipxe 31 | 32 | To build images, define an imagebuilding script (see `build_all.sh` or `build_oem.sh` for an example) or 33 | use the default one. For example, to build the default images: 34 | 35 | ``` 36 | $ cd on-imagebuilder/ 37 | $ sudo ./build_all.sh 38 | ``` 39 | 40 | The build artifacts will be located in these directories below (which are defined in the `./build_all.sh` file): 41 | - **/tmp/on-imagebuilder/builds/** : it includes the artifacts: 42 | * discovery.docker.tar.xz 43 | * initrd-*-rancher 44 | * vmlinuz-*-rancher 45 | 46 | - **/tmp/on-imagebuilder/ipxe/** : it includes the artifacts: 47 | * monorail-efi32-snponly.efi 48 | * monorail-efi64-snponly.efi 49 | * monorail.ipxe 50 | * monorail-undionly.kpxe 51 | 52 | - **/tmp/on-imagebuilder/syslinux** : it includes the artifacts: 53 | * undionly.kkpxe 54 | 55 | 56 | ### OEM tools 57 | 58 | * OEM docker images `raid` and `secure_erase` require storcli_1.17.08_all.deb being copied into the folder oem/raid or oem/secure_erase. 59 | User can download it from http://docs.avagotech.com/docs/1.17.08_StorCLI.zip. 60 | If a package with different name is to be used, user should use the build parameter `STORCLI`(see the example below). 61 | 62 | * OEM docker images `dell_raid` and `secure_erase` require perccli_1.11.03-1_all.deb being copied into the folder oem/dell_raid or oem/secure_erase. 63 | There is no .deb version perccli tool. User can download .rpm perccli from: 64 | https://downloads.dell.com/FOLDER02444760M/1/perccli-1.11.03-1_Linux_A00.tar.gz. 65 | 66 | Unzip the package and then use **alien** to get a .deb version perccli tool as below: 67 | 68 | ``` 69 | sudo apt-get install alien 70 | sudo alien -k perccli-1.11.03-1.noarch.rpm 71 | ``` 72 | Again, user can use a different perccli package via the build parameter `PERCCLI`(see the example below). 73 | 74 | * OEM docker image `intel-flash` requires `flashupdt` and `syscfg` under the folder oem/intel-flash. 75 | Download the files from [Intel Download Center](https://downloadcenter.intel.com). 76 | 77 | * OEM docker image `quanta-flash` requires directory `ami` and `socflash` under the folder oem/quanta-flash. 78 | The essential files used by RackHD are: 79 | 80 | ``` 81 | ami/afulnx_64 82 | ami/SCELNX_64 83 | socflash/socflash_x64 84 | ``` 85 | Get `SCELNX_64` from vendor, and `afulnx_64/socflash_x64` from [Quanta Download Center](https://www.qct.io/Download). 86 | 87 | 88 | **An example to use oem tools for secure-erase**(see more examples in `build_oem.sh`): 89 | 90 | ``` 91 | cd secure-erase 92 | sudo docker build -t rackhd/micro \ 93 | --build-arg PERCCLI=perccli_1.11.03-1_all.deb \ 94 | --build-arg STORCLI=storcli_1.17.08_all.deb . 95 | sudo docker save rackhd/micro | xz -z > secure.erase.docker.tar.xz 96 | copy secure.erase.docker.tar.xz to on-http/static/http/common 97 | ``` 98 | 99 | Licensing 100 | --------------- 101 | 102 | Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 103 | 104 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 105 | 106 | RackHD is a Trademark of Dell EMC 107 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------