1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 14:48:55 +00:00

Use OS_AUTOFORMAT instead of VMWARE_AUTOFORMAT

This commit is contained in:
niusmallnan
2019-01-21 09:56:40 +08:00
committed by niusmallnan
parent e1782ad081
commit ab7abbf132
4 changed files with 10 additions and 10 deletions

View File

@@ -73,6 +73,7 @@ ARG OS_SERVICES_REPO=https://raw.githubusercontent.com/${OS_REPO}/os-services
ARG IMAGE_NAME=${OS_REPO}/os
ARG OS_CONSOLE=default
ARG OS_AUTOFORMAT=false
ARG OS_BASE_URL_amd64=https://github.com/rancher/os-base/releases/download/v2018.02.7-4/os-base_amd64.tar.xz
ARG OS_BASE_URL_arm64=https://github.com/rancher/os-base/releases/download/v2018.02.7-4/os-base_arm64.tar.xz
@@ -87,7 +88,6 @@ ARG SYSTEM_DOCKER_URL_arm64=https://github.com/rancher/os-system-docker/releases
ARG USER_DOCKER_VERSION=18.06.1
ARG USER_DOCKER_ENGINE_VERSION=docker-${USER_DOCKER_VERSION}-ce
ARG VMWARE_AUTOFORMAT=1
ARG AZURE_SERVICE=false
######################################################
@@ -120,6 +120,7 @@ ENV BUILD_DOCKER_URL=BUILD_DOCKER_URL_${ARCH} \
OS_REPO=${OS_REPO} \
OS_SERVICES_REPO=${OS_SERVICES_REPO} \
OS_CONSOLE=${OS_CONSOLE} \
OS_AUTOFORMAT=${OS_AUTOFORMAT} \
REPO_VERSION=master \
SELINUX_POLICY_URL=${SELINUX_POLICY_URL} \
SYSTEM_DOCKER_URL=SYSTEM_DOCKER_URL_${ARCH} \
@@ -127,7 +128,6 @@ ENV BUILD_DOCKER_URL=BUILD_DOCKER_URL_${ARCH} \
SYSTEM_DOCKER_URL_arm64=${SYSTEM_DOCKER_URL_arm64} \
USER_DOCKER_VERSION=${USER_DOCKER_VERSION} \
USER_DOCKER_ENGINE_VERSION=${USER_DOCKER_ENGINE_VERSION} \
VMWARE_AUTOFORMAT=${VMWARE_AUTOFORMAT} \
AZURE_SERVICE=${AZURE_SERVICE}
ENV PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH

View File

@@ -1 +0,0 @@
APPEND rancher.autologin=tty1 rancher.autologin=ttyS0 rancher.autologin=ttyS1 rancher.autologin=ttyS1 rancher.state.autoformat=[/dev/sda,/dev/vda] rancher.state.dev=LABEL=RANCHER_STATE console=tty1 console=ttyS0 console=ttyS1 printk.devkmsg=on panic=10 ${APPEND}

View File

@@ -20,13 +20,14 @@ popd
DIST=$(pwd)/dist
echo "mkdir -p ${DIST}/boot/isolinux/"
mkdir -p ${DIST}/boot/isolinux/
cat scripts/isolinux.cfg | envsubst > ${DIST}/boot/isolinux/isolinux.cfg
cat scripts/isolinux_label.cfg | LABEL=${VERSION} envsubst > ${DIST}/boot/linux-current.cfg
#cat scripts/isolinux_label.cfg | LABEL=debug APPEND="rancher.debug=true" envsubst > ${DIST}/boot/linux-previous.cfg
if [ "$VMWARE_AUTOFORMAT" = 1 ] && [ -e ".make-vmware" ];then
cat scripts/global-vmware.cfg | LABEL=${VERSION} envsubst > ${DIST}/boot/global.cfg
cat scripts/isolinux.cfg | envsubst > ${DIST}/boot/isolinux/isolinux.cfg
cat scripts/isolinux_label.cfg | LABEL=${VERSION} envsubst > ${DIST}/boot/linux-current.cfg
#cat scripts/isolinux_label.cfg | LABEL=debug APPEND="rancher.debug=true" envsubst > ${DIST}/boot/linux-previous.cfg
if [ "$OS_AUTOFORMAT" = "true" ]; then
APPEND_AUTOFORMAT="rancher.state.autoformat=[/dev/sda,/dev/vda] rancher.state.dev=LABEL=RANCHER_STATE rancher.state.wait=true"
cat scripts/global.cfg | APPEND="$APPEND_AUTOFORMAT" envsubst > ${DIST}/boot/global.cfg
else
cat scripts/global.cfg | LABEL=${VERSION} envsubst > ${DIST}/boot/global.cfg
cat scripts/global.cfg | envsubst > ${DIST}/boot/global.cfg
fi
cp scripts/rancher.png ${DIST}/boot/

View File

@@ -11,7 +11,7 @@ source ./scripts/version
touch dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
chmod 755 dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
if [ "$VMWARE_AUTOFORMAT" = 1 ]; then
if [ "$OS_AUTOFORMAT" = "true" ]; then
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/latest/vmware/rancheros-autoformat.iso" >> ./dist/publish_gss_latest.sh
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/${VERSION}/vmware/rancheros-autoformat.iso" >> ./dist/publish_gss_${VERSION}.sh
echo "gsutil cp dist/artifacts/rancheros.iso gs://releases.rancher.com/os/latest/rancheros-vmware.iso" >> ./dist/publish_gss_latest.sh