[00:35] anyone alive that can help on disable_root and ec2-fetch-credentials ? [00:35] i'm trying to work out this system they introduced in karmic [00:36] i'm not sure why they do it this way instead of just sshd and pam [00:37] flaccid: Are you wanting to enable ssh to root? [00:37] heya Eric, yeah, I have raised an enhancement request so we can enable other users than root to login and also call scripts etc. [00:38] for now, i just want to re-enable root so i can bundle this test instance which has been right-enabled [00:38] then i can look at the more specific issue in the ticket raised indirectly by yourself [00:40] interesting implementation canonical does in /usr/bin/ec2-fetch-credentials .. [00:40] I posted a description on how to enable root towards the end of http://alestic.com/2009/04/ubuntu-ec2-sudo-ssh-rsync [00:44] i don't think that is going to do the trick, but i will try [00:46] wow it does. how does that work? [00:46] i'm trying to work out what calls /usr/bin/ec2-fetch-credentials to check disable_root boolean [00:49] hmmm bundle call from rs dash still silently failing [00:53] i think i will have to call the ec2 api manually [00:54] flaccid: /etc/init.d/ec2-init [00:54] calls ec2-fetch-credentials [00:54] Where do you see disable_root? [00:57] grep disable_root /usr/bin/ec2-fetch-credentials [01:04] would you be able to help me with a manual bundle then? [01:05] flaccid: of a running instance? [01:05] or building an AMI from scratch? [01:05] yeah so ec2-bundle-vol on a running instance. need to know best practices for the params on a running instance w/ rightscale [01:06] basically because i've never done it before, need to know what params i should be giving http://docs.amazonwebservices.com/AmazonEC2/dg/2006-10-01/CLTRG-ami-bundle-vol.html [01:07] Here are my notes which should work on Karmic: http://alestic.com/2009/06/ec2-ami-bundle [01:07] great, thats quite detailed, thanks eric [01:08] I'm also building Karmic AMIs from scratch with vmbuilder but haven't published any notes yet. [01:08] got any ideas why rs bundle call is silently failing after enabling root ? [01:09] I don't think I've ever used the RightScale bundle button. [01:09] im testing bundle of Ubuntu 9.10 Karmic ami-1515f67c after right-enabling [01:09] yeah, our bundle button is not reliable and i wouldn't mind working out why. but without interaction with eng I don't know what the api call it issues is. would be good if aws logged all api calls and responses.. [01:10] Are there any logs on the system? Have any Ubuntu AMIs been able to be bundled that way before? [01:10] Perhaps it's an incompatibility with commands between CentOS and Ubuntu. [01:10] we only notify that the bundle call was initiated. i can bundle jaunty no problem and also done debian [01:11] i'll show you the build toolkit i made [01:12] erichammond: https://rightscale-services.s3.amazonaws.com:443/rightimage-build-toolkit/README [01:13] erichammond: could you summarise the main roadblock you had, thus the ticket submitted? [01:15] in regards to /bin/env: bad interpreter: No such file or directory. thats actually our bug. we should be using /usr/bin/env [01:15] in my build-toolkit i create an extra symlink to work around this [01:16] This shows up in /var/log/install: "touch: cannot touch `/var/lock/subsys/rightscale': No such file or directory" [01:16] yeah i got that in jaunty as well. just need to touch it iirc [01:16] and "/opt/rightscale/bin/ec2.sh: /opt/rightscale/bin/WaitFor: /bin/env: bad interpreter: No such file or directory" [01:16] yeah for that one, do, /bin/env: symbolic link to `/usr/bin/env' [01:17] symlink sounds like a very temporary workaround which should be corrected quickly. [01:17] problem is they may not update the current rightscale scripts due to focus on RightLink [01:17] we can still raise bugs and try to get priority on them [01:19] ok, I can try adding these and see how the build goes: mkdir /var/lock/subsys; ln -s /usr/bin/env /usr/env [01:21] mkdir -p /var/lock/subsys && touch /var/lock/subsys/rightscale; ln -s /usr/bin/env /bin/env [01:21] :) [01:21] thanks [01:21] nps [01:21] It's ok for subsys/rightscale to be owned by root? [01:21] yep [01:22] generally nothing in there most of the time [01:23] if i add the mkdir/touch to my build toolkit, that should cover full support for jaunty and karmic [01:27] just going to launch an rs server w/ jaunty template and rightimage to verify the console output errors such as the /var/lock/subsys/rightscale [01:41] flaccid: All these different ways of installing RightScale are starting to wear me down. What you just listed is different from what Martin provided me which is different from the other 4 ways I used to do it. [01:43] well, that certainly is a problem [01:43] Hopefully, we'll end up with a single recommended approach out of all this. [01:46] its going to be hard, particularly because of the focus on RightLink which will provide packages to simply install the RightLink agent [01:46] have you seen http://support.rightscale.com/index.php?title=06-FAQs/FAQ_0103_-_How_do_I_make_any_Amazon_Machine_Image_%28AMI%29_capable_of_running_RightScripts%3F ? my build toolkit is basically a fork of that [01:49] Here's the basic script from Martin which requires setting a number of envariables first: http://alestic-downloads.s3.amazonaws.com/rightscale_install [01:49] I see overlaps with your code. [01:49] yes that is correct [01:52] flaccid: so which one is preferred? [01:53] there is no preferred. its all up to you. there is no official way to do this [01:54] the equiv of this script is https://rightscale-services.s3.amazonaws.com/rightimage-build-toolkit%2Finstall_rightscale.bash and i just polished it up and modularised some things into other scripts [01:54] Is root ssh required to perform some RightScale functions? [01:54] yes because ssh/root is used [02:01] flaccid: Were you looking for this before? /etc/ec2-init/ec2-config.cfg [02:02] ah yes [02:02] this is bundled by canonical right? [02:02] yes, that file is on the Canonical AMIs [02:03] coolio [02:03] and any AMIs which are built with vmbuilder, I presume. [02:03] (I'll know shortly) [02:04] okies [02:04] well i am actually getting the output from our worker on running the bundling script [02:04] looks like missing dep for the script [02:09] [2009-12-28 02:05:51] [Ec2BundleWorker] : ERR: /home/ec2//lib/ec2/amitools/crypto.rb:13:in `require': no such file to load -- openssl (LoadError)\n [02:09] need openssl rubygem [02:10] apt-get install libopenssl-ruby issued [02:12] bundling initiated [02:12] rsync is going so it appears to be working without error so far [02:15] tar is running. good so far.. [02:17] gzip running :) [02:23] splitting bundle now [02:25] erichammond: that was successful. let me see how it goes now under an rs server [02:25] If I launch a canonical US-West AMI in US West it doesn't have access to http://us.ec2.archive.ubuntu.com/ubuntu/dists/karmic-updates and apt-get update fails [02:26] Anyone know how to fix it or if I'm doing something wrong? [02:27] rberger: You can switch to us-west-1.ec2.archive.ubuntu.com [02:27] Or (as I do) switch to the RightScale Ubuntu mirrors. [02:28] erichammond: Thanks, is this a known bug? What is the address of the rightscale ubuntu mirros (ps you are my hero :-) [02:31] rberger: https://bugs.launchpad.net/ubuntu/karmic/+source/ec2-init/+bug/494185 [02:31] Launchpad bug 494185 in ec2-init "ec2-init selects us-east-1 mirror when running in us-west-1 region" [High,Fix committed] [02:31] It's marked "fix released", but I didn't think that it was in the latest official AMI from Canonical. [02:32] I also suspect it will not work for you if you rebundle an AMI in us-east-1 and then migrate it to us-west-1 or eu-west-1. [02:33] rberger: If you have runurl installed (http://alestic.com/2009/08/runurl) then the following command switches to the RightScale Ubuntu apt repository mirrors: sudo runurl run.alestic.com/apt/rightscale [02:34] If you want to only upgrade to the Ubuntu archives as of a particular date, RightScale keeps daily snapshots. For, say, December 1: sudo runurl run.alestic.com/apt/rightscale 2009/12/01 [02:34] cool [02:35] RightScale has 2 load balanced, failover mirrors in us-west-1 and 3 in us-east-1. [02:36] When one of the EC2 availability zones failed a couple months back, my instances in a different availability zone could still upgrade because they failed over to the mirror in a zone which was working. [02:36] erichammond: i have a RightImage karmic working. would just need some script mods for monitoring and scripting to work, but this is separate to the image of course [02:37] flaccid: Glad to hear it. I'm continuing on the path I was traveling with some mods from this session, but may switch over to your code if I have problems. [02:38] yeah its really just a matter of dealing with each issue [02:38] erichammond: those errors you saw, they were in console output right? [02:39] flaccid: They were in /var/log/install if we're talking about the same thing [02:39] erichammond: I am using the ami canonical lists on their website ami-7d3c6d38. THanks again. [02:39] erichammond: ok. i will check this [02:40] erichammond: a launch and terminate shows no errors in console output. so i will now go over the /var/log/install on a fresh launch [02:40] rberger: Though I pointed you to some code on run.alestic.com I should caution you that it is just my playground and should not be used for production systems. Feel free to copy the code and host it on your own reliable locations. [02:42] erichammond: Will do. Working on gettiing my own base system on us-west for use with opscode chef. Hopefully it won't be too hard... All your tools and docs are a big help! [02:42] rberger: Glad you find them useful. [02:42] rberger: have you checked out rightscale/chef yet ? [02:43] flaccid: Does the rightscale/ chef stuff cost money on a instance-hour basis? [02:43] rberger: no [02:43] you can get a free developer account if you wanna try it out [02:44] well from memory you get chef w/ free accounts [02:44] personally, im not into chef at all. im not a ruby guy either [02:44] flaccid: But in production it cost per instance per hour? I'm more concerned about production as our base line system is over 10 nodes.. [02:45] rberger: rightscale is a management platform, your cloud accounts such as AWS are with them [02:46] flaccid: Ok, my vmbuilder-built, RightScale-enabled, Karmic AMIs work when started with the EC2 API. Now to tag them with the magic tags in RightScale and test them there. [02:47] flaccid: It seems that the righscale folks are doing great stuff but we can't afford to pay extra on a per node/hour basis. [02:47] erichammond: ok so you are essentially saying you are up to testing, right ? [02:47] flaccid: yep, testing in RightScale. [02:47] flaccid: Is there a trivial RightScript I could use to test that RightScript functionality works? [02:47] I wrote my own, but figured there should be something available in the public library. [02:48] rberger: we don't charge anything per hour, only certain overages with premium accounts. a free dev account doesn't cost you anything, only AWS... [02:48] erichammond: a hello world is a good one to use [02:48] i don't think there is anything in the library unfortunately [02:48] i just use a bash hello world [02:48] flaccid: I'll look into it again, thanks [02:49] rberger: nps. im a support engineer with RightScale. so if you have any questions, i'm around.. [02:51] erichammond: ok so only error left i have is touch: cannot touch `/var/lock/subsys/rightscale': No such file or directory because i didn't do anything before bundling. can i ask where you did the mkdir and touch for this ? [02:51] just before bundling or in a sequence ? [02:52] That was needed in the rightscale install script I was running, so I did mkdir/touch before I ran it. [02:53] I'm building the image from scratch in a subdirectory, so I had to include the root of the image directory as well. [02:53] yeah so you just mkdir and touch before bundling so it exists in the image, correct? [02:59] ok doing another bundle after touching this file [02:59] i'll let you know if i can find any problems/limitations after i have updated the template to use the new image [03:00] flaccid: yes [03:05] danke [03:06] flaccid: No luck: flaccid: touch: cannot touch `/var/lock/subsys/rightscale': No such file or directory [03:06] This may be wiped out in the boot process. [03:06] okies, i shall look into this now! [03:06] It may need to be fixed by RightScale when running on Ubuntu. [03:08] I think Ubuntu would expect it to be /var/lock/rightscale/xxx [03:08] with RightScale creating the subdirectory [03:08] At least that's how the other /var/lock users seem to be behaving on my system. [03:09] /var/lock has the same permissions as /tmp (world writable, sticky bit) [03:09] might have to add to /etc/rc.local or something [03:09] let me just replicate the problem from this new bundle when its done [03:10] It has to be done before /etc/init.d/rightscale runs at S90 [03:11] right [03:11] i assume /etc/rc.local is practically the last thing after the rc seq yeah ? [03:13] S99 I believe [03:13] ah rightio [03:13] i'll check it out [03:13] I'm also getting what looks like a more serious error in RightScale startup. Here's the whole /var/log/install - http://paste.ubuntu.com/347903/ [03:15] danke [03:16] Adding: apt-get install libxml-simple-ruby [03:16] but this is going to be a slow process if I have to keep building AMIs to test :-\ [03:16] Should I switch to your code/ [03:16] ? [03:16] yes iirc i handled that in my build toolkit [03:17] probably in the deps scripts [03:17] oops, dep script. [03:17] yeah certainly covered that when i hit it [03:22] flaccid: Are these still the latest and greatest instructions? https://rightscale-services.s3.amazonaws.com:443/rightimage-build-toolkit/README [03:23] erichammond: yes. the whole thing is authored by myself and any updated, i just save straight back to the files [03:24] Hm, looks like I'll have to chroot to the image directory first. [03:25] i should create a TODO, there is still some things to add like java jre [03:25] not sure why you would need to do something like that on a running instance.. [03:25] I'm not bundling my running instance. I'm building a fresh Karmic AMI from scratch using vmbuilder. [03:25] ok, sounds good then [03:26] keep in mind this build toolkit is for running instances bundling. i havnt done any scratch stuff [03:26] Does your code handle setting disable_root ? [03:28] negative. i have not updated anything for karmic yet [03:28] ok [03:28] but that atm, looks like the intention. i doubt eng are going to address this 'feature' anytime in the near future.. [03:29] it does need to be addressed and my fav OS is freebsd, so when ec2 upgrades xen, i need support for non-root [03:43] ok so rc.local will get run before rightscale init [03:50] ok i am re-bundling with the touch in /etc/rc.local [03:53] flaccid: From what I see S90rightscale is run before S99rc.local [03:54] lrwxrwxrwx 1 root root 18 2009-10-27 13:43 S99rc.local -> ../init.d/rc.local [03:54] lrwxrwxrwx 1 root root 20 2009-12-27 23:43 S99rightscale -> ../init.d/rightscale [03:54] its S99 for both, so rc comes before ri [03:54] Ah, you have rightscale at a different level in your software. [03:54] well at least this is how it is with karmic in runlevel 4 default [03:55] erichammond: maybe. i don't recall changing this manually, so we would need to see how it is set [03:55] can check that out in regression [03:55] What problems does that missing directory/file cause? [03:58] none that i have noticed [03:58] i don't even know what its for [04:02] relaunching with new bundle === emacsian1 is now known as emacsian [04:11] erichammond: that did the trick. so its all good, except for the fact that its not official supported yet and thus repos support is a no go etc. [04:13] The Ubuntu repositories hosted by RightScale are very stable. In my experience, they have been more stable than the mirrors hosted by Canonical in EC2. [04:13] and also the logging and monitoring scripts will require updates [04:13] yeah, that makes sense. [04:13] erichammond: thats the repos themselves. im referring to the userland implementation on the instance. we don't support new versions yet and i'm not sure if the later releases are mirrored. [04:14] configuring software repos will return Failed to generate repository configuration: unsupported ubuntu release 9.10 [06:41] flaccid: Ok, it looks like basic RightScale integration is working on my custom vmbuilder Karmic AMIs. I'm still using Martin's code with info from this discussion with you. [06:41] At least basic RightScript stuff works, though I also see your latest errors, too (Failed to generate repository configuration: unsupported ubuntu release 9.10). [06:41] Thanks for your help. [06:41] I'm off to see Avatar 3D again... [06:42] coolio === erichammond1 is now known as erichammond === erichammond1 is now known as erichammond === erichammond1 is now known as erichammond === erichammond1 is now known as erichammond === erichammond1 is now known as erichammond === erichammond1 is now known as erichammond === erichammond1 is now known as erichammond === erichammond1 is now known as erichammond