Changeset 1900


Ignore:
Timestamp:
Sep 30, 2014, 10:08:03 AM (4 years ago)
Author:
bruno
Message:
  • Add support for docker phase 1: newve working
  • Add separate pb_ve_snap function
  • Add separate pb_ve_docker functions to interact with the registry and the repository
  • Add a dockerregistry conf parameter
Location:
devel
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/etc/pb.conf

    r1891 r1900  
    402402rbsmindep mageia-2-x86_64 = basesystem,bash,chkconfig,coreutils,cpio,cracklib,cracklib-dicts,crontabs,curl,dbus,dhcp-client,dirmngr,e2fsprogs,ethtool,expat,file,filesystem,findutils,gamin,gawk,glibc,gnupg2,grep,info,initscripts,iputils,lib64acl1,lib64attr1,lib64blkid1,lib64bzip2_1,lib64cap2,lib64curl4,lib64db4.8,lib64elfutils1,lib64ext2fs2,lib64gcrypt11,lib64gpg-error0,lib64idn11,lib64krb53,lib64ksba8,lib64ldap2.4_2,lib64lua5.1,lib64lzma5,lib64magic1,lib64ncurses5,lib64ncursesw5,lib64nspr4,lib64nss3,lib64openssl1.0.0,lib64popt0,lib64readline6,lib64rpm2,lib64rpmbuild2,lib64sasl2,lib64sqlite3_0,lib64ssh2_1,lib64termcap2,lib64usb1.0_0,lib64uuid1,lib64xml2_2,lib64zlib1,libgcc1,logrotate,lua,mageia-release-common,meta-task,mingetty,ncurses,net-tools,nss,openldap,openssl,pam,passwd,pcre,perl,perl-base,perl-Config-IniFiles,perl-Locale-gettext,perl-MDV-Distribconf,perl-URPM,procps,psmisc,python,rpm,sed,setup,shadow-utils,systemd,udev,urpmi,util-linux,vim-minimal
    403403#
    404 rbsmindep mageia-3-i386 = basesystem,bash,chkconfig,coreutils,cpio,cracklib,cracklib-dicts,crontabs,curl,dbus,dhcp-client,dirmngr,e2fsprogs,ethtool,expat,file,filesystem,findutils,gamin,gawk,glibc,gnupg2,grep,info,initscripts,iputils,libacl1,libattr1,libblkid1,libbzip2_1,libcap2,libcurl4,libdb5.3,libelfutils1,libext2fs2,libgcc1,libgcrypt11,libgpg-error0,libidn11,libkrb53,libksba8,libldap2.4_2,liblua5.2,liblzma5,libmagic1,libmount1,libncurses5,libncursesw5,libnspr4,libnss3,libopenssl1.0.0,libpopt0,libreadline6,librpm3,librpmbuild3,libsasl2,libsqlite3_0,libssh2_1,libstdc++6,libtermcap2,libudev1,libusb1.0_0,libuuid1,libxml2_2,libzlib1,logrotate,lua,mageia-release-common,meta-task,mingetty,ncurses,net-tools,nss,openldap,openssl,pam,passwd,pcre,perl,perl-base,perl-Config-IniFiles,perl-List-MoreUtils,perl-Locale-gettext,perl-MDV-Distribconf,perl-URPM,procps,psmisc,python,rpm,sed,setup,shadow-utils,systemd,urpmi,util-linux,vim-minimal
    405 rbsmindep mageia-3-x86_64 = basesystem,bash,chkconfig,coreutils,cpio,cracklib,cracklib-dicts,crontabs,curl,dbus,dhcp-client,dirmngr,e2fsprogs,ethtool,expat,file,filesystem,findutils,gamin,gawk,glibc,gnupg2,grep,info,initscripts,iputils,lib64acl1,lib64attr1,lib64blkid1,lib64bzip2_1,lib64cap2,lib64curl4,lib64db5.3,lib64elfutils1,lib64ext2fs2,lib64gcrypt11,lib64gpg-error0,lib64idn11,lib64krb53,lib64ksba8,lib64ldap2.4_2,lib64lua5.2,lib64lzma5,lib64magic1,lib64mount1,lib64ncurses5,lib64ncursesw5,lib64nspr4,lib64nss3,lib64openssl1.0.0,lib64popt0,lib64readline6,lib64rpm3,lib64rpmbuild3,lib64sasl2,lib64sqlite3_0,lib64ssh2_1,lib64termcap2,lib64udev1,lib64usb1.0_0,lib64uuid1,lib64xml2_2,lib64zlib1,libgcc1,logrotate,lua,mageia-release-common,meta-task,mingetty,ncurses,net-tools,nss,openldap,openssl,pam,passwd,pcre,perl,perl-base,perl-Config-IniFiles,perl-List-MoreUtils,perl-Locale-gettext,perl-MDV-Distribconf,perl-URPM,procps,psmisc,python,rpm,sed,setup,shadow-utils,systemd,urpmi,util-linux,vim-minimal
     404rbsmindep mageia-3-i386 = basesystem,bash,chkconfig,coreutils,cpio,cracklib,cracklib-dicts,crontabs,curl,dbus,dhcp-client,dirmngr,e2fsprogs,ethtool,expat,file,filesystem,findutils,gamin,gawk,glibc,gnupg2,grep,info,initscripts,iputils,libacl1,libattr1,libblkid1,libbzip2_1,libcap2,libcurl4,libdb5.3,libelfutils1,libext2fs2,libgcc1,libgcrypt11,libgpg-error0,libidn11,libkrb53,libksba8,libldap2.4_2,liblua5.1,liblzma5,libmagic1,libmount1,libncurses5,libncursesw5,libnspr4,libnss3,libopenssl1.0.0,libpopt0,libreadline6,librpm3,librpmbuild3,libsasl2,libsqlite3_0,libssh2_1,libstdc++6,libtermcap2,libudev1,libusb1.0_0,libuuid1,libxml2_2,libzlib1,logrotate,lua,mageia-release-common,meta-task,mingetty,ncurses,net-tools,nss,openldap,openssl,pam,passwd,pcre,perl,perl-base,perl-Config-IniFiles,perl-List-MoreUtils,perl-Locale-gettext,perl-MDV-Distribconf,perl-URPM,procps,psmisc,python,rpm,sed,setup,shadow-utils,systemd,urpmi,util-linux,vim-minimal
     405rbsmindep mageia-3-x86_64 = basesystem,bash,chkconfig,coreutils,cpio,cracklib,cracklib-dicts,crontabs,curl,dbus,dhcp-client,dirmngr,e2fsprogs,ethtool,expat,file,filesystem,findutils,gamin,gawk,glibc,gnupg2,grep,info,initscripts,iputils,lib64acl1,lib64attr1,lib64blkid1,lib64bzip2_1,lib64cap2,lib64curl4,lib64db5.3,lib64elfutils1,lib64ext2fs2,lib64gcrypt11,lib64gpg-error0,lib64idn11,lib64krb53,lib64ksba8,lib64ldap2.4_2,lib64lua5.1,lib64lzma5,lib64magic1,lib64mount1,lib64ncurses5,lib64ncursesw5,lib64nspr4,lib64nss3,lib64openssl1.0.0,lib64popt0,lib64readline6,lib64rpm3,lib64rpmbuild3,lib64sasl2,lib64sqlite3_0,lib64ssh2_1,lib64termcap2,lib64udev1,lib64usb1.0_0,lib64uuid1,lib64xml2_2,lib64zlib1,libgcc1,logrotate,lua,mageia-release-common,meta-task,mingetty,ncurses,net-tools,nss,openldap,openssl,pam,passwd,pcre,perl,perl-base,perl-Config-IniFiles,perl-List-MoreUtils,perl-Locale-gettext,perl-MDV-Distribconf,perl-URPM,procps,psmisc,python,rpm,sed,setup,shadow-utils,systemd,urpmi,util-linux,vim-minimal
    406406#
    407407rbsmindep mageia-4-i386 = basesystem,bash,chkconfig,coreutils,cpio,cracklib,cracklib-dicts,crontabs,curl,dbus,dhcp-client,dirmngr,e2fsprogs,ethtool,expat,file,filesystem,findutils,gamin,gawk,glibc,gnupg2,grep,info,initscripts,iputils,libacl1,libattr1,libblkid1,libbzip2_1,libcap2,libcurl4,libdb5.3,libelfutils1,libext2fs2,libgcc1,libgcrypt11,libgpg-error0,libidn11,libkrb53,libksba8,libldap2.4_2,liblua5.1,liblzma5,libmagic1,libmount1,libncurses5,libncursesw5,libnspr4,libnss3,libopenssl1.0.0,libpopt0,libreadline6,librpm3,librpmbuild3,libsasl2_3,libsqlite3_0,libssh2_1,libstdc++6,libudev1,libusb1.0_0,libuuid1,libxml2_2,libzlib1,logrotate,lua,mageia-release-common,meta-task,mingetty,ncurses,net-tools,nss,openldap,openssl,pam,passwd,pcre,perl,perl-base,perl-Config-IniFiles,perl-List-MoreUtils,perl-Locale-gettext,perl-MDV-Distribconf,perl-URPM,procps,psmisc,python,rpm,sed,setup,shadow-utils,systemd,urpmi,util-linux,vim-minimal
     
    411411cachedir rpmbootstrap = /var/cache/rpmbootstrap
    412412cachedir pbmkbm = /var/cache/pbmkbm
     413
     414# When using docker some specific conf items
     415dockerregistry default = http://localhost:5000/pb
     416#dockerimage mageia-4-x86_64 = mageia-4-x86_64
     417#dockertag pb = pb
    413418
    414419# Options to pass to rpmbootstrap command. By default keep downloaded packages
  • devel/pb-modules/etc/pb.conf.pod

    r1802 r1900  
    111111 Example: delivery mondorescue = prod
    112112
     113=item B<dockerregistry>
     114
     115 Nature: Mandatory
     116 Key: project (as defined in the -p option or PBPROJ environment variable)
     117 Value: name of the docker registry to interact with
     118 Conffile: project
     119 Example: dockerregistry mondorescue = localhost:5900/mondorescue
     120
    113121=item B<extpkgdir>
    114122
     
    889897 Nature: Mandatory
    890898 Key: project (as defined in the -p option or PBPROJ environment variable)
    891  Value: chroot|schroot. There are two different ways of launching a chroot activity in pb. For the moment only chroot has been tested.
     899 Value: chroot|schroot|docker. There are two different ways of launching a Virtual Environment activity in pb. For the moment only chroot and docker have been tested.
    892900 Conffile: ve
    893901 Example: vertype default = chroot
  • devel/pb-modules/lib/ProjectBuilder/VE.pm

    r1646 r1900  
    3131 
    3232our @ISA = qw(Exporter);
    33 our @EXPORT = qw(pb_ve_launch);
     33our @EXPORT = qw(pb_ve_launch pb_ve_snap);
    3434
    3535($VERSION,$REVISION) = pb_version_init();
     
    4343=head1 DESCRIPTION
    4444
    45 This modules provides functions to deal with Virtual Environements (VE), aka chroot.
     45This modules provides functions to deal with Virtual Environements (VE), aka chroot/containers.
    4646
    4747=head1 SYNOPSIS
     
    6060=item B<pb_ve_launch>
    6161
    62 This function launch a VE, creating it if necessary using multiple external potential tools.
     62This function launches a VE, creating it if necessary using multiple external potential tools.
    6363
    6464=cut
     
    6969my $pbforce = shift || 0;       # By default do not rebuild VE
    7070my $locsnap = shift || 0;       # By default do not snap VE
     71my $vetype = shift || undef;        # By default no image
     72my $pbimage = shift || undef;       # By default no image
     73
     74my $dockerregistry = undef;
     75my $docrepo = undef;            # By default no repository for docker available
    7176
    7277# Get distro context
     
    7479
    7580# Get VE context
    76 my ($ptr,$vepath) = pb_conf_get("vetype","vepath");
    77 my $vetype = $ptr->{$ENV{'PBPROJ'}};
    78 
     81if (not defined $vetype) {
     82    my ($ptr) = pb_conf_get("vetype");
     83    $vetype = $ptr->{$ENV{'PBPROJ'}};
     84}
    7985confess "No vetype defined for $ENV{PBPROJ}" unless (defined $vetype);
    8086pb_log(1, "Using vetype $vetype for $ENV{PBPROJ}\n");
    81 
    82 if (($vetype eq "chroot") || ($vetype eq "schroot")) {
     87my ($vepath) = pb_conf_get("vepath");
     88
     89if (($vetype eq "chroot") || ($vetype eq "schroot") || ($vetype eq "docker")) {
    8390
    8491    # We need to avoid umask propagation to the VE
     
    8794    # We can probably only get those params now we have the distro context
    8895    my ($rbsb4pi,$rbspi,$vesnap,$oscodename,$osmindep,$verebuild,$rbsmirrorsrv) = pb_conf_get_if("rbsb4pi","rbspi","vesnap","oscodename","osmindep","verebuild","rbsmirrorsrv");
     96    if ($vetype eq "docker") {
     97        # Check acces to registry
     98        ($dockerregistry) = pb_conf_get("dockerregistry");
     99        if ((defined $dockerregistry) && (defined $dockerregistry->{$ENV{'PBPROJ'}})) {
     100            pb_ve_docker_registry($dockerregistry->{$ENV{'PBPROJ'}});
     101        } else {
     102            die "When using docker you need to declare a dockerregistry parameter. Read the man page"
     103        }
     104    }
    89105
    90106    # Architecture consistency
     
    98114    if ($EFFECTIVE_USER_ID != 0) {
    99115        $sudocmd ="sudo ";
    100         foreach my $proxy (qw/http_proxy ftp_proxy/) {
     116    foreach my $proxy (qw/http_proxy ftp_proxy/) {
    101117            if (defined $ENV{$proxy}) {
    102118                open(CMD,"sudo sh -c 'echo \$$proxy' |") or die "can't run sudo sh?: $!";
     
    113129
    114130    my $root = pb_path_expand($vepath->{$ENV{PBPROJ}});
    115     if (((defined $verebuild) && ($verebuild->{$ENV{'PBPROJ'}} =~ /true/i)) || ($pbforce == 1)) {
     131   
     132    if (((((defined $verebuild) && ($verebuild->{$ENV{'PBPROJ'}} =~ /true/i)) || ($pbforce == 1)) && ($vetype ne "docker"))
     133        # For docker we may have a reference image that we'll use
     134        || (((not defined $pbimage) || ($pbimage eq "")) && ($vetype eq "docker"))) {
     135
    116136        my ($verpmtype,$vedebtype) = pb_conf_get("verpmtype","vedebtype");
    117137        my ($rbsopt1) = pb_conf_get_if("rbsopt");
     
    250270
    251271    # Test if an existing snapshot exists and use it if appropriate
    252     # And also use it of no local extracted VE is present
     272    # And also use it if no local extracted VE is present
    253273    if ((-f "$root/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}.tar.gz") &&
    254274    (((defined $vesnap->{$v}) && ($vesnap->{$v} =~ /true/i)) ||
     
    266286    pb_system("$sudocmd $command 755 $root/$pbos->{'name'} $root/$pbos->{'name'}/$pbos->{'version'} $root/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}","Fixing permissions");
    267287
     288    # If docker, create the image and remove the now temp dir except if we had one already
     289    if ($vetype eq "docker") {
     290        if ((not defined $pbimage) || ($pbimage eq "")) {
     291            # Snaphot the VE to serve as an input for docker
     292            pb_ve_snap($pbos,$root);
     293            # Create the docker image from the previous bootstrap
     294            my $cmd1 = pb_check_req("docker",0);
     295            $docrepo = pb_ve_docker_repo($dockerregistry->{$ENV{'PBPROJ'}});
     296            pb_system("$cmd1 import - $docrepo:$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'} < $root/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}.tar.gz");
     297            pb_system("$cmd1 push $docrepo:$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}");
     298        #} else {
     299        }
     300    }
     301
    268302    # Nothing more to do for VE. No real launch
    269303} else {
     
    299333}
    300334
     335# Snapshot the VE
     336sub pb_ve_snap {
     337
     338my $pbos = shift;
     339my $root = shift;
     340my $tpdir = "$root/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}";
     341pb_system("sudo tar cz -C $tpdir -f $root/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}.tar.gz .","Creating a snapshot of $tpdir");
     342}
     343
     344# Returns the docker registry to interact with
     345sub pb_ve_docker_registry {
     346
     347my $dockerreg = shift || undef;
     348my $wget = pb_check_req("wget",0);
     349my ($scheme, $account, $host, $port, $path) = pb_get_uri($dockerreg);
     350my $docreg = $scheme."://";
     351$docreg .= $account."@" if ((defined $account) && ($account ne ""));
     352$docreg .= $host;
     353$docreg .= ":$port" if ((defined $port) && ($port ne ""));
     354open(FD,"$wget $docreg -q -O -|") || die "Unable to talk to the docker registry $docreg";
     355my $found = undef;
     356while (<FD>) {
     357    $found = 1 if (/docker-registry/);
     358}
     359close(FD);
     360die "No correct docker-registry answering at $docreg. Please check your configuration" if (not defined $found);
     361#
     362return($docreg);
     363}
     364
     365# Returns the docker repository to interact with
     366sub pb_ve_docker_repo {
     367
     368my $dockerreg = shift || undef;
     369my $docrepo = "";
     370my ($scheme, $account, $host, $port, $path) = pb_get_uri($dockerreg);
     371$docrepo .= $host;
     372$docrepo .= ":$port" if ((defined $port) && ($port ne ""));
     373$docrepo .= "$path";
     374return($docrepo);
     375}
    301376
    302377=head1 WEB SITES
  • devel/pb/bin/pb

    r1886 r1900  
    6262my $pbport;                 # Port to use to connect to the VM/RM
    6363my $newver;                 # New version to create
    64 my $iso = undef;            # ISO image for the VM to create
     64my $pbimage = undef;            # ISO image for the VM to create or docker image for the VE
     65my $vetype = undef;         # Type of Virtual environment to deal with
    6566
    6667my @date = pb_get_date();
     
    8586=head1 SYNOPSIS
    8687
    87 pb [-vhSq][-r pbroot][-p project][[-s script -a account -P port][-t [os-ver-arch]][-m os-ver-arch[,...]]][-g][-i iso] <action> [<pkg1> ...]
    88 
    89 pb [--verbose][--help][--man][--quiet][--snapshot][--revision pbroot][--project project][[--script script --account account --port port][--target [os-ver-arch]][--machine os-ver-arch[,...]]][--nographic][--iso iso][--rebuild] <action> [<pkg1> ...]
     88pb [-vhSq][-r pbroot][-p project][[-s script -a account -P port][-T VEtype][-t [os-ver-arch]][-m os-ver-arch[,...]]][-g][-i image] <action> [<pkg1> ...]
     89
     90pb [--verbose][--help][--man][--quiet][--snapshot][--revision pbroot][--project project][[--script script --account account --port port][-T VEtype][--target [os-ver-arch]][--machine os-ver-arch[,...]]][--nographic][--image image][--rebuild] <action> [<pkg1> ...]
    9091
    9192=head1 OPTIONS
     
    124125All if none precised (or use the env variable PBV).
    125126
     127=item B<-T|--vetype VEtype]>
     128
     129Type of Virtual Environments (VE)
     130Can be chroot or docker.
     131
    126132=item B<-s|--script script>
    127133
     
    132138Do not launch VMs in graphical mode.
    133139
    134 =item B<-i|--iso iso_image>
    135 
    136 Name of the ISO image of the distribution you want to install on the related VMs.
     140=item B<-i|--image image>
     141
     142It could be either:
     143- The name of the ISO image of the distribution you want to install on the related VMs
     144- The name of the docker image of the distribution you want to install on the related VEs
     145
    137146
    138147=item B<-a|--account account>
     
    670679
    671680GetOptions("help|?|h+" => \$opts{'h'},
     681        "account|a=s" => \$opts{'a'},
     682        "force|f" => \$opts{'f'},
     683        "nographic|g" => \$opts{'g'},
     684        "image|i=s" => \$opts{'i'},
     685        "log-files|l=s" => \$opts{'l'},
     686        "machines|mock|m=s" => \$opts{'m'},
    672687        "man" => \$opts{'man'},
    673         "verbose|v+" => \$opts{'v'},
    674         "snapshot|S" => \$opts{'S'},
    675         "quiet|q" => \$opts{'q'},
    676         "log-files|l=s" => \$opts{'l'},
    677         "force|f" => \$opts{'f'},
    678         "account|a=s" => \$opts{'a'},
    679         "revision|r=s" => \$opts{'r'},
    680         "script|s=s" => \$opts{'s'},
    681         "machines|mock|m=s" => \$opts{'m'},
    682         "target|t:s" => \$opts{'t'},
    683         "nographic|g" => \$opts{'g'},
    684688        "port|P=i" => \$opts{'P'},
    685689        "project|p=s" => \$opts{'p'},
     690        "quiet|q" => \$opts{'q'},
     691        "revision|r=s" => \$opts{'r'},
    686692        "rebuild" => \$opts{'rebuild'},
    687         "iso|i=s" => \$opts{'i'},
     693        "snapshot|S" => \$opts{'S'},
     694        "script|s=s" => \$opts{'s'},
     695        "type|T:s" => \$opts{'T'},
     696        "target|t:s" => \$opts{'t'},
    688697        "version|V=s" => \$opts{'V'},
     698        "verbose|v+" => \$opts{'v'},
    689699        "keep|k" => \$opts{'k'},
    690700        "stop-on-error!" => \$Global::pb_stop_on_error,
     
    743753}
    744754if (defined $opts{'i'}) {
    745     $iso = $opts{'i'};
     755    $pbimage = $opts{'i'};
    746756}
    747757if (defined $opts{'t'}) {
    748758    $pbtarget = $opts{'t'};
     759}
     760if (defined $opts{'T'}) {
     761    $vetype = $opts{'T'};
    749762}
    750763
     
    23532366    my ($shcmd,$shcmdroot,$cpcmd,$cptarget,$cp2target);
    23542367    my $tpdir;
     2368    my $tp;
    23552369    if ($cmt =~ /^VE/) {
    2356         my $tp = pb_path_expand($vepath->{$ENV{'PBPROJ'}});
     2370        $tp = pb_path_expand($vepath->{$ENV{'PBPROJ'}});
    23572371        $tpdir = pb_path_expand("$tp/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}");
    2358         my ($ptr) = pb_conf_get("vetype");
    2359         my $vetype = $ptr->{$ENV{'PBPROJ'}};
     2372        if (not defined $vetype) {
     2373            my ($ptr) = pb_conf_get("vetype");
     2374            $vetype = $ptr->{$ENV{'PBPROJ'}};
     2375        }
    23602376        my $arch = pb_get_arch();
    23612377        if ($vetype eq "chroot") {
     
    23642380        } elsif ($vetype eq "schroot") {
    23652381            $shcmd = "schroot $tp -u $mac -- ";
     2382        } elsif ($vetype eq "docker") {
     2383            # docker manages the storage so rely on it
     2384            $shcmdroot = "sudo /usr/bin/docker $tpdir ";
     2385            $shcmd = "$shcmdroot /bin/su - $mac -c ";
    23662386        }
    23672387        $shcmd = "setarch i386 $shcmd" if (($pbos->{'arch'} =~ /i[3456]86/) && ($arch eq 'x86_64'));
     
    25332553    }
    25342554    if (($cmt =~ /^VE/) && ($snapme != 0)) {
    2535         my $tpdir = "$vepath->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}";
    2536         pb_system("sudo tar cz -C $tpdir -f $vepath->{$ENV{'PBPROJ'}}/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}.tar.gz .","Creating a snapshot of $tpdir");
     2555        pb_ve_snap($pbos,$tp);
    25372556    }
    25382557}
     
    26172636    # Launch the VMs/VEs
    26182637    if ($vtype eq "vm") {
    2619         die "-i iso parameter needed" if (((not defined $iso) || ($iso eq "")) && ($create != 0));
     2638        die "-i image parameter needed" if (((not defined $pbimage) || ($pbimage eq "")) && ($create != 0));
    26202639
    26212640        my ($ptr,$ptr2,$vmpath,$vmport,$vms) = pb_conf_get("vmtype","vmcmd","vmpath","vmport","vmsize");
     
    26832702        if (($vmtype eq "qemu") || ($vmtype eq "kvm")) {
    26842703            $vmm = "$vmpath->{$ENV{'PBPROJ'}}/$v.qemu";
    2685             if (($create != 0) || (defined $iso)) {
    2686                 $ENV{'PBVMOPT'} .= " -cdrom $iso -boot d";
     2704            if (($create != 0) || (defined $pbimage)) {
     2705                $ENV{'PBVMOPT'} .= " -cdrom $pbimage -boot d";
    26872706            }
    26882707            # Always redirect the network and always try to use a 'pb' snapshot
     
    27462765    } elsif ($vtype eq "ve") {
    27472766        # Force the creation of the VE and no snapshot usable
    2748         pb_ve_launch($v,$create,$usesnap);
     2767        pb_ve_launch($v,$create,$usesnap,$vetype,$pbimage);
    27492768    } else {
    27502769        # RM here
     
    35043523            # And shouldn't we be getting the one that matches the current pb version?
    35053524            # For the moment, just take the latest stable one
    3506             $cmdget = "wget --passive-ftp ftp://ftp.project-builder.org/src/ProjectBuilder-latest.tar.gz; wget --passive-ftp ftp://ftp.project-builder.org/src/project-builder-latest.tar.gz";
     3525            my $wget = pb_check_req("wget",0);
     3526            $cmdget = "$wget --passive-ftp ftp://ftp.project-builder.org/src/ProjectBuilder-latest.tar.gz; $wget --passive-ftp ftp://ftp.project-builder.org/src/project-builder-latest.tar.gz";
    35073527        }
    35083528        print SCRIPT << 'EOF';
  • devel/pbmkbm/bin/pbmkbm

    r1702 r1900  
    404404if ($opts{'b'} eq "ve") {
    405405    # Use project-builder VE mecanism to create a good VE !
     406    # TODO: This call is now assuming default vetype and image
    406407    pb_ve_launch($ENV{'PBV'},1);
    407408} elsif ($opts{'b'} eq "native") {
  • devel/rpmbootstrap/bin/rpmbootstrap

    r1894 r1900  
    6464=head1 SYNOPSIS
    6565
    66 rpmbootstrap [-vhmqpdk][-s script][-i iso][-a pkg1[,pkg2,...]] distribution-version-arch [target-dir] [mirror [script]]
     66rpmbootstrap [-vhmqpdk][-s script][-i image][-a pkg1[,pkg2,...]] distribution-version-arch [target-dir] [mirror [script]]
    6767
    6868rpmbootstrap [--verbose][--help][--man][--quiet][--print-rpms][--download-only]
    69 [--keep][--script script][--iso iso][--add pkg1,[pkg2,...]] distribution-version-arch [target-dir] [mirror [script]]
     69[--keep][--script script][--image image][--add pkg1,[pkg2,...]] distribution-version-arch [target-dir] [mirror [script]]
    7070
    7171=head1 OPTIONS
     
    110110You can use the chroot command to execute actions in the VE.
    111111
    112 =item B<-i|--iso iso_image>
    113 
    114 Name of the ISO image of the distribution you want to install on the related VE.
     112=item B<-i|--image image>
     113
     114Name of the ISO image or the docker image of the distribution you want to install on the related VE.
    115115
    116116=item B<-a|--add pkg1[,pkg2,...]>
     
    194194    "download-only|d" => \$opts{'d'},
    195195    "keep|k" => \$opts{'k'},
    196     "iso|i=s" => \$opts{'i'},
     196    "image|i=s" => \$opts{'i'},
    197197    "add|a=s" => \$opts{'a'},
    198198    "version|V=s" => \$opts{'V'},
     
    224224#}
    225225#if (defined $opts{'i'}) {
    226 #$iso = $opts{'i'};
     226#$image = $opts{'i'};
    227227#}
    228228
Note: See TracChangeset for help on using the changeset viewer.