9 Replies Latest reply on Nov 18, 2010 9:53 AM by ssaksa

    Post scripts seem to not be executed

    ssaksa

      I was trying out the post steps to create my own version of a boxgrinder ami.  The script runs fine and the boxgrinder logs show that the post steps were run, but when I look for the changes in my image they are not there.  I created the image that I am running boxgrinder in with the attached ks file.  Let me know if you need more info.

       

      Image command output

      Last login: Wed Nov 17 14:25:40 2010

       

      Appliance:      boxgrinder-f13 appliance 1.1

      Hostname:       localhost.localdomain

      IP Address:     172.16.88.146

       

      [root@localhost ~]# rpm -qa |grep ec2

      [root@localhost ~]# gem list

       

      *** LOCAL GEMS ***

       

       

       

      APPL

       

      name: boxgrinder-f13

      summary: JEOS Boxgrinder setup based on Fedora 13

      version: 1.1

      os:

      name: fedora

      version: 13

      hardware:

      partitions:

         "/":

           size: 10

      packages:

      includes:

         - acpid

      .................

         - e2fsprogs

         - rubygems

      post:

        base:

         - "/bin/rpm -Uvh http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools.noarch.rpm"

         - "/usr/bin/gem install builder"

         - "/usr/bin/gem install i18n"

         - "/usr/bin/gem install boxgrinder-build"

         - "/usr/bin/gem install boxgrinder-build-fedora-os-plugin"

         - "/usr/bin/gem install boxgrinder-build-centos-os-plugin"

         - "/usr/bin/gem install boxgrinder-build-vmware-platform-plugin"

         - "/usr/bin/gem install boxgrinder-build-ec2-platform-plugin"

         - "/usr/bin/gem install boxgrinder-build-local-delivery-plugin"

         - "/usr/bin/gem install boxgrinder-build-sftp-delivery-plugin"

         - "/usr/bin/gem install boxgrinder-build-ebs-delivery-plugin"

         - "/usr/bin/gem install activesupport  -v 2.3.10"

         - "/usr/bin/gem install boxgrinder-build-s3-delivery-plugin -v 0.0.3"

       

      Kickstart File produced

       

      lang en_US.UTF-8

      keyboard us

      .....

      %packages --excludedocs --nobase

        acpid

        bash

      ............

        dhclient

        kernel-PAE

      %end

      %post

       

      %end

       

      LOG

       

      D, [2010-11-17T14:01:13.086763 #14461] DEBUG -- : Executing /bin/rpm -Uvh http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools.noarch.rpm
      D, [2010-11-17T14:01:16.992624 #14461] DEBUG -- : Executing /usr/bin/gem install builder
      D, [2010-11-17T14:01:22.553644 #14461] DEBUG -- : Executing /usr/bin/gem install i18n
      D, [2010-11-17T14:01:27.653575 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build
      D, [2010-11-17T14:01:32.540772 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-fedora-os-plugin
      D, [2010-11-17T14:01:37.176252 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-centos-os-plugin
      D, [2010-11-17T14:01:42.520743 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-vmware-platform-plugin
      D, [2010-11-17T14:01:48.495058 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-ec2-platform-plugin
      D, [2010-11-17T14:01:55.103883 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-local-delivery-plugin
      D, [2010-11-17T14:02:01.961200 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-sftp-delivery-plugin
      D, [2010-11-17T14:02:07.894864 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-ebs-delivery-plugin
      D, [2010-11-17T14:02:13.455486 #14461] DEBUG -- : Executing /usr/bin/gem install activesupport  -v 2.3.10
      D, [2010-11-17T14:02:19.294141 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-s3-delivery-plugin -v 0.0.3
      D, [2010-11-17T14:02:25.224499 #14461] DEBUG -- : Post commands from appliance definition file executed.

      D, [2010-11-17T14:01:13.086763 #14461] DEBUG -- : Executing /bin/rpm -Uvh http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools.noarch.rpm

      D, [2010-11-17T14:01:16.992624 #14461] DEBUG -- : Executing /usr/bin/gem install builder

      D, [2010-11-17T14:01:22.553644 #14461] DEBUG -- : Executing /usr/bin/gem install i18n

      D, [2010-11-17T14:01:27.653575 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build

      D, [2010-11-17T14:01:32.540772 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-fedora-os-plugin

      D, [2010-11-17T14:01:37.176252 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-centos-os-plugin

      D, [2010-11-17T14:01:42.520743 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-vmware-platform-plugin

      D, [2010-11-17T14:01:48.495058 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-ec2-platform-plugin

      D, [2010-11-17T14:01:55.103883 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-local-delivery-plugin

      D, [2010-11-17T14:02:01.961200 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-sftp-delivery-plugin

      D, [2010-11-17T14:02:07.894864 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-ebs-delivery-plugin

      D, [2010-11-17T14:02:13.455486 #14461] DEBUG -- : Executing /usr/bin/gem install activesupport  -v 2.3.10

      D, [2010-11-17T14:02:19.294141 #14461] DEBUG -- : Executing /usr/bin/gem install boxgrinder-build-s3-delivery-plugin -v 0.0.3

      D, [2010-11-17T14:02:25.224499 #14461] DEBUG -- : Post commands from appliance definition file executed.

       

       

      Boxgrinder GEMS Packages

       

      gem list

      *** LOCAL GEMS ***

      activesupport (2.3.10, 2.0.0)

      amazon-ec2 (0.9.15)

      aws (2.3.26)

      boxgrinder-build (0.6.3)

      boxgrinder-build-centos-os-plugin (0.0.5)

      boxgrinder-build-ebs-delivery-plugin (0.0.3)

      boxgrinder-build-ec2-platform-plugin (0.0.5)

      boxgrinder-build-fedora-os-plugin (0.0.4)

      boxgrinder-build-local-delivery-plugin (0.0.4)

      boxgrinder-build-rhel-os-plugin (0.0.6)

      boxgrinder-build-rpm-based-os-plugin (0.0.7)

      boxgrinder-build-s3-delivery-plugin (0.0.4, 0.0.3)

      boxgrinder-build-sftp-delivery-plugin (0.0.3)

      boxgrinder-build-vmware-platform-plugin (0.0.3)

      boxgrinder-core (0.1.2)

      builder (3.0.0, 2.1.2)

      commander (4.0.3)

      highline (1.6.1)

      http_connection (1.4.0)

      i18n (0.4.2)

      net-sftp (2.0.5)

      net-ssh (2.0.23)

      open4 (1.0.1)

      progressbar (0.9.0)

      uuidtools (2.1.1)

      xml-simple (1.0.12)

       

       

        • 1. Re: Post scripts seem to not be executed
          goldmann

          Looks strange, which meta appliance you used 1.1, 1.2?

           

          I propose to base your appliance on our latest meta appliance definition. Using RPM is now preferred.

           

          --Marek

          • 2. Re: Post scripts seem to not be executed
            ssaksa

            I did not use a meta appliance.  I created an boxgrinder image from a kickstart (attached) file. Are you suggesting that post would work if I use a meta appliance?

            • 3. Re: Post scripts seem to not be executed
              goldmann

              Ah, now I see. Kickstart files are not supported by BoxGrinder as input files. I'm a bit confused. You attached .ks file but in the same message you showed .appl. What were the eact steps to create the appliance?

               

              --Marek

              • 4. Re: Post scripts seem to not be executed
                ssaksa

                I started an instance in amazon of the 1.2 meta appliance and the keys did not work, when I had an issue with that in the past I found I had to add curl to the package list. 

                • 5. Re: Post scripts seem to not be executed
                  goldmann

                  Sorry, but I cannot understand your answer. Let me be more precise: what file you created to make your appliance? What files was generated? What commands you used to produce the appliance?

                   

                  --Marek

                  • 6. Re: Post scripts seem to not be executed
                    ssaksa

                    I did not use an appliance.  I installed a fresh vmware instance using the kickstart file listed, I then ran boxgrinder from there and got these errors.  I did not know about your appl, files I did not find those in the source.  I can try creating my appliances based on the files you have here  https://github.com/boxgrinder/boxgrinder-appliances/tree/master/appliances.  From previous exchanges you said that I need to run boxgrinder on the platform of the image I want to create (see below), is this still the case, or can I get the latest meta appliance and create all supported image types?

                     

                    BaseOS +Boxgrinder  creates OS

                    centos 5 + Boxgrinder -> to create Centos 5 images

                    fedora 13 + boxgrinder -> to create Fedora 13 images

                    fedora 14 + boxgrinder -> to create Fedora 14 images

                     

                    Do you have appliance files for creating the base OS + boxgrinder?

                    • 7. Re: Post scripts seem to not be executed
                      goldmann

                      We are still talking about different things Using meta appliance or installing BoxGrinder on your system is another story compared to what I need to help you. What I'm really interested in is:

                      1. which file (and what content) you created as source for your appliance?
                      2. What exact commands you run to create the appliance?

                      Steven Saksa wrote:

                       

                      BaseOS +Boxgrinder  creates OS

                       

                      centos 5 + Boxgrinder -> to create Centos 5 images

                      fedora 13 + boxgrinder -> to create Fedora 13 images

                      fedora 14 + boxgrinder -> to create Fedora 14 images

                       

                      Do you have appliance files for creating the base OS + boxgrinder?

                      There is no notion of "BaseOS". Base image is an output of operating system plugin (it could be CentOS, RHEL or Fedora OS).

                      Steven Saksa wrote:

                       

                      From previous exchanges you said that I need to run boxgrinder on the platform of the image I want to create (see below), is this still the case, or can I get the latest meta appliance and create all supported image types?

                      You can build Fedora 13 or 14 on Fedora 13 or 14. But to build CentOS appliance you need to have BG installed on CentOS.

                       

                      HTH

                       

                      --Marek

                      • 8. Re: Post scripts seem to not be executed
                        ssaksa

                        So boxgrinder needs to be installed into a running system.  To create that system you need to either use your appliance or manually install a system then install boxgrinder into it based on your instructions (below).  I did this for both centos and fedora, installed the os manually (through ks file attached) and then installed boxgrinder and started using it.  When I did all looked good, it ran and said it ran the post steps but did not.  So what do you want me to do next?

                         

                        http://community.jboss.org/wiki/BoxGrinderBuildInstallation#Other_systems

                        http://community.jboss.org/wiki/BoxGrinderBuildPreparingEnvironmentToBuildImages

                        • 9. Re: Post scripts seem to not be executed
                          ssaksa

                          They ran fine from the meta-appliance 1.2, so ignore this issue.