Intel/Windriver Infrastructure APT/DOCKER Proxy Setup
Thanks to Gary Wu for setting up the original proxies and providing the source material for the description below.
The infrastucture provides an APT and DOCKER proxy to reduce bandwidth utilization for installs in the Intel/Windriver Lab.
APT proxy is on port 8000 through a squid proxy
DOCKER proxy is on port 5000 using a docker registry.
The DOCKER proxy uses a 4 TB volume mount for the docker images.
Below are the instructions for setting it up.
apt-get update
apt-get -y install squid-deb-proxy
this will install and start the apt proxy on port 8000
If you need to re-create the Volume mount for the docker registry
• Create your instance (Openstack UI)
• Create your volume (Openstack UI)
• Attach volume to instance (Openstack UI)After creating the volume or to re-use the existing volume, go into the nexus-proxy instance:
lsblk -f # identify the new volume device, probably /dev/vdb
cgdisk /dev/vdb # create your partition as /dev/vdb1
mkfs.ext4 L docker proxy /dev/vdb1 to create the FS on /dev/vdb1
Original command: mkfs.xfs -f -L docker-proxy /dev/vdb1 # create xfs FS on /dev/vdb1
the current windriver proxy uses ext4 so that is why we should that in the fstab config
mkdir -p /mnt/registry # create mount for FS
add something like the following to your /etc/fstab, with your own FS UUID of course
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /mnt/registry ext4 noatime 0 0
/etc/fstab
LABEL=cloudimg-rootfs / ext4 defaults 0 0 LABEL=UEFI /boot/efi vfat defaults 0 0 # vdb ext4 5d493140-c4b7-42f0-9fa1-c9c8d8ac3a0e UUID=5d493140-c4b7-42f0-9fa1-c9c8d8ac3a0e /mnt/registry ext4 noatime 0 0
mount /mnt/registry/
Reboot to be sure that the FS can be mounted correctly
apt-get install docker.io
docker run -d -p 5000:5000 --restart=unless-stopped --name registry -v /mnt/registry:/var/lib/registry -e REGISTRY_PROXY_REMOTEURL=https://nexus3.onap.org:10001 registry:2
If you need to do mainteance on the docker registry to clean up the cache:
inside registry:
bin/registry garbage-collect /etc/docker/registry/config.yml