4 Replies Latest reply: Nov 13, 2012 6:46 PM by Swalker-Oracle RSS

    Problems with creating 2nd repository

    924908
      Hello @all,

      I've tried to install a second repository like here http://docs.oracle.com/cd/E23824_01/html/E21803/glrai.html#scrolltoc

      First I copied the current repo directory /REPO to /DEVpool

      86 zfs snapshot repopool/REPO@SRU1
      137 zfs clone repopool/REPO@SRU1 repopool/DEVpool

      and after that I ran the following commands:

      215 pkgrepo set -s /DEVpool/repo publisher/prefix=dev

      217 svccfg -s pkg/server add dev
      218 svccfg -s pkg/server:dev addpg pkg application
      219 svccfg -s pkg/server:dev setprop pkg/port=81
      220 svccfg -s pkg/server:dev setprop pkg/inst_root=/DEVpool/repo
      222 svccfg -s pkg/server:dev addpg general framework
      223 svccfg -s pkg/server:dev addpropvalue general/complete astring: dev
      224 svccfg -s pkg/server:dev addpropvalue general/enabled boolean: true

      225 svcadm refresh application/pkg/server:dev

      229 pkgrepo rebuild -s /DEVpool/repo
      230 pkgrepo -s /DEVpool/repo refresh

      240 pkg set-publisher -g http://192.168.2.100:81/ dev

      root@jump-server1:/# pkg publisher
      PUBLISHER TYPE STATUS URI
      solaris origin online http://192.168.2.100/
      dev origin online http://192.168.2.100:81/

      With firefox I can access http://192.168.2.100:81/ but no packages are shown.
      On http://192.168.2.100/ everything is ok.


      I queried both repo directories with

      root@jump-server1:/mnt/sf_VirtualBox# pkg contents -s /REPO/repo/ > repo.log
      root@jump-server1:/mnt/sf_VirtualBox# pkg contents -s /DEVpool/repo/ > devpool.log
      root@jump-server1:/mnt/sf_VirtualBox# ls -l *.log
      -rwxrwxrwx 1 root vboxsf 6501058 Oct 17 13:50 devpool.log
      -rwxrwxrwx 1 root vboxsf 6501058 Oct 17 13:49 repo.log

      and both log files contain the same packages.

      This works also:

      root@jump-server1:/mnt/sf_VirtualBox# pkg list -g /REPO/repo amp
      NAME (PUBLISHER) VERSION IFO
      amp 0.5.11-0.133 --r
      group/feature/amp 0.5.11-0.175.0.0.0.2.2576 ---
      web/amp 0.5.11-0.174.0.0.0.0.0 --r
      root@jump-server1:/mnt/sf_VirtualBox# pkg list -g /DEVpool/repo/ amp
      NAME (PUBLISHER) VERSION IFO
      amp 0.5.11-0.133 --r
      group/feature/amp 0.5.11-0.175.0.0.0.2.2576 ---
      web/amp 0.5.11-0.174.0.0.0.0.0 --r
      root@jump-server1:/mnt/sf_VirtualBox#


      Any hints?

      Regards,
      Heinz

      Edited by: 921905 on 02.11.2012 11:19

      Edited by: 921905 on 02.11.2012 12:29
        • 1. Re: Problems with creating 2nd repository
          924908
          Hello again,

          because nobody has answered I want to make it a little bit clearer what the goal is:

          In the end when everything is put together I want so see that:

          On repo-server ( 192.168.2.100 ) both repos:

          root@repo-server:/# pkg publisher
          PUBLISHER TYPE STATUS URI
          prod origin online http://192.168.2.100/
          dev origin online http://192.168.2.100:81/

          root@repo-server:~# pkgrepo info -s http://192.168.2.100/
          PUBLISHER PACKAGES STATUS UPDATED
          prod 4292 online 2012-10-17T10:16:06.384247Z


          root@repo-server:~# pkgrepo info -s http://192.168.2.100:81
          PUBLISHER PACKAGES STATUS UPDATED
          dev 4292 online 2012-10-17T10:20:14.969619Z


          On prod-server only the prod repo:

          root@prod-server:/# pkg publisher
          PUBLISHER TYPE STATUS URI
          prod origin online http://192.168.2.100/

          root@prod-server:~# pkgrepo info -s http://192.168.2.100/
          PUBLISHER PACKAGES STATUS UPDATED
          prod 4292 online 2012-10-17T10:16:06.384247Z


          On dev-server only the dev repo:

          root@dev-server:/# pkg publisher
          PUBLISHER TYPE STATUS URI
          dev origin online http://192.168.2.100:81/

          root@dev-server:~# pkgrepo info -s http://192.168.2.100:81/
          PUBLISHER PACKAGES STATUS UPDATED
          dev 4292 online 2012-10-17T10:20:14.969619Z

          I've read a lot of documentation but I'm not able to implement this.
          One repo is not a problem, but two repos in parallel!

          Regards,
          Heinz
          • 2. Re: Problems with creating 2nd repository
            Alan.S-Oracle
            921905 wrote:
            With firefox I can access http://192.168.2.100:81/ but no packages are shown.
            Do you mean that it shows the browser interface, but shows 0 packages? It may be that you just need to rebuild your catalog. Try:

            pkgrepo -s <local path to repo> rebuild

            -- Alan
            • 3. Re: Problems with creating 2nd repository
              924908
              Yes,

              exactly.

              When I query the repositories on the repo-server I see:

              root@repo-server:~# pkg publisher
              PUBLISHER TYPE STATUS URI
              solaris origin online http://192.168.2.100/
              dev origin online http://192.168.2.100:81/


              root@repo-server:~# pkgrepo info -s http://192.168.2.100/
              PUBLISHER PACKAGES STATUS UPDATED
              solaris 4292 online 2012-10-16T10:10:13.790896Z

              root@repo-server:~# pkgrepo info -s http://192.168.2.100:81/
              PUBLISHER PACKAGES STATUS UPDATED
              solaris 4292 online 2012-10-17T10:16:06.384247Z
              dev 0 online 2012-10-17T10:20:14.969619Z

              The same on the the other servers prod-server and dev-server even with Firefox.
              When I query the repository http://192.168.2.100:81/ with Firefox I only see the dev
              repository with 0 packages.

              What's not clear to me is, when I query my 2nd repository http://192.168.2.100:81/
              I see a solaris publisher ( but not the same as in http://192.168.2.100/ ) with 4292 packages
              and a dev repository with 0 packages!! Perhaps I have to move the packages from solaris ( at http://192.168.2.100:81/ ) to dev
              and after that I have to delete the solaris publisher ( at http://192.168.2.100:81/ )??
              I don't know, I'm puzzled!!

              Here is what the directory of the dev repository looks like:

              root@repo-server:/DEVpool/repo/publisher# ls -l
              total 6
              drwxr-xr-x 5 root root 5 Oct 17 12:22 dev
              drwxr-xr-x 8 root root 8 Oct 17 12:22 solaris

              Regards,
              Heinz
              • 4. Re: Problems with creating 2nd repository
                Swalker-Oracle
                The browser user interface for the package repository doesn't currently support showing packages for multiple publishers at the same time and it won't show you the names of all the publishers that have packages.

                If you want to see the packages for a specific publisher, you need to specify the name of the publisher in the URL like this:

                http://192.168.2.100:81/solaris
                http://192.168.2.100:81/dev

                If you want to change the default publisher for the repository (the one that is shown when you visit http://192.168.2.100:81) then you can do so with pkgrepo like this:

                pkgrpeo -s /path/to/repository set publisher/prefix=dev

                ...or:

                pkgrpeo -s /path/to/repository set publisher/prefix=solaris

                The pkg(5) utilities all automatically deal with this (such as pkg(1)). When you specify a repository that contains multiple publishers it will add all of them automatically or prompt you to select one. The web interface does not yet do this.