Home No-Network needed OpenSolaris Live-CD IPS REPO full mirror
Čtvrtek IV 16, 2009
One time my child was sick I need to work from home for longer time, unfortunately I was in this time assigned to project required a IPS repository access. My network a home is not enough stable to use IPS remote mirror, so I as workaround use this script to create:
Home No-Network needed OpenSolaris Live-CD IPS REPO full mirror
I think you can find this approach and script helpful in home Virtual Appliances prototyping.I customize direct mirror script , see IPS repo mirror script (attached) by Andrzej Szeszo , local copy ips-mirror.sh
There can be also used pkgrecv/pkgsend approach, but this will for no not perverse time stamps, so will not be able to get SAME FMRIs. See for example Building a custom OpenSolaris LiveCD (attached) in Kohsuke Kawaguchi blog
Update: This issue with new timestamps was reported as 6356 PKGsend mut allow to specify FMRI (timestamp) so we can clone package and is fixed in iPKG relesed as part of DEV builds for OpenSolaris 200102 release.
1. Use OS1108-repo.sh script to get needed 555+1 OpenSolaris 200811 IPS packages.
- Create a ZFS poo for IPS datazfs create rpool/export/ips
- Run the OS1108-repo.sh script
2. Check size for downloaded repo
df -h
Filesystem Size Used Avail Use% Mounted on
rpool/ROOT/opensolaris
19G 662M 18G 4% /
swap 661M 224K 661M 1% /etc/svc/volatile
/usr/lib/libc/libc_hwcap1.so.1
19G 662M 18G 4% /lib/libc.so.1
swap 662M 1.5M 661M 1% /tmp
swap 661M 32K 661M 1% /var/run
rpool/export 18G 276M 18G 2% /export
rpool/export/home 18G 19K 18G 1% /export/home
rpool/export/home/osol
18G 24K 18G 1% /export/home/osol
rpool 18G 72K 18G 1% /rpool
zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 1.92G 17.6G 72K /rpool
rpool/ROOT 661M 17.6G 18K legacy
rpool/ROOT/opensolaris 661M 17.6G 661M /
rpool/dump 512M 17.6G 512M -
rpool/export 276M 17.6G 276M /export
rpool/export/home 42.5K 17.6G 19K /export/home
rpool/export/home/osol 23.5K 17.6G 23.5K /export/home/osol
rpool/swap 512M 18.1G 16K -
Start local IPS repo on port 80 with SMF service
ls /export/ips/opensolaris200811 file pkg svccfg -s application/pkg/server setprop pkg/port=80 svccfg -s application/pkg/server setprop pkg/inst_root=opensolaris200811 svcadm refresh application/pkg/server svcadm enable application/pkg/server tail -f /var/svc/log/application-pkg-server:default.log [13/Dec/2008:11:43:36] ENGINE Listening for SIGTERM. [13/Dec/2008:11:43:36] ENGINE Listening for SIGUSR1. [13/Dec/2008:11:43:36] ENGINE Bus STARTING [13/Dec/2008:11:43:36] ENGINE Started monitor thread '_TimeoutMonitor'. [13/Dec/2008:11:43:36] ENGINE Serving on 0.0.0.0:80 [13/Dec/2008:11:43:36] ENGINE Bus STARTED [13/Dec/2008:11:43:36] INDEX Updating search indices [13/Dec/2008:11:43:59] INDEX Search indexes updated and available. ls /export/ips/opensolaris200811 catalog file pkg search.dir search.pag trans updatelog
2. Check then repository is working
wget localhost:80 Statistics Number of packages: 556 Number of in-flight transactions: 0 Number of catalogs served: 0 Number of manifests served: 0 Number of files served: 0 Number of flists requested: 0 Number of files served by flist: 0 Number of packages renamed: 0
Tags: best_practices ips opensolaris virtualization virtual_appliances










