diff --git a/Makefile b/Makefile index 96da814e..e84ff0db 100755 --- a/Makefile +++ b/Makefile @@ -60,6 +60,11 @@ hyperv: .dapper APPEND_SYSTEM_IMAGES="rancher/os-hypervvmtools:v4.14.85-rancher-1" \ ./.dapper hyperv-release 2>&1 | tee dist/release.log +4glte: .dapper + mkdir -p dist + APPEND_SYSTEM_IMAGES="rancher/os-modemmanager:v1.6.4-1" \ + ./.dapper release-4glte 2>&1 | tee dist/release.log + help: @./scripts/help diff --git a/config/schema.go b/config/schema.go index 3a610855..03b47d2b 100644 --- a/config/schema.go +++ b/config/schema.go @@ -89,7 +89,7 @@ var schema = `{ "https_proxy": {"type": "string"}, "no_proxy": {"type": "string"}, "wifi_networks": {"type": "object"}, - "modem_networks": {"type": "array"} + "modem_networks": {"type": "object"} } }, diff --git a/pkg/netconf/types.go b/pkg/netconf/types.go index 65b5b991..950b6704 100644 --- a/pkg/netconf/types.go +++ b/pkg/netconf/types.go @@ -1,16 +1,16 @@ package netconf type NetworkConfig struct { - PreCmds []string `yaml:"pre_cmds,omitempty"` - DHCPTimeout int `yaml:"dhcp_timeout,omitempty"` - DNS DNSConfig `yaml:"dns,omitempty"` - Interfaces map[string]InterfaceConfig `yaml:"interfaces,omitempty"` - PostCmds []string `yaml:"post_cmds,omitempty"` - HTTPProxy string `yaml:"http_proxy,omitempty"` - HTTPSProxy string `yaml:"https_proxy,omitempty"` - NoProxy string `yaml:"no_proxy,omitempty"` - WifiNetworks map[string]WifiNetworkConfig `yaml:"wifi_networks,omitempty"` - ModemNetworks []ModemNetworkConfig `yaml:"modem_networks,omitempty"` + PreCmds []string `yaml:"pre_cmds,omitempty"` + DHCPTimeout int `yaml:"dhcp_timeout,omitempty"` + DNS DNSConfig `yaml:"dns,omitempty"` + Interfaces map[string]InterfaceConfig `yaml:"interfaces,omitempty"` + PostCmds []string `yaml:"post_cmds,omitempty"` + HTTPProxy string `yaml:"http_proxy,omitempty"` + HTTPSProxy string `yaml:"https_proxy,omitempty"` + NoProxy string `yaml:"no_proxy,omitempty"` + WifiNetworks map[string]WifiNetworkConfig `yaml:"wifi_networks,omitempty"` + ModemNetworks map[string]ModemNetworkConfig `yaml:"modem_networks,omitempty"` } type InterfaceConfig struct { @@ -61,6 +61,5 @@ type WifiNetworkConfig struct { type ModemNetworkConfig struct { Apn string `yaml:"apn"` - Interface string `yaml:"interface"` ExtraArgs string `yaml:"extra_args,omitempty"` } diff --git a/scripts/layout-initrd b/scripts/layout-initrd index b15aa69f..976ecbf1 100755 --- a/scripts/layout-initrd +++ b/scripts/layout-initrd @@ -43,6 +43,18 @@ if [ -e ".make-vmware" ]; then wget -O ${INITRD_DIR}/usr/share/ros/services-cache/${SERVICE_OPEN_VMTOOLS_URL_MD5} ${SERVICE_OPEN_VMTOOLS_URL} fi +if [ -e ".make-4glte" ]; then + SERVICE_URL=${OS_SERVICES_REPO}/${REPO_VERSION} + SERVICE_INDEX_URL="${SERVICE_URL}/index.yml" + SERVICE_MODEM_MANAGER_URL="${SERVICE_URL}/m/modem-manager.yml" + SERVICE_INDEX_URL_MD5=$(echo -n ${SERVICE_INDEX_URL}|md5sum|cut -d ' ' -f1) + SERVICE_MODEM_MANAGER_URL_MD5=$(echo -n ${SERVICE_MODEM_MANAGER_URL}|md5sum|cut -d ' ' -f1) + + mkdir -p ${INITRD_DIR}/usr/share/ros/services-cache/ + wget -O ${INITRD_DIR}/usr/share/ros/services-cache/${SERVICE_INDEX_URL_MD5} ${SERVICE_INDEX_URL} + wget -O ${INITRD_DIR}/usr/share/ros/services-cache/${SERVICE_MODEM_MANAGER_URL_MD5} ${SERVICE_MODEM_MANAGER_URL} +fi + # TODO: usr/lib dir is overwritten by the kernel modules and firmware ln -s ${INITRD_DIR}/usr/share/ros/os-release ${INITRD_DIR}/usr/lib/ ln -s ${INITRD_DIR}/usr/share/ros/os-release ${INITRD_DIR}/usr/etc/ diff --git a/scripts/release-4glte b/scripts/release-4glte new file mode 100755 index 00000000..a88bd0f1 --- /dev/null +++ b/scripts/release-4glte @@ -0,0 +1,25 @@ +#!/bin/bash +set -ex + +cd $(dirname $0)/.. + +touch .make-4glte + +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/4glte/initrd" >> ./dist/publish_gss_latest.sh + echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/${VERSION}/4glte/initrd" >> ./dist/publish_gss_${VERSION}.sh + ;; + "rancheros.iso" | "rootfs.tar.gz") + echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/latest/4glte/${file}" >> ./dist/publish_gss_latest.sh + echo "gsutil cp dist/artifacts/${file} gs://releases.rancher.com/os/${VERSION}/4glte/${file}" >> ./dist/publish_gss_${VERSION}.sh + ;; + esac +done \ No newline at end of file