DevTech101

DevTech101

Contents

How to create a local Solaris 11 Package Repository

Create a new ZFS file system within a pool

Zfs Pool

zpool list
NAME     SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
repo     136G  18.3G   118G    13%  1.00x  ONLINE  -
rpool1   136G  17.8G   118G    13%  1.00x  ONLINE  -

ZFS filesystem

zfs create -o compression=on repo/export/repo2010_11
zfs create -o compression=on repo/repo2010_11_files
 
zfs list
NAME                      USED  AVAIL  REFER  MOUNTPOINT
repo                     18.3G   116G    33K  /repo
repo/export              4.87G   116G    32K  /repo/export
repo/export/repo2010_11  4.87G   116G  4.87G  /repo/export/repo2010_11
repo/repo2010_11_files   13.4G   116G  13.4G  /repo/repo2010_11_files
...

Prepare CD images from Oracle

unzip sol-11-exp-201011-repo-full-iso-a.zip
unzip sol-11-exp-201011-repo-full-iso-b.zip
cat sol-11-exp-201011-repo-full.iso-a sol-11-exp-201011-repo-full.iso-b > \
/repo/repo2010_11_files/sol-11-exp-201011-repo-full.iso

Mount the repo CD image

lofiadm -a /repo/repo2010_11_files/sol-11-exp-201011-repo-full.iso
mount -F hsfs /dev/lofi/1 /mnt

Copy the data to the repo location

rsync -aP /mnt/repo /repo/export/repo2010_11

Set new repository settings

svccfg -s application/pkg/server setprop pkg/inst_root=/repo/export/repo2010_11/repo
svccfg -s application/pkg/server setprop pkg/readonly=true

Enable and test the repository

svcadm refresh application/pkg/server
svcadm enable application/pkg/server
  • To test the repository just go to server.doamin.com

Troubleshooting

tail -f /var/svc/log/application-pkg-server\:default.log

How to Install this Oracle Solaris 11 Support Certificate

Ganrate and Obtain from Oracle a Certificate to reach the support repository from Oracle Certificate generator
Once generated to iinstall the Oracle Solaris 11 Support Certificate follow the below steps.

mkdir -m 0755 -p /var/pkg/ssl
cp -i ~/Desktop/Oracle_Solaris_11_Express_Support.key.pem /var/pkg/ssl
cp -i ~/Desktop/Oracle_Solaris_11_Express_Support.certificate.pem /var/pkg/ssl

Add the publisher

pkg set-publisher \
-k  \
-c /var/pkg/ssl/Oracle_Solaris_11_Express_Support.certificate.pem \
-O https://pkg.oracle.com/solaris/support/ solaris

To update the Repository with the latest date

pkgrecv -s https://pkg.oracle.com/solaris/support/ -d /repo/export/repo2010_11/repo \
--key /var/pkg/ssl/Oracle_Solaris_11_Support.key.pem \
--cert  /var/pkg/ssl/Oracle_Solaris_11_Support.certificate.pem '*'

Refresh & Build a Package Index

pkgrepo refresh -s /repo/export/repo2010_11/repo

Change the client to point to the local Repository

If you want your clients to get packages from your local repository, you need to reset the origin for the solaris
publisher. Execute the following command on each client:

pkg set-publisher -G https://pkg.oracle.com/solaris/support/ \
-g http://ai.domain.com/ solaris

Configure and Install an AI server

Install the AI server

pkg install installadm

Configure the AI server

Make sure the network is fully configured

Check if the default router is set

netstat -rn

The first line in the output should read something like this:

default              10.10.10.1        UG        4      41861

To add a default router

route -p add default 10.10.10.1

Check the Netmasks table

getent netmasks 10.10.10.0

If the output is empty then create a netmask entry for all networks which will be requesting DHCP

cat >>/etc/netmasks
10.10.10.0 255.255.255.0
10.10.18.0 255.255.254.0

Add local networks to dhcp

DHCP and AI on the same server

Note: First initialize the DHCP service

mkdir /var/dhcp
dhcpconfig -D -r SUNWfiles -p /var/dhcp

Then configure DHCP

dhcpconfig -N 10.10.10.0 -m 255.255.255.0 -t 10.10.10.1
pntadm -r SUNWfiles -p /var/dhcp -A 10.10.10.105 10.10.10.0
 
dhcpconfig -N 10.10.18.0 -m 255.255.254.0 -t 10.10.18.1
pntadm -r SUNWfiles -p /var/dhcp -A 10.10.18.107 10.10.18.0
 
or
pntadm -A 10.10.10.105 -i 00144F2A942A -m 00144F2A942A \
-f "PERMANENT+MANUAL"10.10.10.0
 
pntadm -A 10.10.18.107 -i 00212810F178 -m 00212810F178 \
-f "PERMANENT+MANUAL" 10.10.18.0

Note: The Mac addresses should not include the colons and all the letters should be in uppercase.

