mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 14:11:07 +02:00
maint(*): Delete special case code for amd64-generic
This commit is contained in:
parent
46e2e17697
commit
2f8f0159f8
@ -134,11 +134,6 @@ mkdir -p "${BUILD_DIR}"
|
||||
DISK_LAYOUT_SUFFIX=$(portageq-$BOARD envvar COREOS_DISK_LAYOUT_SUFFIX)
|
||||
DISK_LAYOUT="${FLAGS_disk_layout:-base}${DISK_LAYOUT_SUFFIX}"
|
||||
|
||||
# Temporary hack until generic images are completely deleted
|
||||
if [[ "${FLAGS_group}" == "alpha" && "$BOARD" == "amd64-generic" ]]; then
|
||||
FLAGS_group="dev-channel"
|
||||
fi
|
||||
|
||||
# Create the base image.
|
||||
create_base_image "${PRISTINE_IMAGE_NAME}" "${DISK_LAYOUT}" "${FLAGS_group}"
|
||||
if should_build_image ${PRISTINE_IMAGE_NAME}; then
|
||||
|
@ -28,11 +28,7 @@ ROOT_FS_DIR="$FLAGS_root"
|
||||
COREOS_VERSION_NAME="CoreOS"
|
||||
COREOS_VERSION_AUSERVER=""
|
||||
if [[ -n "${FLAGS_group}" ]]; then
|
||||
if [[ "${FLAGS_board}" == "amd64-usr" ]]; then
|
||||
COREOS_VERSION_AUSERVER="https://public.update.core-os.net/v1/update/"
|
||||
elif [[ "${FLAGS_board}" == "amd64-generic" ]]; then
|
||||
COREOS_VERSION_AUSERVER="https://api.core-os.net/v1/update/"
|
||||
fi
|
||||
fi
|
||||
|
||||
# DISTRIB_* are the standard lsb-release names
|
||||
|
@ -25,8 +25,8 @@ AKI["sa-east-1"]=aki-c88f51d5
|
||||
|
||||
readonly COREOS_EPOCH=1372636800
|
||||
VERSION="master"
|
||||
BOARD="amd64-generic"
|
||||
GROUP=""
|
||||
BOARD="amd64-usr"
|
||||
GROUP="alpha"
|
||||
IMAGE="coreos_production_ami_image.bin.bz2"
|
||||
URL_FMT="http://storage.core-os.net/coreos/%s/%s/$IMAGE"
|
||||
IMG_URL=""
|
||||
@ -35,8 +35,8 @@ IMG_PATH=""
|
||||
USAGE="Usage: $0 [-V 1.2.3] [-p path/image.bz2 | -u http://foo/image.bz2]
|
||||
Options:
|
||||
-V VERSION Set the version of this AMI, default is 'master'
|
||||
-b BOARD Set to the board name, amd64-usr or amd64-generic
|
||||
-g GROUP Set the update group, default is based on BOARD
|
||||
-b BOARD Set to the board name, default is amd64-usr
|
||||
-g GROUP Set the update group, default is alpha or master
|
||||
-p PATH Path to compressed disk image, overrides -u
|
||||
-u URL URL to compressed disk image, derived from -V if unset.
|
||||
-K KEY Path to Amazon API private key.
|
||||
@ -92,16 +92,6 @@ if [[ "$VERSION" == "master" ]]; then
|
||||
GROUP="master"
|
||||
fi
|
||||
|
||||
if [[ -z "$GROUP" ]]; then
|
||||
if [[ "$BOARD" == "amd64-generic" ]]; then
|
||||
GROUP="dev-channel"
|
||||
elif [[ "$BOARD" == "amd64-usr" ]]; then
|
||||
GROUP="alpha"
|
||||
else
|
||||
GROUP="$BOARD"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Size of AMI file system
|
||||
# TODO: Perhaps define size and arch in a metadata file image_to_vm creates?
|
||||
size=8 # GB
|
||||
|
@ -26,8 +26,8 @@ AKI["sa-east-1"]=aki-c88f51d5
|
||||
USAGE="Usage: $0 -a ami-id
|
||||
-a ami-id ID of the AMI to be coppied.
|
||||
-V VERSION Find AMI by CoreOS version.
|
||||
-b BOARD Set to the board name, amd64-usr or amd64-generic
|
||||
-g GROUP Set the update group, default is based on BOARD
|
||||
-b BOARD Set to the board name, default is amd64-usr
|
||||
-g GROUP Set the update group, default is alpha
|
||||
-K KEY Path to Amazon API private key.
|
||||
-C CERT Path to Amazon API key certificate.
|
||||
-h this ;-)
|
||||
@ -38,8 +38,8 @@ This script must be run from an ec2 host with the ec2 tools installed.
|
||||
|
||||
AMI=
|
||||
VER=
|
||||
BOARD="amd64-generic"
|
||||
GROUP=""
|
||||
BOARD="amd64-usr"
|
||||
GROUP="alpha"
|
||||
|
||||
while getopts "a:V:b:g:K:C:hv" OPTION
|
||||
do
|
||||
@ -66,16 +66,6 @@ if [[ -z "$VER" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$GROUP" ]]; then
|
||||
if [[ "$BOARD" == "amd64-generic" ]]; then
|
||||
GROUP="dev-channel"
|
||||
elif [[ "$BOARD" == "amd64-usr" ]]; then
|
||||
GROUP="alpha"
|
||||
else
|
||||
GROUP="$BOARD"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$AMI" ]]; then
|
||||
AMI=$(ec2-describe-images -F name="CoreOS-$GROUP-$VER" | grep -m1 ^IMAGE \
|
||||
| cut -f2) || true # Don't die silently, error messages are good
|
||||
|
@ -14,8 +14,8 @@ set -e -o pipefail
|
||||
USAGE="Usage: $0 -a ami-id
|
||||
-a ami-id ID of the AMI to be tests
|
||||
-V VERSION Find AMI by CoreOS version.
|
||||
-b BOARD Set to the board name, amd64-usr or amd64-generic
|
||||
-g GROUP Set the update group, default is based on BOARD
|
||||
-b BOARD Set to the board name, default is amd64-usr
|
||||
-g GROUP Set the update group, default is alpha
|
||||
-K KEY Path to Amazon API private key.
|
||||
-C CERT Path to Amazon API key certificate.
|
||||
-h this ;-)
|
||||
@ -27,8 +27,8 @@ This script must be run from an ec2 host with the ec2 tools installed.
|
||||
|
||||
AMI=
|
||||
VER=
|
||||
BOARD="amd64-generic"
|
||||
GROUP=""
|
||||
BOARD="amd64-usr"
|
||||
GROUP="alpha"
|
||||
|
||||
while getopts "a:V:b:g:K:C:hv" OPTION
|
||||
do
|
||||
@ -50,16 +50,6 @@ if [[ $(id -u) -eq 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$GROUP" ]]; then
|
||||
if [[ "$BOARD" == "amd64-generic" ]]; then
|
||||
GROUP="dev-channel"
|
||||
elif [[ "$BOARD" == "amd64-usr" ]]; then
|
||||
GROUP="alpha"
|
||||
else
|
||||
GROUP="$BOARD"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$AMI" && -n "$VER" ]]; then
|
||||
AMI=$(ec2-describe-images -F name="CoreOS-$GROUP-$VER" | grep -m1 ^IMAGE \
|
||||
| cut -f2) || true # Don't die silently, error messages are good
|
||||
@ -96,11 +86,6 @@ echo "OK ($key_name)"
|
||||
zoneurl=http://instance-data/latest/meta-data/placement/availability-zone
|
||||
zone=$(curl --fail -s $zoneurl)
|
||||
region=$(echo $zone | sed 's/.$//')
|
||||
|
||||
token=$(uuidgen)
|
||||
if [[ "$BOARD" == "amd64-generic" ]]; then
|
||||
userdata="$token"
|
||||
else
|
||||
discovery=$(curl --fail -s https://discovery.etcd.io/new)
|
||||
userdata="#cloud-config
|
||||
|
||||
@ -115,7 +100,6 @@ coreos:
|
||||
- name: fleet.service
|
||||
command: start
|
||||
"
|
||||
fi
|
||||
|
||||
echo -n "Booting instances... "
|
||||
instances=$(ec2-run-instances \
|
||||
@ -157,6 +141,7 @@ echo "OK"
|
||||
|
||||
echo -n "Testing etcd... "
|
||||
test_key="v1/keys/test"
|
||||
token=$(uuidgen)
|
||||
# XXX: the sleep *should never* be required, this is a bug in etcd
|
||||
sleep 5
|
||||
curl --fail -s -L "${ips[0]}:4001/$test_key" -d value="$token" > /dev/null
|
||||
|
@ -18,8 +18,8 @@ AKI["sa-east-1"]=aki-c88f51d5
|
||||
|
||||
USAGE="Usage: $0 -V 100.0.0
|
||||
-V VERSION Find AMI by CoreOS version. (required)
|
||||
-b BOARD Set to the board name, amd64-usr or amd64-generic
|
||||
-g GROUP Set the update group, default is based on BOARD
|
||||
-b BOARD Set to the board name, default is amd64-usr
|
||||
-g GROUP Set the update group, default is alpha
|
||||
-K KEY Path to Amazon API private key.
|
||||
-C CERT Path to Amazon API key certificate.
|
||||
-h this ;-)
|
||||
@ -32,8 +32,8 @@ IMAGE="coreos_production_ami"
|
||||
URL_FMT="gs://storage.core-os.net/coreos/%s/%s/${IMAGE}_%s.txt"
|
||||
AMI=
|
||||
VER=
|
||||
BOARD="amd64-generic"
|
||||
GROUP=""
|
||||
BOARD="amd64-usr"
|
||||
GROUP="alpha"
|
||||
|
||||
while getopts "V:b:g:K:C:hv" OPTION
|
||||
do
|
||||
@ -60,16 +60,6 @@ if [[ ! -n "$VER" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$GROUP" ]]; then
|
||||
if [[ "$BOARD" == "amd64-generic" ]]; then
|
||||
GROUP="dev-channel"
|
||||
elif [[ "$BOARD" == "amd64-usr" ]]; then
|
||||
GROUP="alpha"
|
||||
else
|
||||
GROUP="$BOARD"
|
||||
fi
|
||||
fi
|
||||
|
||||
declare -A AMIS
|
||||
for r in "${!AKI[@]}"; do
|
||||
AMI=$(ec2-describe-images --region=${r} -F name="CoreOS-$GROUP-$VER" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user