Changes between Version 4 and Version 5 of Documentation


Ignore:
Timestamp:
Jul 21, 2016, 12:49:17 PM (4 years ago)
Author:
Bruno Cornec
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation

    v4 v5  
    1515=== Virtual Machines ===
    1616
    17 In order to use a new VM (Virtual Machine) with pb, you have to follow a 3-step approach:
     17In order to use a new VM (Virtual Machine) with pb, you have to follow a 4-step approach:
    18181. Create an appropriate VM using pb (or not if you prefer to create it outside with your preferred tools)
    1919{{{
    20 pb -m os-ver-arch -i /path/to/os.ver.arch.iso newver
     20pb -p prj -m os-ver-arch -i /path/to/os.ver.arch.iso newver
    2121}}}
    2222where you pass to the pb command the ISO image of your distribution media. If you prefer to deploy using PXE e.g. you have to use instead the qemu command directly.
     
    24242. Set up the VM so it gets all what is needed to run pb in it:
    2525{{{
    26 pb -m os-ver-arch setupvm
     26pb -p prj -m os-ver-arch setupvm
    2727}}}
    2828This step will install pb inside your VM, create a dedicated account for building packages, exchange dedicated ssh keys from your own account, and setup sudo rights so the build can be made non-interactively. The first time ou call that command, it will ask you the root passwd of the VM, in order to setup up auhtentication.
    2929Each time you want to re-align pb versiosn between your host and the guest, you'll have to re-run that command. The root passwd won't be asked this time, so it can be automated easily. (If you don't precise a specific VM to work on, all the the one declared in your configuration file will be updated).
    3030
    31 3. Finally you're able to use your VM to build your software packages:
     313. Prepare the VM for your project
    3232{{{
    33 pb -m os-ver-arch sbx2vm
     33pb -p prj -m os-ver-arch prepvm
     34}}}
     35This step will install all the required dependencies for your prj project inside the VM. It will analyze the requirements coming from the spec file, or control file and launch the installation of the required packages.
     36
     374. Finally you're able to use your VM to build your software packages:
     38{{{
     39pb -p prj -m os-ver-arch sbx2vm
    3440}}}
    3541Note that you can specify multiple VMs separated by ','.
     42
     43=== Virtual Environments ===
     44Also note that you can do the same with Virtual Environments (VE) replacing the vm suffix by the ve one. This will work for Docker containers as well, and you can use the -T docker option for that.
     45
     46=== Gentoo Container ===
     47
     48Reference: https://github.com/gentoo/gentoo-docker-images
     49{{{
     50$ docker run -ti gentoo/stage3-amd64 /bin/bash
     51# emerge-webrsync
     52# exit
     53$ docker ps -l
     54CONTAINER ID    IMAGE                 COMMAND      CREATED             STATUS                    PORTS     NAMES
     55a40e2247b233    gentoo/stage3-amd64   "/bin/bash"  9 minutes ago       Exited (0) 3 seconds ago            sick_hodgkin
     56$ docker commit a40e2247b233 gentoo:latest
     57$ pb -p prj -m gentoo-nover-x86_64 -T docker -i gentoo newve
     58}}}
    3659
    3760= Non upstream usage of  Project-Builder.org =