11 Replies Latest reply on Sep 17, 2010 1:07 PM by goldmann

    appliance with required packages

    ingedeut

      Hello,

       

      • i want to create an appliance file for jbossesb. Is there any appliance which contains only the os and the required packages e.g fedora.appl ...

      i have read that cirras.appl exists. But it comes with a preconfigured JBossAS.

      • what is the minimal required list of packages inorder to start a machine with fedora 13 and then install JBossESB on it?

       

       

       

       

      Thanks for any help

       

       

      --Regards

       

       

      Younes

        • 1. Re: appliance with required packages
          goldmann

          See BoxGrinder homepage for a minimal package list. You need also Java. Your JBoss ESB RPM should require java-1.6.0-openjdk in spec file. If you don't have this, add this to packages in .appl.

           

          That's all.

           

          --Marek

          • 2. Re: appliance with required packages
            ingedeut

            Hello Marek,

             

            i think there is an Bug /Error by boxgrinder-build or by boxgrinder-build-ec2-platform-plugin. I have tried to generate an AMI with a very basically .appl file (f13-basic from http://www.jboss.org/boxgrinder ). But the following error still occuring:

             

             

            E, [2010-09-17T04:49:37.322909 #9134] ERROR -- : An error occurred while executing command: 'mount  -t ext3 build/appliances/i386/fedora/13/f13-basic/ec2-plugin/tmp/raw-1487623991', process exited with wrong exit status: 1
            D, [2010-09-17T04:49:37.323141 #9134] DEBUG -- : An error occurred while executing command: 'mount  -t ext3 build/appliances/i386/fedora/13/f13-basic/ec2-plugin/tmp/raw-1487623991', process exited with wrong exit status: 1 (RuntimeError)
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-core-0.0.22/lib/boxgrinder-core/helpers/exec-helper.rb:68:in `execute'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-ec2-platform-plugin-0.0.3/lib/boxgrinder-build-ec2-platform-plugin/ec2-plugin.rb:183:in `mount_image'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-ec2-platform-plugin-0.0.3/lib/boxgrinder-build-ec2-platform-plugin/ec2-plugin.rb:93:in `execute'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/plugins/base-plugin.rb:90:in `run'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/appliance.rb:92:in `execute_platform_plugin'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/appliance.rb:56:in `create'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/bin/boxgrinder-build:88
            /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
            /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
            /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:155:in `run'
            /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/runner.rb:385:in `run_active_command'
            /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/runner.rb:74:in `run!'
            /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/delegates.rb:7:in `run!'
            /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/import.rb:10
            /usr/bin/boxgrinder-build:19
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-ec2-platform-plugin-0.0.3/lib/boxgrinder-build-ec2-platform-plugin/ec2-plugin.rb:96:in `execute': Error while mounting image. See logs for more info (RuntimeError)
                    from /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/plugins/base-plugin.rb:90:in `run'
                    from /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/appliance.rb:92:in `execute_platform_plugin'
                    from /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/appliance.rb:56:in `create'
                    from /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/bin/boxgrinder-build:88
                    from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
                    from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
                    from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:155:in `run'
                    from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/runner.rb:385:in `run_active_command'
                    from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/runner.rb:74:in `run!'
                    from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/delegates.rb:7:in `run!'
                    from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/import.rb:10
                    from /usr/bin/boxgrinder-build:19
            
            The used f13-basic.appl is :
            name: f13-basic
            summary: Just Enough Operating System based on Fedora 13
            os:
              name: fedora
              version: 13
            hardware:
              memory: 512
              partitions:
                "/":
                  size: 10
            packages:
              includes:
                - bash
                - yum
                - vim-minimal
                - openssh-server

             

             

            E, [2010-09-17T04:49:37.322909 #9134] ERROR -- : An error occurred while executing command: 'mount  -t ext3 build/appliances/i386/fedora/13/f13-basic/ec2-plugin/tmp/raw-1487623991', process exited with wrong exit status: 1
            D, [2010-09-17T04:49:37.323141 #9134] DEBUG -- : An error occurred while executing command: 'mount  -t ext3 build/appliances/i386/fedora/13/f13-basic/ec2-plugin/tmp/raw-1487623991', process exited with wrong exit status: 1 (RuntimeError)
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-core-0.0.22/lib/boxgrinder-core/helpers/exec-helper.rb:68:in `execute'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-ec2-platform-plugin-0.0.3/lib/boxgrinder-build-ec2-platform-plugin/ec2-plugin.rb:183:in `mount_image'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-ec2-platform-plugin-0.0.3/lib/boxgrinder-build-ec2-platform-plugin/ec2-plugin.rb:93:in `execute'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/plugins/base-plugin.rb:90:in `run'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/appliance.rb:92:in `execute_platform_plugin'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/appliance.rb:56:in `create'
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/bin/boxgrinder-build:88
            /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
            /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
            /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:155:in `run'
            /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/runner.rb:385:in `run_active_command'
            /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/runner.rb:74:in `run!'
            /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/delegates.rb:7:in `run!'
            /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/import.rb:10
            /usr/bin/boxgrinder-build:19
            /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-ec2-platform-plugin-0.0.3/lib/boxgrinder-build-ec2-platform-plugin/ec2-plugin.rb:96:in `execute': Error while mounting image. See logs for more info (RuntimeError)
                    from /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/plugins/base-plugin.rb:90:in `run'
                    from /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/appliance.rb:92:in `execute_platform_plugin'
                    from /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/lib/boxgrinder-build/appliance.rb:56:in `create'
                    from /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.5.1/bin/boxgrinder-build:88
                    from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
                    from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
                    from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:155:in `run'
                    from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/runner.rb:385:in `run_active_command'
                    from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/runner.rb:74:in `run!'
                    from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/delegates.rb:7:in `run!'
                    from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/import.rb:10
                    from /usr/bin/boxgrinder-build:19

             

             

            can you please check them.

             

            --Regards.

             

            Younes

             

            Message was edited by: Marek Goldmann Formatted.

            • 3. Re: appliance with required packages
              goldmann

              Is it while executing EC2 conversion? If yes, make sure you have at least 22 GB of free space – you're building appliance with 10GB hard disk, and conversion needs additional 10GB for EC2 disk.

               

              I've just build your definition without any issues:

               

              [SNIP]
              
              T, [2010-09-17T05:14:04.607697 #16142] TRACE -- : GFS: proc 47 (umount_all) took 0.80 seconds
              T, [2010-09-17T05:14:04.644594 #16142] TRACE -- : GFS: closing guestfs handle 0x8e1a298 (state 2)
              T, [2010-09-17T05:14:04.645005 #16142] TRACE -- : GFS: kill_subprocess
              T, [2010-09-17T05:14:04.645378 #16142] TRACE -- : GFS: sending SIGTERM to process 16147
              T, [2010-09-17T05:14:04.748712 #16077] TRACE -- : Guestfs closed.
              I, [2010-09-17T05:14:04.760353 #16077]  INFO -- : Image converted to EC2 format.
              T, [2010-09-17T05:14:04.760656 #16077] TRACE -- : Moving 'build/appliances/i386/fedora/13/f13-basic/ec2-plugin/tmp/f13-basic.ec2' deliverable to target destination 'build/appliances/i386/fedora/13/f13-basic/ec2-plugin/f13-basic.ec2'...
              D, [2010-09-17T05:14:04.761687 #16077] DEBUG -- : Platform plugin executed.
              D, [2010-09-17T05:14:04.761884 #16077] DEBUG -- : No delivery method selected, skipping delivering.
              

               

              --Marek

              • 4. Re: appliance with required packages
                ingedeut

                Thanks Marek,

                 

                the error occurs while executing EC2 conversion .  I use m1.small machine of EC2 which has the following properties:

                 

                Filesystem           1K-blocks      Used Available Use% Mounted on
                /dev/xvda1            10321208   3968800   5828120  41% /
                none                    853712         0    853712   0% /dev/shm
                /dev/xvda2           153899044    192076 145889344   1% /mnt
                /dev/loop0            10321208    154232   9642688   2% /root/appliances/build/appliances/i386/fedora/13/jbossesb/ec2-plugin/tmp/ec2-6815627002

                Filesystem           1K-blocks      Used Available Use% Mounted on

                /dev/xvda1            10321208   3968800   5828120  41% /

                none                    853712         0    853712   0% /dev/shm

                /dev/xvda2           153899044    192076 145889344   1% /mnt

                /dev/loop0            10321208    154232   9642688   2% /root/appliances/build/appliances/i386/fedora/13/jbossesb/ec2-plugin/tmp/ec2-6815627002

                I thinks that the boxgrinder-build works with /dev/loop0 whihc has only 10 GB size.
                Do you know how to increase the size of /dev/loop0 (/dev/xvda2 has 153 GB), so that it will has a size more than 10 GB?
                is there a shell-commanf for that?
                Thanks.
                --Younes

                • 5. Re: appliance with required packages
                  ingedeut

                  Filesystem            Size  Used Avail Use% Mounted on
                  /dev/xvda1            9.9G  3.8G  5.6G  41% /
                  none                  834M     0  834M   0% /dev/shm
                  /dev/xvda2            147G  188M  140G   1% /mnt
                  /dev/loop0            9.9G  151M  9.2G   2% /root/appliances/build/appliances/i386/fedora/13/jbossesb/ec2-plugin/tmp/ec2-6815627002

                  more clear:

                   

                  Filesystem            Size  Used Avail Use% Mounted on

                  /dev/xvda1            9.9G  3.8G  5.6G  41% /

                  none                  834M     0  834M   0% /dev/shm

                  /dev/xvda2            147G  188M  140G   1% /mnt

                  /dev/loop0            9.9G  151M  9.2G   2% /root/appliances/build/appliances/i386/fedora/13/jbossesb/ec2-plugin/tmp/ec2-6815627002

                  • 6. Re: appliance with required packages
                    goldmann

                    Build process on EC2 meta appliance must be executed on /mnt where you have a lot more spare, as you can see above.

                     

                    --Marek

                    • 7. Re: appliance with required packages
                      ingedeut

                      Thanks Marek,

                       

                      I did it. But i still become the same error. I will be crazy.

                       

                      Can you please describe step by step how you did it?

                       

                      --Regards

                       

                      Younes

                      • 8. Re: appliance with required packages
                        goldmann
                        1. 'gem install boxgrinder-build-fedora-os-plugin boxgrinder-build-ec2-platform-plugin'
                        2. Saved your appliance to a file under /mnt directory
                        3. Run 'boxgridner build -W -t fedora-13-basic.appl -p ec2'

                         

                        --Marek

                        • 9. Re: appliance with required packages
                          ingedeut

                          Thanks Marek,  but i still get the same  error.  Here is the boxgrinder.log  --Regards  Younes

                          • 10. Re: appliance with required packages
                            goldmann

                            I cannot help you. I tried one more time on another instance and it was successfull:

                             

                            [root@domU-12-31-38-01-79-24 boxgrinder]# rm -rf build/
                            [root@domU-12-31-38-01-79-24 boxgrinder]# cat test.appl 
                            name: f13-basic
                            summary: Just Enough Operating System based on Fedora 13
                            os:
                              name: fedora
                              version: 13
                            hardware:
                              memory: 512
                              partitions:
                                "/":
                                  size: 10
                            packages:
                              includes:
                                - bash
                                - yum
                                - vim-minimal
                                - openssh-server
                            
                            [root@domU-12-31-38-01-79-24 boxgrinder]# boxgrinder-build test.appl -p ec2
                            I, [2010-09-17T11:35:48.470372 #1765]  INFO -- : Resolving packages added to f13-basic appliance definition file...
                            I, [2010-09-17T11:36:12.732159 #1765]  INFO -- : All additional packages for f13-basic appliance successfully resolved.
                            I, [2010-09-17T11:36:12.732401 #1765]  INFO -- : Building f13-basic appliance...
                            I, [2010-09-17T11:40:10.328750 #1765]  INFO -- : Executing post operations after build...
                            I, [2010-09-17T11:40:18.615442 #1765]  INFO -- : Post operations executed.
                            I, [2010-09-17T11:40:19.032235 #1765]  INFO -- : Base image for f13-basic appliance was built successfully.
                            I, [2010-09-17T11:40:19.059412 #1765]  INFO -- : Converting f13-basic appliance image to EC2 format...
                            I, [2010-09-17T11:50:54.620533 #1765]  INFO -- : Image converted to EC2 format.
                            [root@domU-12-31-38-01-79-24 boxgrinder]#
                            

                             

                            --Marek

                            • 11. Re: appliance with required packages
                              goldmann

                              Locking this thread, please continiue in previous thread.

                               

                              --Marek