{{:Design Warning}}
This is the mini-design of supporting internet/local official distribution repository for other packages installation on the ubuntu compute node. The Ubuntu iso only contains the basic packages which used for OS installation(657MB), it can not satisfy the otherpkg installtion on compute node. Ubuntu has many official distribution repository mirrors on the internet, so compute node can use the official distribution repository mirror for the other pakcages installation.
If want to use ospkglist file method to install packages, before adding package name into this file, should ensure the package is contained in the ubuntu iso. All packages that does not contained in the ubuntu iso should use otherpkg method to install.
Use the otherpkgdir attribute in linuximage table to save the internet repository URL, so xCAT should support multiple otherpkgdirs (currently only on ubuntu), and repository direcotries are splited by ','.
modify the otherpkgdir attribute for osimage object.
chdef -t osimage <osimage name> otherpkgdir="/install/ubuntu12.04.1/x86_64/,http://us.archive.ubuntu.com/ubuntu/ precise main"
The first directory is a repository on MN, the method of creating local repository on management node will be introduced in the Ubuntu quick start document. The second one is a official mirror URL on the internet. the precise means the suite for the ubuntu version. the main means the base component which will be used.
create an otherpkglist file, /install/custom/install/ubuntu/compute.otherpkgs.pkglist. Add the packages' name into thist file. And modify the otherpkglist attribute for osimage object.
chdef -t osimage <osimage name> otherpkglist=/install/custom/install/ubuntu/compute.otherpkgs.pkglist
There are 2 scenarios:
1. The management node can access the internet
a. Install the Squit on management node, and configure the proxy server. (introduced in the quick start)
b. add the aptproxy script to the postscript(a new script), it can configure the apt to use proxy when downloading packages.
2. The management node can not access the internet either
a. If the packages installed on the compute node change frequently,
i. use "apt-mirror" to create a local mirror.
ii. add this local mirror to the otherpkgdir attribute, apt on the compute node can download packages from this local mirror.
b. else
i. use "apt-rdepends" to find out all dependent packages' name.
ii. use "apt-get install <packages' name> -d" to download all needed packages
iii. copy these packages to management node, use "dpkg-scanpackages" to create a repository on the management node. (introduced in the quick start)
Only the internet distribution mirror includes some code modification, the local repository on the management node use the current process.
All repositories which used for other packages installation are saved in "/etc/apt/sources.list.d/xCAT-otherpkgs.list". When parse the $OTHERPKGDIR, and the os belongs to ubuntu,
a. split the $OTHERPKGDIR by ','
b. if the repo started by http, add it into the xCAT-otherpkgs.list directly.
c. if the repo does not started by http, should did some modification to the repo address, and append to the xCAT-otherpkgs.lis.
add a file /etc/apt/apt.conf.d/proxy, append a line to specify this proxy server.
genimage
a. add the otherpkgdir into the /<rootimagedir>/etc/apt/sources.list.d/xCAT-otherpkgs.list, similar with the stateful scenario.
b. backup the /<rootimagedir>/etc/hosts and resolv.conf in the stateless root image.
c. copy the management node's /etc/hosts and /etc/resolv.conf to the /<rootimagedir>, it can access the internet after chroot
d. install other packages into the root image.
e. recover the /<rootimagedir>/etc/hosts and resolv.conf
genimage.pm
a. the value of --otherpkgdir should be embraced by ".