Please allow for supporting alternative apt mirrors for UCA

Bug #1925838 reported by Paul Goins
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
charm-octavia-diskimage-retrofit
Fix Released
Wishlist
Unassigned

Bug Description

I'm working in an environment where the customer wants all apt packages to be pulled via their Landscape-hosted package mirror. This is doable for most charms on their cloud, but it appears presently the charm does not expose anything for providing the "-c" option to retrofit.sh.

Additionally, using a Landscape-hosted mirror also requires importing the public key for the Landscape mirror via apt-key. That currently looks like it is not supported by retrofit.sh.

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

Triaged as wishlist; list does not mean it is not important, just that it is a new feature for the charm.

Changed in charm-octavia-diskimage-retrofit:
importance: Undecided → Wishlist
status: New → Triaged
tags: added: onboarding
tags: added: good-first-bug
tags: removed: onboarding
Revision history for this message
Yoshi Kadokawa (yoshikadokawa) wrote :

This is also helpful in offline environment where only has internal mirror server.
At the moment, creating a octavia diskimage via this retrofit charm, it will fail due to unreachability to the upstream mirrors.

Revision history for this message
Yoshi Kadokawa (yoshikadokawa) wrote :

For now, I have managed to workaround this by creating the Octavia disk image with the following manual steps.

# Download stock ubuntu image
sudo wget -O ubuntu-20.04-server-cloudimg-amd64.img \
https://<INTERNAL_MIRROR_URL>/ubuntu-20.04-server-cloudimg-amd64.img

# Create amphora image
amphora_img_name="amphora-haproxy-ubuntu-20.04"
sudo octavia-diskimage-retrofit -d \
  -m 'deb http://<INTERNAL_MIRROR_URL> focal multiverse main restricted universe' \
  -c 'deb http://<INTERNAL_MIRROR_URL> focal-updates multiverse main restricted universe' \
  -u ussuri \
  ubuntu-20.04-server-cloudimg-amd64.img \
  ${amphora_img_name}.qcow2

# Convert the image to RAW format
sudo qemu-img convert \
  -f qcow2 -O raw \
  ${amphora_img_name}.qcow2 \
  ${amphora_img_name}.raw

# Upload the image to Glance
mkdir -p $HOME/octavia-images/
openstack image create --tag octavia-amphora \
  --container-format bare \
  --disk-format raw \
  --protected \
  --file ${amphora_img_name}.raw \
  ${amphora_img_name}

Eric Chen (eric-chen)
Changed in charm-octavia-diskimage-retrofit:
assignee: nobody → YenHung Chen (eric-chen)
Eric Chen (eric-chen)
Changed in charm-octavia-diskimage-retrofit:
assignee: YenHung Chen (eric-chen) → nobody
Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :
Changed in charm-octavia-diskimage-retrofit:
status: Triaged → Fix Committed
Changed in charm-octavia-diskimage-retrofit:
milestone: none → 22.04
Changed in charm-octavia-diskimage-retrofit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.