Installation of Update Center 2.0 Toolkit

The Update Center project is delivering a cross-platform toolkit to enable applications to manage packaging and delivery of initial installation images, add-on components and updates using the network repository-based Image Packaging System(IPS) from the OpenSolaris project.

Here would like to provide you simple cookbook for installation of the toolkit with own local IPS repository on Solaris/x86 platform.

  1. Get the bits

    • Download IPS tools and repository package for your platform (e.g. ips-sunos-i386.zip, repo-sunos-i386.zip)3.
    • Also download a "ucbootstrap.jar" tool.
    • Unzip the IPS tools, unzip the repository packages (into a separate directory, e.g. REPOSITORY).
  2. Providing own IPS repository

    • Start the pkg.depotd server and point it to the downloaded repository by executing the command "INSTALL_HOME/pkg/bin/pkg.depotd -d INSTALL_HOME/REPOSITORY -p 10023 &".
    • If it succeds, you should be able to access result page "pkg server ok" via browser on "http://localhost:10023"
  3. Installation of Update Center 2.0 Toolkit

    • Bootstrap the UC Toolkit with command "java -jar ./pkg/lib/ucbootstrap.jar".
    • Install UC Tool GUI by executing "INSTALL_HOME/bin/pkg install updatetool".
    • GUI can be then executed by typing "INSTALL_HOME/bin/updatetool". You will see there four already installed packages. Other ones you have to either add manually following the tutorial2.
  4. Publishing own pkg

    • A very simple example of adding pkgs (deal a package which will only create directory, file and link) follows here:
      mkdir my_package
      cd my_package/
      echo "oihdasflHSDFDASF" > our_file
      cd ..
      eval $(./pkg/bin/pkgsend -s http://localhost:10023/ open mypackage@1.4-4.6)
      ./pkg/bin/pkgsend -s http://localhost:10023/ add dir mode=755 owner=jirka group=jes path=/tmp/mypackage
      ./pkg/bin/pkgsend -s http://localhost:10023/ add file my_package/our_file mode=755 owner=jirka group=jes path=/tmp/mypackage/here_is_the_file
      ./pkg/bin/pkgsend -s http://localhost:10023/ add link path=/tmp/mypackage/here_is_the_link target=/tmp/mypackage/here_is_the_file
      ./pkg/bin/pkgsend -s http://localhost:10023/ close
    • Note: "owner= group=" has to be the existing user with privileges to create a folder
    • Now you should be able to see a new package in catalogue on http://localhost:10023 and you should also be able to install and uninstall it through GUI Toolkit.
    • A workaround to get some entries also into the Update field is to create a package, install it and then publish a newer version...
    • By ./pkg/bin/pkgsend you can also add an existing solaris svr4 package. Installing scripts expect to have file "<package>/archive/none" packeg with .bz2, but in newer packages there is .7z. So the workaround is to repack it as you can see on the next screenshot.
  5. Connecting public repository

    • You can also use a public internet repository on "http://pkg.sunvirtuallab.com/" or "http://pkg.opensolaris.org/".
    • To start using it, you just need to modify the file "INSTALL_HOME/.org.opensolaris,pkg/cfg_cache".
    • You can also specify more than just one repository server to use. In the following example are set three source servers - sunvirtuallab, opensolaris and our localhost one...
    • cat .org.opensolaris,pkg/cfg_cache
      [policy]
      require-optional = False
      display-copyrights = True
      preferred-authority = sun.com
      pursue-latest = True

      [filter]

      [authority_sun.com]
      origin = http://pkg.sunvirtuallab.com/
      ssl_key = None
      prefix = sun.com
      ssl_cert = None
      mirrors = []

      [authority_localhost]
      origin = http://localhost:10023/
      ssl_key = None
      prefix = localhost
      ssl_cert = None
      mirrors = []

      [authority_opensolaris.org]
      origin = http://pkg.opensolaris.org/
      ssl_key = None
      prefix = opensolaris.org
      ssl_cert = None
      mirrors = []
    • Now you should be able to see available packages under all of the sections.

Useful resources:

  1. http://wiki.updatecenter.java.net/Wiki.jsp?page=Try
  2. http://blogs.sun.com/migi/entry/create_your_own_opensolaris_ips2
  3. http://wiki.updatecenter.java.net/Wiki.jsp?page=Download
  4. http://wiki.updatecenter.java.net/Wiki.jsp?page=UC20.Docs.DistroAssembly
  5. http://pkg.sunvirtuallab.com - repository server accessible from the internet
  6. http://pkg.opensolaris.org - repository server accessible from the internet
  7. http://wiki.glassfish.java.net/Wiki.jsp?page=GlassFishV2IPSPackages#update
Comments:

I tried it and it really works! Thanks guys.

Posted by Petr Tomasek on August 12, 2008 at 11:47 AM CEST #

Here is what is displayed when I launched my IPS repositary:
rhone [/export/UC_ms13/own] # ./pkg/bin/pkg.depotd -d /export/UC_ms13/own/repositary/ -p 10033
[15/Aug/2008:16:01:56] HTTP Serving HTTP on http://0.0.0.0:10033/

I was confused about it, so that's why I put a comment here: the fact that it displays http://0.0.0.0:10033/ does not matter, it was still accessible via http://rhone.czech.sun.com:10033/.

Posted by Pierrot on August 15, 2008 at 09:27 AM CEST #

Note: when running the repository you must use an absolute path otherwise you will get an error like this: "ValueError: 'UC/REPO/pkg/updatetool/2.0.0%2C0-14.1116%3A20080820T192946Z' is not an absolute path."

Posted by Petr Tomasek on September 02, 2008 at 06:35 AM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Members of the EMEA Globalization Center are blogging about the products that comprise the Java Enterprise System stack.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today