Add alternative sources.list file 21/64821/1
authorVictor Morales <victor.morales@intel.com>
Wed, 5 Sep 2018 10:30:49 +0000 (03:30 -0700)
committerVictor Morales <victor.morales@intel.com>
Wed, 5 Sep 2018 10:30:49 +0000 (03:30 -0700)
In order to reduce the traffict during the installation of external
packages is possible to configure it to consume a local mirror.
This change adds that alternative.

Change-Id: I5d7b385171e77afe12ccaad31edd59cf4f0f21fb
Signed-off-by: Victor Morales <victor.morales@intel.com>
Issue-ID: MULTICLOUD-301

.gitignore
vagrant/installer [new symlink]
vagrant/installer.sh

index b38d6e2..e6cf326 100644 (file)
@@ -30,5 +30,6 @@ src/k8splugin/plugins/**/*.so
 vagrant/inventory/hosts.ini
 vagrant/inventory/group_vars/all.yml
 vagrant/config/pdf.yml
+vagrant/sources.list
 *.retry
 *.vdi
diff --git a/vagrant/installer b/vagrant/installer
new file mode 120000 (symlink)
index 0000000..2b6cb16
--- /dev/null
@@ -0,0 +1 @@
+installer.sh
\ No newline at end of file
index 29866a8..b4886f2 100755 (executable)
@@ -260,6 +260,11 @@ k8s_info_file=$krd_folder/k8s_info.log
 mkdir -p $log_folder
 
 # Install dependencies
+# Setup proxy variables
+if [ -f $krd_folder/sources.list ]; then
+    mv /etc/apt/sources.list /etc/apt/sources.list.backup
+    cp $krd_folder/sources.list /etc/apt/sources.list
+fi
 apt-get update
 install_k8s
 install_addons