1
0
mirror of https://github.com/rancher/os.git synced 2025-07-31 06:32:09 +00:00

Add azure support

This commit is contained in:
Jason-ZW 2018-12-14 15:39:41 +08:00
parent 03c090ed86
commit 78fad030ba
5 changed files with 42 additions and 1 deletions

View File

@ -86,6 +86,7 @@ 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
######################################################
# Set up environment and export all ARGS as ENV
@ -123,7 +124,8 @@ 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}
VMWARE_AUTOFORMAT=${VMWARE_AUTOFORMAT} \
AZURE_SERVICE=${AZURE_SERVICE}
ENV PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH
RUN mkdir -p ${DOWNLOADS}

View File

@ -60,6 +60,12 @@ hyperv: .dapper
APPEND_SYSTEM_IMAGES="rancher/os-hypervvmtools:v4.14.85-rancher-1" \
./.dapper release-hyperv 2>&1 | tee dist/release.log
azure: .dapper
mkdir -p dist
AZURE_SERVICE="true" \
APPEND_SYSTEM_IMAGES="rancher/os-hypervvmtools:v4.14.85-rancher-1 rancher/os-waagent:v2.2.34-1" \
./.dapper release-azure 2>&1 | tee dist/release.log
4glte: .dapper
mkdir -p dist
APPEND_SYSTEM_IMAGES="rancher/os-modemmanager:v1.6.4-1" \

View File

@ -21,6 +21,10 @@ rancher:
ssh:
daemon: true
hypervisor_service: true
services_include:
{{if eq "true" .AZURE_SERVICE -}}
waagent: true
{{end -}}
bootstrap:
bootstrap:
image: {{.OS_REPO}}/os-bootstrap:{{.VERSION}}{{.SUFFIX}}
@ -130,6 +134,7 @@ rancher:
- /var/lib/rancher/cache:/var/lib/rancher/cache
- /var/lib/rancher/conf:/var/lib/rancher/conf
- /var/lib/rancher:/var/lib/rancher
- /var/lib/waagent:/var/lib/waagent
- /var/log:/var/log
- /var/run:/var/run
container-data-volumes:

View File

@ -58,6 +58,9 @@ for file in $(ls .make-*); do
".make-hyperv")
cache_services "h/hyperv-vm-tools.yml"
;;
".make-azure")
cache_services "h/hyperv-vm-tools.yml w/waagent.yml"
;;
esac
done

25
scripts/release-azure Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
set -ex
cd $(dirname $0)/..
touch .make-azure
source ./scripts/version
./scripts/release-build
touch dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
chmod 755 dist/publish_gss_${VERSION}.sh dist/publish_gss_latest.sh
for file in $(ls dist/artifacts/); do
case $file in
"initrd-"*)
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/latest/azure/initrd" >> ./dist/publish_gss_latest.sh
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/${VERSION}/azure/initrd" >> ./dist/publish_gss_${VERSION}.sh
;;
"rancheros.iso" | "rootfs.tar.gz")
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/latest/azure/${file}" >> ./dist/publish_gss_latest.sh
echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/${VERSION}/azure/${file}" >> ./dist/publish_gss_${VERSION}.sh
;;
esac
done