From: Mayes, L. <lee...@hp...> - 2010-12-16 19:43:36
|
John and I took this offline and we found the issue with the post install deb not installing. The permissions on base/PRE-DEB made it unreadable by apache. Since the 3 BASE snippets are not required/mandatory files system-designer treated it as a no-show and completed creating the image without it defined. John tweaked permissions on the file and now the post install environment is working. Lee -----Original Message----- From: Cusick, John CTR NAWCWD, 541400D [mailto:joh...@na...] Sent: Wednesday, December 15, 2010 6:26 PM To: Mayes, Lee; Gartner, Bryan W Cc: lin...@li... Subject: RE: [Linuxcoe-users] Using Mirrors Lee, Yes, sorry, I forgot to give you the info on that. Instead of including it all, here are the relevant parts: ------ Scroll down to ===START=== for the real action. Found installed product acpi-support - 0.137 Found ... Found ... Found installed product linux-sound-base - 1.0.23+dfsg-1ubuntu4 Found installed product lksctp-tools - 1.0.11+dfsg+1 Found... Found installed product zlib1g - 1:1.2.3.4.dfsg-3ubuntu1 ===START=== My waystation is ubuntu-lds.def.ghi.mil (the proper waystation name) --------- That's all, nothing more, so it would appear that the /opt/LinuxCOE/bin LinuxCOE_final script never executed past printing the waystation. There were no entries in the init.d directory. I placed the linuxcoe-sw-sources deb in the root of the html directory /var/www and my $PREFIX/etc/base/POST-DEB file references that location, re: the example in yesterday's email. I can plug that url/file into any browser on the network and get it (I double-checked, in case there were resolver or permission problems). During the install, I also pinged the waystation from the system being installed while it was installing (from terminal 2) by name to make sure it was resolving properly, no problem there. I wasn't sure if I needed to set up a specific addon bundle for the linuxcoe-sw-sources deb, per yesterday's example, and so I have not done that. If that is also necessary then I also assume I have to setup a "local" repo and add that to my repo lists, if that is the way the Bundle system is designed... ?? After reading some of the source and yesterday's email I was thinking that a specific bundle entry was not necessary since the scripts uses wget && dpkg -I to fetch and install the package, but now that I'm reading the LinuxCOE-final script... again... am I'm wrong there? Since I have not fully wrapped my head around this, though, I'm still am a little confused as to what the POST-DEB/linuxcoe-sw-sources stuff will do. It seems like it ends up handling updates/packages after the fact (assuming POST means after the installation is complete, of course) and not handle pulling everything from my mirror instead of a public mirror from the very beginning. The preseed, by the way, seems correct, too: d-i mirror/http/hostname string ubuntu-lds.def.ghi.mil Which makes me think there is a resolv issue. But I checked that... as well as I know how, anyway. Maybe I should try using the server ip address instead of the name? (By the way, I tested this out with my rpm-based LinuxCOE server (ver 4.2), separate from the deb-based system to keep things as simple as possible, and that worked great. I/LinuxCOE installed, from boot to desktop login, Fedora 13 in approx. 20 minutes, and this on a local usb drive VM hanging off my laptop. Once this is tuned up, I figure a new-to-linux sys admin can set up a basic and mostly secured workstation in less than an hour. Beautiful!) Regards, John C -----Original Message----- From: Mayes, Lee [mailto:lee...@hp...] Sent: Wednesday, December 15, 2010 14:18 To: Cusick, John CTR NAWCWD, 541400D; Gartner, Bryan W Cc: lin...@li... Subject: RE: [Linuxcoe-users] Using Mirrors Hi John, On the client there should be /var/log/LinuxCOE-* logs to tell you what transpired when it post-processing attempted to kick in. Lee -----Original Message----- From: Cusick, John CTR NAWCWD, 541400D [mailto:joh...@na...] Sent: Wednesday, December 15, 2010 2:19 PM To: Mayes, Lee; Gartner, Bryan W Cc: lin...@li... Subject: RE: [Linuxcoe-users] Using Mirrors Lee, Success, up to a point with your directions below. I've built the deb using EPM (straight out of the sourceforge box - haven't read the EPM docs yet). The LinuxCOE stuff was created on the client as follows /opt/LinuxCOE/bin/ /opt/LinuxCOE/bin/LinuxCOE-final and /etc/opt/LinuxCOE/INSTALLED /etc/opt/LinuxCOE/replay /etc/opt/LinuxCOE/waystation (my waystation is listed) /etc/opt/LinuxCOE/apt/ (empty) /etc/opt/apt.sources/COE_BASE (with my individual repos - similar to yours below) I noticed that none of the three bin scripts from (in my case) linuxcoe-sw-sources-4.0-0-linux-2.6-all.deb were there, though. Should they be? After reading reading the perl scripts it looks to me like the should, for example the configure_apt script. POST-DEB is setup as you have it below, modded for my system, of course. The system still loaded completely from outside mirrors. John C. -----Original Message----- From: Mayes, Lee [mailto:lee...@hp...] Sent: Tuesday, December 14, 2010 5:38 To: Cusick, John CTR NAWCWD, 541400D; Gartner, Bryan W Cc: lin...@li... Subject: RE: [Linuxcoe-users] Using Mirrors Hi John, What you want to do is certainly do-able and is how we run our shop as well. While there is nothing proprietary about our post processing environment it's probably not our best documented feature even though we live and die by it on our internal System Designer instance. In the older days Deb/Ubuntu did the right thing automatically, whatever value you preseeded with was what ended up in sources.list but that appears to no longer be the case. The LinuxCOE post-processing environment runs in 4 stages, we call them PRE, MID, POST and the bundle installer proper. You'll need to make a couple of changes to enable it. In your $PREFIX/linuxcoe.rc file, comment out (or set to 0) the NO_COE directive. This tells the image generation scripts that you desire LinuxCOE post processing and they will append the bootstrap that calls it to your %final script. If folks are currently using your system designer instance and you want to test/debug this functionality alongside but without touching your existing deployments, create the file $PREFIX/COE containing the single line 'NO_COE 0' (without quotes) and append ?defs=COE to your URLs, for example http://your_server/systemdesigner-cgi-bin/coe_bootimage?defs=COE . when you use ?defs= on the URLs, it parses the standard linuxcoe.rc first and then another file overriding any values you've redefined. We use this not only for testing but to give some internal customers a custom view. The post processing 'bootstrap' code it will append to your final script can be seen in the $PREFIX/data/*_final_skel files. These skel files are written to layer any post processing needs onto a system in 3 stages. On rpm based systems it runs a straight rpm -i @METHOD@/@WAYSTATION@/whatever.rpm kind of thing, on deb based system it will wget && dpkg -I the files. The sole intention of the first 3 stages is to configure apt/yum/up2date/etc. to point at internal waystations and to deliver the LinuxCOE bundle installer. If there you have ADDONS defined and chose custom bundles during image creation, a 4 step is called that would install this software using APT || YUM depending on distro now that it's configured to point at your waystation. If you're simply wanting to ensure your servers end up pointed at your standard mirrors, you'll only need to install the deb that configures APT on the clients to point back at you. The post processing stuff is on sf here: http://linuxcoe.cvs.sourceforge.net/viewvc/linuxcoe/postproc/ http://linuxcoe.cvs.sourceforge.net/viewvc/linuxcoe/postproc/deb/apt-config/linux-2.6-all/linuxcoe-sw-sources-4.0-linux-2.6-all.deb?revision=1.1.1.1 - oops, I accidentally checked in the .deb vs. just source for it. :^) I started using EPM to do my packaging a long time ago when I supported HPUX and Linux since I'm lazy and I only had to learn one packaging meta-language. That's the 'format' of this check-in. You can apt-get install epm, its home is http://www.epmhome.org/ . You'll want to build linuxcoe-sw.deb and export somewhere on your waystation. Then create the file $PREFIX/base/POST-DEB, here's our's for an example: hpcoe@g2t0002:/usr/local/linuxcoe-sd/4.2/etc/base> cat POST-DEB @ME...@li.../LinuxCOE/COE/3.1/packages/DEBS/linuxcoe-sw-sources-4.0.all.deb hpcoe@g2t0002:/usr/local/linuxcoe-sd/4.2/etc/base> The typical @METHOD@/@WAYSTATION@/etc. will get sub/replaced. This will be pulled in with a wget/dpkg -i. The last piece to configure tells the linuxcoe-sw-sources.deb what to replace the distro's default apt configuration with. That's done in $PREFIX/depots/, here's our Maverick example: hpcoe@g2t0002:/usr/local/linuxcoe-sd/4.2/etc/depots> cat apt-Ubuntu-Maverick # core distro deb @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick main restricted deb-src @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick main restricted # additional goodies # deb @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick universe multiverse # deb-src @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick universe multiverse # updates deb @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-updates main restricted deb-src @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-updates main restricted # additional updates (should enable these if doing the corresponding ones above) # deb @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-updates universe multiverse # deb-src @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-updates universe multiverse # security deb @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-security main restricted deb-src @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-security main restricted # additional security (should enable these if doing the corresponding ones above) # deb @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-security universe multiverse # deb-src @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-security universe multiverse # backports #deb @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-backports main restricted #deb-src @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-backports main restricted # additional backports (should enable these if doing the corresponding ones above) # deb @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-backports universe multiverse # deb-src @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-backports universe multiverse # proposed #deb @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-proposed main restricted #deb-src @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-proposed main restricted # additional proposed (should enable these if doing the corresponding ones above) # deb @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-proposed universe multiverse # deb-src @METHOD@@WAYSTATION@/LinuxCOE/Ubuntu maverick-proposed universe multiverse hpcoe@g2t0002:/usr/local/linuxcoe-sd/4.2/etc/depots> I realize this is a lot to digest and kind of rambling but give a whirl and see what you end up with. All of the post processing leaves its logfiles at /var/log/LinuxCOE-* on the installing system. Bryan and I will be happy to help. Best Regards, Lee |