Using Fedora Atomic 29 as default image

Fedora Atomic 27 has end of life for a while, it's time to replace it
with Fedora Atomic 29 now.

Task: 36356
Story: 2006441

Change-Id: Iab131745854b0b908be17bd17c7510cd54dde1f5
(cherry picked from commit 703de97cd4)
This commit is contained in:
Feilong Wang 2019-08-24 07:42:44 +12:00 committed by Bharat Kunwar
parent 5b007e6866
commit 7d71a148ab
3 changed files with 16 additions and 4 deletions

View File

@ -16,6 +16,7 @@
# - create_magnum_conf
# - init_magnum
# - magnum_register_image
# - magnum_configure_flavor
# - start_magnum
# - configure_iptables_magnum
# - configure_apache_magnum
@ -260,7 +261,7 @@ function magnum_register_image {
local atomic="$(echo $MAGNUM_GUEST_IMAGE_URL | grep -io 'atomic' || true;)"
if [ ! -z "$atomic" ]; then
magnum_image_property=$magnum_image_property"fedora-atomic"
magnum_image_property=$magnum_image_property"fedora-atomic --property hw_rng_model=virtio"
fi
local ubuntu="$(echo $MAGNUM_GUEST_IMAGE_URL | grep -io "ubuntu" || true;)"
if [ ! -z "$ubuntu" ]; then
@ -294,6 +295,16 @@ function magnum_register_image {
openstack --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT --os-image-api-version 2 image set $image_name $magnum_image_property
}
#magnum_configure_flavor - set hw_rng property for flavor to address the potential entropy issue
function magnum_configure_flavor {
local magnum_flavor_property="--property hw_rng:allowed=True --property hw_rng:rate_bytes=1024 --property hw_rng:rate_period=1"
local FLAVOR_LIST=$(openstack --os-url $NOVA_SERVICE_PROTOCOL://$NOVA_HOSTPORT --os-compute-api-version 2.1 flavor list -c Name -f value)
for flavor in ${FLAVOR_LIST}; do
openstack --os-url $NOVA_SERVICE_PROTOCOL://$NOVA_HOSTPORT --os-compute-api-version 2.1 flavor set $flavor $magnum_flavor_property
done
}
# install_magnumclient() - Collect source and prepare
function install_magnumclient {
if use_library_from_git "python-magnumclient"; then

View File

@ -13,7 +13,7 @@ if is_service_enabled magnum-api magnum-cond; then
echo_summary "Installing magnum"
install_magnum
MAGNUM_GUEST_IMAGE_URL=${MAGNUM_GUEST_IMAGE_URL:-"https://download.fedoraproject.org/pub/alt/atomic/stable/Fedora-Atomic-27-20180419.0/CloudImages/x86_64/images/Fedora-Atomic-27-20180419.0.x86_64.qcow2"}
MAGNUM_GUEST_IMAGE_URL=${MAGNUM_GUEST_IMAGE_URL:-"https://dl.fedoraproject.org/pub/alt/atomic/stable/Fedora-29-updates-20190820.0/AtomicHost/x86_64/images/Fedora-AtomicHost-29-20190820.0.x86_64.qcow2"}
IMAGE_URLS+=",${MAGNUM_GUEST_IMAGE_URL}"
LIBS_FROM_GIT="${LIBS_FROM_GIT},python-magnumclient"
@ -35,6 +35,7 @@ if is_service_enabled magnum-api magnum-cond; then
# Initialize magnum
init_magnum
magnum_register_image
magnum_configure_flavor
# Start the magnum API and magnum taskmgr components
echo_summary "Starting magnum"

View File

@ -88,8 +88,8 @@ elif [ "${coe}${special}" = "k8s-ironic" ]; then
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_DISK=10"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_EPHEMERAL_DISK=5"
else
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL='${NODEPOOL_ATOMIC_MIRROR}/atomic/stable/Fedora-Atomic-27-20180419.0/CloudImages/x86_64/images/Fedora-Atomic-27-20180419.0.x86_64.qcow2'"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_IMAGE_NAME='Fedora-Atomic-27-20180419.0.x86_64'"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL='${NODEPOOL_ATOMIC_MIRROR}/atomic/stable/Fedora-29-updates-20190820.0/AtomicHost/x86_64/images/Fedora-AtomicHost-29-20190820.0.x86_64.qcow2'"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_IMAGE_NAME='Fedora-AtomicHost-29-20190820.0.x86_64'"
fi
# Enable magnum plugin in the last step