DHCP and AI on separate servers

/usr/sbin/dhtadm -g -A -m dhcp_macro_s11-151a-sparc -d \
:Include=www23:BootSrvA=10.10.18.110:BootFile=\"http://10.10.18.110:5555/cgi-bin/wanboot-cgi\":
 
/usr/sbin/dhtadm -g -A -m 0100212810F178 -d \
:Include=www23:BootSrvA=10.10.18.110:BootFile=\"http://10.10.18.110:5555/cgi-bin/wanboot-cgi\":

Then view the client leases

dhtadm -P
pntadm -P 10.10.10.0

Create ZFS file systems

zfs create repo/aiserver/s11-151a-sparc
zfs create repo/aiserver/s11-151a-x86

Transfer the AI images

Download the AI server iso, and install it.

installadm create-service -n s11-sparc -s sol-11-1111-ai-sparc.iso /repo/aiserver/s11-sparc
installadm create-service -n s11-151a-x86 -s sol-11-1111-ai-x86.iso /repo/aiserver/s11-x86

DHCP can also be configured while creating the the service by running:

installadm create-service -n s11-sparc -s sol-11-1111-ai-sparc.iso -i 10.10.254.181 -c 10 -d /repo/aiserver/s11-sparc
installadm create-service -n s11-x86 -s sol-11-1111-ai-x86.iso -i 10.10.254.191 -c 10 -d /repo/aiserver/s11-x86

Create base custom manifest

Export the default manifest.

installadm export -n s11-x86 -m orig_default -o manifest.xml

Edit the default manifest so it points to the correct local publisher.

vi manifest.xml
 
 
  
 

Add the manifest and set it to be the default AI manifest.

installadm create-manifest -n s11-x86 -d -f ./manifest.xml -m default

Confirm the new setup.

installadm list -n s11-x86 -m
 
Manifest      Status    Criteria 
--------      ------    --------
default   Default   None
orig_default  Inactive  None

Check your AI configuration

installadm list
Service Name  Alias Of  Status  Arch   Image Path
------------  --------  ------  ----   ---------- 
default-i386  s11-x86   on      x86    /ai/x86
default-sparc s11-sparc on      Sparc  /ai/sparc
s11-sparc     -         on      Sparc  /ai/sparc
s11-x86       -         on      x86    /ai/x86

Add Client configuration

First lets create a manifest for this client

mkdir /repo/aiserver/s11-151a-sparc/auto_install/clients
cp ../default.xml client_name.xml
 
mkdir /repo/aiserver/s11-151a-x86/auto_install/clients
cp ../default.xml client_name.xml

Add the manifest to the AI server config

installadm add-manifest -m /repo/aiserver/s11-151a-sparc/auto_install/clients/ai-client.xml \
-n s11-151a-sparc -c MAC="00:14:4f:2a:94:2a"
 
installadm add-manifest -m /repo/aiserver/s11-151a-x86/auto_install/clients/ai-client.xml \
-n s11-151a-sparc -c MAC="00:14:4f:2a:94:2a"

Verify the manifest is correct

installadm list -m

Complete the client install

installadm create-client -e 00:14:4f:2a:94:2a -n s11-151a-sparc
installadm create-client -e 00:14:4f:2a:94:2a -n s11-151a-x86

Verify the config

installadm list -c
Service Name   Client Address    Arch  Image Path 
------------   --------------    ----  ---------- 
s11-151a-sparc 00:14:4F:2A:94:2A Sparc /repo/aiserver/s11-151a-sparc

Modify the client configuration





  

    
      
        
          
          
        
      
    
    
-->
   
     
       
         
           
         
      
     
   
   
      
         
           
             
           
        
      
   
    
      
        
          
        
      
      
      
        pkg:/entire
        pkg:/babel_install
        
        pkg:/network/iscsi/initiator
        pkg:/network/iscsi/iser
      
      
      
        pkg:/babel_install
        pkg:/slim_install
      
    
   
    
      
    
    
      
    
  

Boot the client

boot net:dhcp - install

Note: to view progress just login and tail the /tmp/install.conf
login: jack
password: jack

To uninstall / remove – DHCP AI server

Remove AI service

installadm delete-client 00:14:4F:2A:94:2A
 
installadm delete-service -x s11-151a-sparc
installadm delete-service -x s11-151a-x86

Note: The -x deletes the service image as well

remove DHCP config

To remove the IP address from DHCP

pntadm -D 10.10.10.105 10.10.10.0

To completely un-configure DHCP

dhcpconfig -U

Remove filesystems

zfs destroy repo/aiserver/s11-151a-sparc
zfs destroy repo/aiserver/s11-151a-x86

References

Oracle Solaris System Software Management with Image Packaging System
Solaris 11 Package Repository
AI configuration help
Yet another AI configuration help
Multi-homed AI server support
Solaris dhcp server configuration

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
%d bloggers like this: