diff --git a/openstack/apt_download.sh b/openstack/apt_download.sh new file mode 100755 index 0000000..8e7f579 --- /dev/null +++ b/openstack/apt_download.sh @@ -0,0 +1,100 @@ +#!/usr/bin/env bash + +filepath=$(cd "$(dirname "$0")"; pwd) + +sudo apt update + +sudo apt -y install software-properties-common + +REPO=cloud-archive:queens +SRC_FILE=cloudarchive-queens.list + +sudo add-apt-repository "$REPO" + + +if [ -f "/etc/apt/sources.list.d/$SRC_FILE" ]; then + sudo apt update \ + -o Dir::Etc::sourcelist="sources.list.d/$SRC_FILE" \ + -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" +else + echo "ERROR: apt source not found: /etc/apt/sources.list.d/$SRC_FILE" + exit 1 +fi + + + + + +function apt_download { + echo "apt_download: $*" + sudo apt install -y --download-only "$@" +} + +rm -rf /var/cache/apt/archives/* + + +apt_download python-openstackclient curl tree + +# MySQL, RabbitMQ +apt_download mariadb-server python-mysqldb rabbitmq-server + +# NoSQL database (MongoDB) +apt_download mongodb-server mongodb-clients python-pymongo + +# Other dependencies +apt_download python-argparse python-dev python-pip + +# Keystone +apt_download keystone python-openstackclient apache2 \ + libapache2-mod-wsgi memcached python-memcache + +# Glance +apt_download glance python-glanceclient + +# Nova Controller +apt_download nova-api nova-conductor nova-consoleauth \ + nova-novncproxy nova-scheduler + +# Placement Controller +apt_download nova-placement-api + +# Neutron Controller +apt_download neutron-server neutron-plugin-ml2 \ + neutron-linuxbridge-agent neutron-dhcp-agent \ + neutron-metadata-agent neutron-l3-agent python-neutronclient conntrack + +# Cinder Controller +apt_download cinder-api cinder-scheduler python-cinderclient + +# Horizon +apt_download openstack-dashboard + +# Cinder Volumes +apt_download lvm2 cinder-volume thin-provisioning-tools + +# Nova Compute +apt_download nova-compute nova-compute-qemu qemu sysfsutils + +# Neutron Compute +apt_download neutron-linuxbridge-agent + +# Heat +apt_download heat-api heat-api-cfn heat-engine python-heatclient + +# Swift Controller +apt_download swift swift-proxy python-swiftclient \ + python-keystoneclient python-keystonemiddleware \ + memcached + +# Swift Storage +apt_download xfsprogs rsync \ + swift swift-account swift-container swift-object + +# PXE server +apt_download bind9 isc-dhcp-server apache2 tftpd-hpa inetutils-inetd vlan \ + iptables-persistent + +p="$filepath/`date +%Y-%m-%d-%H-%M`" +mkdir $p +cp -r /var/cache/apt/archives/* $p +