Quantcast
Channel: Oracle Bloggers
Viewing all articles
Browse latest Browse all 19780

A plugable Solaris IPS repo

$
0
0

The problem:

Many of the nice features of Solaris 11, like Zones, IPS updates, resources management applied to zones, that we would like to demo, most of the time, require a working IPS repository. Many people are also using Virtual Box to do such demo. The problem is that you either need a fast Internet connexion while running your demo (rarely the case), or you need a big Virtual Machine where you have setup a local IPS repository (which is not so easy), so I'm proposing a kind of mix of the two.

Repo on an SD card:

The idea is to have an SD card that we will used, on a baremetal solaris 11 machine, to create a zfs pool (called here sdpool): we will copy all the files from a repo ISO image to the SD card, and then make this device available to VirtualBox through the shared folder features, available in Virtual Box.

  1. Insert the SD card (16GB is OK) in your Solaris laptop. I use, from the Solaris  System tools, the GParted Partition Editor to erase any existing partition, and I write down the device name of my SD card, in this particular context /dev/dsk/c9t0d0p0

  2. Create a zfs pool called here sdpool with this unique SD card: # zpool create sdpool /dev/dsk/c9t0d0p0
  3. Let's create a file system for this IPS repository  # zfs create sdpool/repoS11dot1
  4. As the SD card is a slow device, we will activate compression # zfs set compression=on sdpool/repoS11dot1
  5. and we will also remove any access time updates after each read operation # zfs set atime=off sdpool/repoS11dot1
  6. Download the Solaris 11 iso repo Image and make it available on /sol-11_1-repo-full.iso
  7. Mount the iso image with # mount -F hsfs /sol-11_1-repo-full.iso /mnt
  8. Copy all the packages images on the sdcard with # cd /mnt/repo; tar cf - . | (cd /sdpool/repoS11dot1; tar xfp -)
  9. Check with: # df -k /sdpool/repoSol11dot1
  10. The used capacity can be checked (approx. 6GB) with # zfs list

So now:

Now that we do have a repo on an SD card, you can:

  • zfs export / zfs import to make it available on any other latops, by physically moving the SD card
  • you can use the "shared folders" setting of any Solaris 11 VBox Virtual Machine, to automatically mount the SD card and configure inside the VM an IPS repository pointing to it. If you activate the "shared folders" and allow automount, you will have access to the content of your SD card (repository packages) from the automounted /mnt/sf_repoS11dot1. The good thing is that your Virtual machine is not containing the 6GB of packages, but is accessing to it through the SD card on the host.
  • Modify once the repo on the SD, and make it available to any VM through the "shared folders".



Viewing all articles
Browse latest Browse all 19780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>