Powered By Blogger

2012/11/05

Solaris 11 REPO - Configuration of Multiple Repositories Using Multiple Depot Server Instances


As part of the exercise to install some virtualized highly available infrastructures using Oracle Solaris Technologies (Solaris Cluster, Solaris Zones, Solaris LDOMs…), I started by configuring and installing a Solaris 11  local IPS repository server. In this post, we’ll address the topic of installing an http shared repository for Solaris 11.1, Solaris Cluster 4.1 and EMC PowerPath.

As prerequisite for this configuration we need a working Solaris 11 System (can be either an x86-based or a SPARC-based system) with enough space available to copy the repositories (15Gb for Oracle Solaris 11.1 release repository and about 500 Mb for Oracle Solaris Cluster 4.0 and EMC PowerPath)

1.        Oracle Solaris 11.1 IPS Repository

There’s 02 ways to obtain a copy of the Oracle Solaris 11.1 IPS package repository: the first is to download the repository images files from the Oracle Solaris 11 download site and the second is to retrieve the repository directly from the Internet (using pkgrecv). We’ll go for the first method.
We’ll first create a zfs dataset for the package repository and disable the atime of this dataset (to improve performance during the update of this repo).

Then, concatenate the iso files downloaded , validate the download using digest and mount it

Synchronize the content of the repo directory by using rsync (pay attention to the / at the end of repo) and unmount the lofi device (optionally delete the iso files)


To enable clients to search for packages in the local repository, we’ll use the following command ( catalogs packages in the repository and updates search indexes).


At this stage, the repository is in place and can be used locally. But, in order to enable clients to retrieve packages in this local repository, we’ll configure an HTTP interface (also possible by using NFS Share). We’re using pkg.depotd to serve the repository to clients. Pkg.depotd (svc:/application/pkg/server) is the depot server for the image packaging system. It provides network access to the data contained within a package repository. By default, pkg.depotd listens for connections on port 80. For this Solaris Repository, we’ll use port 8080.


First of all, let’s make sure the publisher prefix is set on the ha-cluster repository:


If not, then let’s do it


To enable clients to access the local repository via HTTP, let’s configure and enable the svc:/application/pkg/server Service Management Facility (SMF) service.


Check and Browse the repository at http://<reposerver_ip_address>:8080/.



Now we can configure our repository on client system by resetting the origin for the Solaris publisher.
We first check the actual solaris publisher which is configured for the client node (by default it’s the oracle public repository).


We can reset the origin of this Solaris Publisher by running



2.       Oracle Solaris Cluster 4.1

Let’s now configure a second instance for the pkg.depotd (svc:/application/pkg/server)which will serve Oracle Solaris Cluster 4.1 Packages. The iso is downloaded from  OTN.



Again, the repository creation commands do not build a search index by default. To enable clients to search for packages in the local repository, we’ll use the following command  (catalogs packages in the repository and updates search indexes).



As described above, the repository for Solaris 11.1 is already configured using an http interface (pkg.depotd daemon handling the web service) So we’re going to serve multiple repositories using multiple pkg.depotd daemons running on different ports on the same repository server.  As we used port 8080 for Solaris 11.1 Repository, we’ll use 8081 for Solaris Cluster 4.1 Repository
Let’s make sure that the publisher prefix is set on the ha-cluster repository:



Add a new instance of the pkg/server service:


Complete configuration of the new pkg/server instance:


Start the new service:


Check and Browse the repository at http://<reposerver_ip_address>:8081/.


Configure the Solaris Cluster Repository on The client


3.       EMC PowerPath

For EMC PowerPath, the Archive was downloaded from EMC PowerLink and uncompressed.
Below are the steps to configure its repository.


To enable clients to search for packages in the local repository



As described above, the repositories for Solaris 11.1 and Solaris Cluster 4.1 are already configured using an http interface (pkg.depotd daemon handling the web service) So we’re going to add a third instance of pkg.depotd.  As we’ used port 8080 for Solaris 11.1 Repository and 8081 for Solaris Cluster 4.1, we’ll use 8082 for EMC PowerPath. Let’s check the publisher prefix of this new repository.


Add a new instance of the pkg/server service:


Complete configuration of the new pkg/server instance:


Start the new service:


Check and Browse the repository at http://<reposerver_ip_address>:8082/.


Configure the EMC PowerPath Repository on The client


Install EMC PowerPath Package




12 comments:

  1. I think Sol11 is the way forward and you'll enjoy the experience with new tech systems like T4-series!

    ReplyDelete
  2. can we add emc pkg as pkgadd in sol11. or if i copy pkg in to folder and set that folder as repository. then i can use pkg install command right ?

    ReplyDelete
    Replies
    1. Hello kprkkm, not sure that there's package for EMC. As far as i know, the simplest thing to do is to configure a local repo for PowerPath (Check the README file that's coming with PowerPath)...

      Delete
  3. thanks man ... "very usefull"

    ReplyDelete
  4. Steve well done it's been very helpful to me you can add digest -v -a md5
    /export/install/media/sol-11_1-repo-full.iso
    = be2f78ac92adc9ccafc936bcc8a74ba7 these files are huge and can get corrupted on the net.

    ReplyDelete
    Replies
    1. Hi Michael, Thanks for the suggestion, really appreciated. I've updated the related section...

      Delete
  5. Hi Steve, Thanks, very nice article and very helpfull
    In the section 2 "Oracle Solaris Cluster 4.1"
    "mount -F hsfs /dev/lofi/1 /mnt"
    must be
    "mount -F hsfs /dev/lofi/2 /mnt

    ReplyDelete
    Replies
    1. Hi, Thanks for the compliments,
      About the "mount -F hsfs /dev/lofi/1 /mnt", it all depends on the lofiadm output. You can see that in this same section, the lofi device added was /dev/lofi/1 (if another lofi is already present, output will be 2..3...)
      I guess confusion comes from the fact that i didn't document the destruction of the first lofi device (the one created in section 1).
      Anyway, to make this post more consistent, i followed your advises (and also changed the output after the lofiadm commands...)
      Thanks again,

      Delete
  6. Thanks Steve. A lot of good info on this post.

    ReplyDelete