Changeset 2006 in ProjectBuilder for devel/pb-doc


Ignore:
Timestamp:
Oct 2, 2015, 4:35:19 PM (9 years ago)
Author:
Bruno Cornec
Message:

Review pb+docker demo script now fully working

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-doc/pb-demo

    r1983 r2006  
    5757# Mount the external HDD if needed
    5858sudo mount /dev/sdc1 /mnt
    59 sudo mount -o bind /mnt/docker /var/cache/docker
     59$ sudo mount -o bind /run/media/bruno/pb+docker/docker /var/cache/docker
    6060# Then restart docker to avoid errors with Attempt to write a readonly database
    61 sudo systemctl restart docker
    62 sudo systemctl restart docker_registry
     61$ sudo systemctl restart docker
     62$ sudo systemctl restart docker_registry
    6363# Now show how easy it's to build for another distro in a Docker VE
    6464# Create Docker container
    65 docker images
     65$ docker images
     66
     67# If docker issue with net, restart docker
     68$ sudo ip link delete docker0
     69$ sudo systemctl restart docker.service
    6670
    6771# Building with rpmbootstrap for a distro
    68 # That one has already been done to save time during demo
    69 #pb -p pb -m mageia-4-x86_64 -T docker newve
    70 # But we can launch in // the same for mga5
    71 #pb -p pb -m mageia-5-x86_64 -T docker newve
    72 docker images
    73 docker run -ti <imgid> /bin/bash
    74 $ urpmi tar
    75 pb -p pb -m mageia-4-x86_64  -T docker sbx2setupve
    76 docker ps -a
    77 docker attach <ctnid>
    78 docker images
    79 docker run -ti <imgid> /bin/bash
    80 pb -h
    81 pb -p pb -m mageia-4-x86_64  -T docker prepve
    82 docker images
    83 docker run -ti <imgid> /bin/bash
    84 pb -p pb -m mageia-4-x86_64  -T docker sbx2ve
    85 ls -al /var/ftp/pub/pb/test/mageia/4/x86_64
     72# We already imported the upstream container images to save time
     73# Start with the local distro to simplify
     74#
     75$ pb -p pb -m mageia-5-x86_64 -T docker -i mageia:5 newve
     76# or without -i if time permits using rpmbootstrap
     77$ docker images | grep mageia-5
     78$ docker images | grep mageia-5 | awk '{print $3}'
     79$ docker run -ti `docker images | grep mageia-5 | awk '{print $3}'` /bin/bash
     80[root@8158b86786a7 /]# cat /etc/mageia-release
     81Mageia release 5 (Official) for x86_64
     82[root@8158b86786a7 /]# uname -a
     83Linux 8158b86786a7 3.19.8-desktop-3.mga5 #1 SMP Sat Jun 13 17:05:48 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
     84[root@8158b86786a7 /]# urpmi tcsh
     85    http://distro.ibiblio.org/mageia/distrib/5/x86_64/media/core/release/tcsh-6.18.01-8.mga5.x86_64.rpm
     86installing tcsh-6.18.01-8.mga5.x86_64.rpm from /var/cache/urpmi/rpms           
     87Preparing...                     #############################################
     88      1/1: tcsh                  #############################################
     89[root@8158b86786a7 /]# pb --help
     90bash: pb: command not found
     91[root@8158b86786a7 /]# exit
     92pb -p pb -m mageia-5-x86_64 -T docker sbx2setupve
     93$ docker images | grep mageia-5
     94localhost:5000/pb                  mageia-5-x86_64-pb                   43bcfd269f29        2 minutes ago       376.2 MB
     95localhost:5000/pb                  mageia-5-x86_64                      466f10e78bba        16 minutes ago      184.5 MB
     96$ docker run -ti `docker images | grep mageia-5-x86_64-pb | awk '{print $3}'` /bin/bash
     97[root@bbd981bcf4cd /]# pb --help
     98pb (aka project-builder.org) Version devel20150930111943-2002
     99[root@bbd981bcf4cd /]# exit
     100$ pb -p pb -m mageia-5-x86_64 -T docker prepve
     101$ docker images | grep mageia-5-x86_64-pb-pb
     102localhost:5000/pb                  mageia-5-x86_64-pb-pb                66dd65cab2cc        About a minute ago   378.9 MB
     103$ pb -p pb -m mageia-5-x86_64  -T docker sbx2ve
     104
     105
     106# On another distro already preped
     107# we can launch in // the same for ubuntu 15.04
     108$ pb -p pb -m ubuntu-15.04-x86_64 -T docker -i ubuntu:15.04 newve
     109$ pb -p pb -m ubuntu-15.04-x86_64 -T docker sbx2setupve
     110$ pb -p pb -m ubuntu-15.04-x86_64 -T docker prepve
     111$ pb -p pb -m ubuntu-15.04-x86_64 -T docker sbx2ve
     112
     113
     114# Another container Ubuntu 13.10
     115$ pb -p pb -m ubuntu-13.10-x86_64 -T docker build2ve
     116$ ls -al /var/ftp/pub/pb/test/ubuntu/13.10
     117
     118# On another project
     119$ pb -p mondorescue -m mageia-4-x86_64  -T docker prepve
     120$ docker images
     121$ ls -al /var/ftp/pub/pb/test/mageia/4/x86_64
     122$ ssh bruno@www.mondorescue.org ls -altrg /prj/ftp/test/mageia/4/x86_64
     123
     124
     125# Look at what was created
     126$ docker images
     127$ docker history localhost:5000/pb:mageia-4-x86_64-pb-pb
     128
     129$ docker ps -a
     130$ docker attach <ctnid>
     131$ docker images
     132$ docker run -ti <imgid> /bin/bash
     133$ pb -h
     134$ docker run -ti <imgid> /bin/bash
     135$ ls -al /var/ftp/pub/pb/test/mageia/4/x86_64
    86136#
    87 # On another distro already preped
    88 # Another container Ubuntu 13.10
    89 pb -p pb -m ubuntu-13.10-x86_64 -T docker build2ve
    90 ls -al /var/ftp/pub/pb/test/ubuntu/13.10
    91 
    92 # On another project
    93 pb -p mondorescue -m mageia-4-x86_64  -T docker prepve
    94 docker images
    95 ls -al /var/ftp/pub/pb/test/mageia/4/x86_64
    96 ssh bruno@www.mondorescue.org ls -altrg /prj/ftp/test/mageia/4/x86_64
    97 
    98 
    99 # Look at what was created
    100 docker images
    101 docker history localhost:5000/pb:mageia-4-x86_64-pb-pb
    102 
    103 # From an upstream image instead of using ours.
    104 pb -p pb -m mageia-5-x86_64 -T docker -i mageia:5 newve
    105 
    106 # If docker issue with net, restart docker
    107 ip link delete docker0
    108 systemctl restart docker.service
    109137
    110138# WIth VMs
Note: See TracChangeset for help on using the changeset viewer.