of 36 /36
IT. Menschen. Leidenschaft. Solaris 11 IPS - Erstellung und Verwaltung eigener SW-Pakete Heiko Stein Senior Architekt etomer GmbH © etomer GmbH 01.03.2012 / Folie 1

Solaris 11 IPS - Erstellung und Verwaltung eigener SW-Pakete fileIT. Menschen. Leidenschaft. • Beratungsorientiert. • Fokus auf Technik, Prozesse und Menschen. • Hochspezialisiert

Embed Size (px)

Text of Solaris 11 IPS - Erstellung und Verwaltung eigener SW-Pakete fileIT. Menschen. Leidenschaft. •...

IT. Menschen. Leidenschaft.

Solaris 11 IPS - Erstellung und Verwaltung

eigener SW-Pakete

Heiko Stein Senior Architekt

etomer GmbH

etomer GmbH 01.03.2012 / Folie 1

IT. Menschen. Leidenschaft.

Beratungsorientiert.

Fokus auf Technik, Prozesse und Menschen.

Hochspezialisiert.

Kernkompetenz auf Technologien und Prozesse im Umfeld

produktionskritischer und hochverfgbarer IT-Infrastrukturen.

Projekterfahren.

Mehr als 12 Jahre Erfahrung in Projekten bei Enterprise-Kunden

verschiedenster Branchen.

Verbindlich.

Leitbild - Zentrum unserer Aktivitten.

Wir bernehmen Verantwortung fr unsere Beratung, unser Tun und

Handeln.

Herstellerneutral.

Technologie- und herstellerbergreifende Beratung zur lsungsorientierten

Arbeit mit unseren Kunden.

etomer GmbH das ganzheitliche Systemhaus aus Berlin

etomer GmbH 13.09.2012 / Folie 2

IT. Menschen. Leidenschaft.

Motivation oder weshalb sollte man sich mit IPS

beschftigen?

Kurzeinfhrung IPS

Terminologien

Aufbau IPS Paket

Praktische Beispiele

Erstellung eines IPS Repository

Erstellung von IPS Paketen

Agenda

etomer GmbH 13.09.2012 / Folie 3

IT. Menschen. Leidenschaft.

IPS ist der neue SW-Paketierungsmechanismus in Oracle Solaris 11

Fr Virtualisierung und Automatisation ist einen versionierbarer, automatisierbarer

und sicherer Softwareverteilmechanismus unumgnglich

Integration in den mit Oracle Solaris 11 eingefhrten Installationsmechanismus AI

Erweiterung der AI-basierenden OS-Installation, um ein auf IPS basierendes

automatisiertes Customizing des Betriebssystems bereits whrend der Installation

vorzunehmen (First-Boot-Service)

Fr Entwickler zum Deployment der erstellten Software

Motivation oder weshalb sollte man sich mit IPS beschftigen?

etomer GmbH 13.09.2012 / Folie 4

IT. Menschen. Leidenschaft.

Das Image Packaging System (IPS) ist ein netzwerk-zentrisches

Paketverwaltungssystem, das Softwarepakete in Repositories bereithlt.

Diese Pakete werden mit den Paketverwaltungstools aus diesen Repository

heraus direkt installiert oder aktualisiert. (via http)

Zusammen mit IPS werden eine Reihe von Tools zur Installation, Aktualisierung,

Verwaltung und Verifikation von Paketen eingefhrt. Zur Paketverwaltung wird am

Client das pkg(1)-Tool verwendet, fr das ebenfalls GUI-Tools zur Verfgung

stehen.

Transparente Multi-Architektur Untersttzung

Web-based Installer

Kurzeinfhrung IPS (1)

etomer GmbH 13.09.2012 / Folie 5

IT. Menschen. Leidenschaft.

Kurzeinfhrung IPS (2)

etomer GmbH 13.09.2012 / Folie 6

IT. Menschen. Leidenschaft.

IPS Repository Ein Repository/Depot-Server ist eine Sammlung von IPS-Paketen

Local z.B. file://install/repo_s11u1/repo

HTTP z.B. http://192.168.56.10/

Ein physikalisches System kann ein oder mehrere Repositories enthalten

Ein Paket wird fr die Installation ausgewhlt und der aktuellste Stand dieses

Paketes (insofern nicht anders angegeben) wird aus den zur Auswahl stehenden

Repositories ausgewhlt

Terminologien (1)

etomer GmbH 13.09.2012 / Folie 7

# pkgrepo get -s /install/repo_s11u1/repo

SECTION PROPERTY VALUE

publisher prefix solaris

repository description This\ repository\ serves\ a\ copy\ of\ the\ Oracle\ Solaris\ 11.1\

Build\ 24b\ Package\ Repository.

repository name Oracle\ Solaris\ 11.1\ Build\ 24b\ Package\ Repository

repository version 4

IT. Menschen. Leidenschaft.

Publisher Ein Publisher ist eine organisatorische Einheit

(Ordnungsbegriff/Personen/Gruppen von Personen oder ein Unternehmen),

welche IPS-Pakete verffentlichen Defaultpublisher fr Solaris 11 Distribution/SRUs

http://pkg.oracle.com/solaris/release

Ein Repository kann mehrere Publisher enthalten.

Ebenso knnen mehrere Repositories denselben Publisher enthalten

Terminologien (2)

etomer GmbH 13.09.2012 / Folie 8

# pkg publisher

PUBLISHER TYPE STATUS P LOCATION

solaris origin online F file:///install/repo_s11u1/repo/

solaris origin online F http://192.168.56.10/

http://pkg.oracle.com/solaris/releasehttp://pkg.oracle.com/solaris/release

IT. Menschen. Leidenschaft.

IPS Image Ein Image ist ein Verzeichnis im System, wo Pakete und deren zugehrige

Dateien, Verzeichnisse, Links und Abhngigkeiten installiert werden knnen.

Terminologien (3)

etomer GmbH 13.09.2012 / Folie 9

Full Image (Solaris)

Zone Image

Custom Image (Applicationserver)

Custom Image (Applicationserver)

Imagetypen

Full Image (komplette Solaris Distribution)

Zones Images

Auf das Image der globalen Zone (parent

image) verlinktes Image

Custom Images, beispielsweise fr den

konsistenten Rollout eigener

Softwareumgebungen

IT. Menschen. Leidenschaft.

IPS Paket IPS verwaltet Software in konsistenten Paketen

Ein IPS-Paket ist ein Bundle aus Metadaten und installierbaren Objekten in einem

definierten Format

Ein IPS-Paket besteht aus einer Sammlung von Actions: Actions werden in dem Manifest eines Pakets beschrieben

Actions werden fr die Festlegung der Dateien und Verzeichnisse des Pakets verwendet

Actions setzten Paket Attribute

Definieren Abhngigkeiten von anderen Paketen

Erstellen Benutzer und Gruppen

Installation von Gertetreibern

Action Types file, directory, link, set, driver, depend, license, user, legacy, signature

Terminologien (4)

etomer GmbH 13.09.2012 / Folie 10

IT. Menschen. Leidenschaft.

FMRI Jedes IPS-Paket wird durch einen Fault Management Resource Identifier (FMRI)

reprsentiert. Der FMRI enthlt beschreibende Informationen ber das Paket: Publisher des Pakets

Paket Name

Versionsnummer

Release Datum

Beispiel: pkg://solaris/development/[email protected],5.11-0.175.0.0.0.0.1:20111019T082311Z

Schema pkg

Publisher solaris

Kategorie development

Name swtool

Version

Component 1.0

Build 5.11

Final 175.0.0

Creation Time(ISO-8601) 20111019T082311Z

IT. Menschen. Leidenschaft.

Aufbau IPS Paket (1)

etomer GmbH 13.09.2012 / Folie 12

Zur Erstellung eines IPS Pakets, wird

folgendes bentigt:

Paket-Quellen(Content) Verzeichnisse

Dateien

Links

Paket-Manifest (Metadaten) Lizenzinformationen

Beschreibung

Verzeichnislisten

Dateilisten

Abhngigkeiten

IT. Menschen. Leidenschaft.

Manifest Das Manifest enthlt :

Paketbeschreibung

Classification

Lizenzen

Abhngigkeiten

Aufbau IPS Paket (2)

etomer GmbH 13.09.2012 / Folie 13

# pkg contents -m zip

set name=pkg.fmri value=pkg://solaris/compress/[email protected],5.11-0.175.1.0.0.24.0:20120904T170611Z

set name=variant.arch value=i386 value=sparc

set name=org.opensolaris.consolidation value=userland

set name=pkg.description value="The Info-Zip (zip) compression utility"

dir group=sys mode=0755 owner=root path=usr

dir facet.doc.man=true group=bin mode=0755 owner=root path=usr/share/man

file 68a5dd58add08121bb69fef0f760a178631bb833 chash=32d7fb7ec1d1e9ab224eab1d2f7780fad0a5aac1

elfarch=sparc elfbits=32 elfhash=335e09b2f32b3ff1a5117bd61448423ea229406f group=bin mode=0555

owner=root path=usr/bin/zip pkg.csize=121716 pkg.size=239504 variant.arch=sparc

IT. Menschen. Leidenschaft.

Variants und Facets in IPS Paketen dienen zur Steuerung der bereits erwhnten

Actions und bestimmen, ob eine Action whrend der Installation ausgefhrt oder

unterdrckt wird.

Variants Steuerung der Installation eines Paketes unter bestimmten Bedienungen

variant.arch sparc, i386

variant.opensolaris.zone global, nonglobal

variant.debug.* true, false

Facets Mechanismus zur Steuerung optionaler Paketbestandteile (locales, man pages,

etc.) facet.locale.* true, false

facet.doc.man true, false

Aufbau IPS Paket (3)

etomer GmbH 13.09.2012 / Folie 14

IT. Menschen. Leidenschaft.

Actuators Actuators sind Tags an IPS Actions, ber die eine spezielle Handlung bei

Installation/Aktualisierung/Entfernen eines Paketes getriggert werden kann reboot-needed

SMF-Actuators

First-boot Service in AI

Postinstall Script

Dependencies Verbindliche Abhngigkeiten auf andere Pakete

Typen Require, Require-any, Conditional, Group, Optional, Origin, Incorporate, Parent, Incorporate, Exclude

Aufbau IPS Paket (4)

etomer GmbH 13.09.2012 / Folie 15

IT. Menschen. Leidenschaft.

Setup IPS Repository unter /install/repo_custom/repo

Erstellung eines IPS Repository (1)

etomer GmbH 13.09.2012 / Folie 16

# pkgrepo create /install/repo_custom/repo

# pkgrepo -s /install/repo_custom/repo add-publisher custom

# pkgrepo set -s /install/repo_custom/repo repository/description="Custom Repository

# pkgrepo set -s /install/repo_custom/repo repository/prefix="custom

# pkgrepo get -s /install/repo_custom/repo

SECTION PROPERTY VALUE

publisher prefix custom

repository description Custom\ Repository

repository prefix custom

repository version 4

IT. Menschen. Leidenschaft.

Publisher lokal an System eintragen

Erstellung eines IPS Repository (2)

etomer GmbH 13.09.2012 / Folie 17

# pkg set-publisher -g /install/repo_custom/repo custom

# pkg publisher

PUBLISHER TYPE STATUS P LOCATION

solaris origin online F file:///install/repo_s11u1/repo/

solaris origin online F http://192.168.56.10/

custom origin online F file:///install/repo_custom/repo/

# pkg publisher custom

Publisher: custom

Alias:

Origin URI: file:///install/repo_custom/repo/

SSL Key: None

SSL Cert: None

Client UUID: 7af932c6-2c28-11e2-b1d6-880027103448

Catalog Updated: November 11, 2012 05:46:51 PM

Enabled: Yes

IT. Menschen. Leidenschaft.

Funktion Installation /usr/local/bin/app1.sh

Adduser appusr + PW + Userhome

Erstellung eines IPS Packages (1) wenns mal schnell

etomer GmbH 13.09.2012 / Folie 18

# ls

add.sh app1.sh

# vi add.sh

PKG_REPO="file:///install/repo_custom/repo/"

export PKG_REPO

eval `pkgsend open [email protected],5.11-0.0.0 `

pkgsend add set name=pkg.frmi value="pkg://custom/[email protected],5.11-0.0.0 "

pkgsend add set name=pkg.description value="Full Description of app1 functionality"

pkgsend add set name=pkg.summary value=App1 package"

pkgsend add set name=variant.arch value="i386" value="sparc

pkgsend add file `pwd`/app1.sh mode=0755 owner=appusr group=other path=/usr/local/bin/app1.sh

pkgsend add dir path=export/home/appusr group=other mode=0755 owner=appusr

pkgsend add user gcos-field="App User" home-dir="/export/home/appusr" group=staff uid=1000 \

password="$5$S8iKn7gN$0y1GmzcpvLHLv65dbdB/APPsdDcTm.KhOAKM2vZeNS/" username=appusr

pkgsend close

IT. Menschen. Leidenschaft.

Einspielen der Quellen/Metadaten ins Repository

Aktualisierung IPS Cache (!)

berprfung

Erstellung eines IPS Packages (2) wenns mal schnell

etomer GmbH 13.09.2012 / Folie 19

# ./add.sh

pkg://custom/[email protected],0.5.11-0.0.0:20121112T060410Z

PUBLISHED

# pkg list -af app1

pkg list: no packages matching 'app1' known

# pkg refresh --full custom

# pkg list -af app1

NAME (PUBLISHER) VERSION IFO

app1 1.0-0.0.0 ---

# pkg info -r app1

Name: app1

Summary: App1 package

Description: Full Description of app1 functionality

...

FMRI: pkg://custom/[email protected],0.5.11-0.0.0:20121112T060410Z

IT. Menschen. Leidenschaft.

1.) Sourcetree

2.) Initiales Manifest erstellen

SMF Actuator fr trigger.xml manuell einfgen (optional)

Erstellung IPS Packages generelle Vorgehensweise(1)

etomer GmbH 13.09.2012 / Folie 20

# find app2

app2

app2/lib

app2/lib/app2.libg.so1

app2/lib/app2.lib.so1

app2/bin

app2/bin/app2.sh

# pkgsend generate app2 | pkgfmt > app2.p5m.m

# vi app2.p5m.m

dir path=opt/app2 owner=root group=bin mode=0755

dir path=opt/app2/bin owner=root group=bin mode=0755

file opt/app2/bin/app2.sh path=opt/app2/bin/app2.sh owner=root group=bin mode=0755

dir path=opt/app2/lib owner=root group=bin mode=0755

file opt/app2/lib/app2.lib.so1 path=opt/app2/lib/app2.lib.so1 owner=root group=bin mode=0644

file opt/app2/lib/app2.libg.so1 path=opt/app2/lib/app2.libg.so1 owner=root group=bin mode=0644

file trigger.xml owner=root group=bin mode=0644file var/svc/manifest/system/trigger.xml \

restart_fmri=svc:/system/manifest-import:default path=var/svc/manifest/system/trigger.xml \

owner=root group=bin mode=0644

IT. Menschen. Leidenschaft.

2.1) Erluterung SMF Actuator

restart_fmri=svc:/system/manifest-import:default

SMF Manifest

Exec-Methode

Erstellung IPS Packages generelle Vorgehensweise(1.1)

etomer GmbH 13.09.2012 / Folie 21

# cat trigger.xml

exec='/opt/app2/bin/app2.sh'

# cat app2.sh

logger -p "daemon.err" "Script via SMF-Actuator per Service svc:/system/trigger gestartet"

#

logger -p "daemon.err" "Script via SMF-Actuator per Service svc:/system/trigger beendet"

#

svccfg delete -f trigger &

IT. Menschen. Leidenschaft.

3.) Metadatenfile erzeugen

Depencies auf pkg:/custom/app1 manuell einfgen (optional)

4.) Initiales Manifest mit Metadatenfile mergen

Erstellung IPS Packages generelle Vorgehensweise(2)

etomer GmbH 13.09.2012 / Folie 22

# vi app2.mog

set name=pkg.fmri value=pkg://custom/[email protected],0.5.11-0.0.0

set name=pkg.description value="Full Description of app2 functionality"

set name=pkg.summary value=App2 package"

set name=variant.arch value="i386" value="sparc"

set name=info.classification value=org.opensolaris.category.2008:Applications/Accessories

depend fmri=pkg://custom/[email protected] type=require

# pkgmogrify app2.p5m.m app2.mog | pkgfmt > app2.p5m.mog

IT. Menschen. Leidenschaft.

5.) Packagedependencies berprfen

Automatische Erzeugung diverser Kontrollfiles

6.) Package final verifizieren

7.) Package in Repository einspielen

Erstellung IPS Packages generelle Vorgehensweise(3)

etomer GmbH 13.09.2012 / Folie 23

# pkgdepend generate -md app2 app2.p5m.mog > app2.p5m.dep

# pkgdepend resolve -m app2.p5m.dep

# ls ./app2*

./app2.mog ./app2.p5m.dep ./app2.p5m.dep.res ./app2.p5m.m ./app2.p5m.mog

./app2.p5m.ww

# pkglint app2.p5m.dep.res

# pkgsend -s /install/repo_custom/repo publish -d app2 app2.p5m.dep.res

pkg://custom/[email protected],0.5.11-0.0.0:20121112T061750Z

PUBLISHED

IT. Menschen. Leidenschaft.

Greifen die Dependencies ?

depend fmri=pkg://custom/[email protected] type=require

Hat der Actuator gegriffen ?

restart_fmri=svc:/system/manifest-import:default

Erstellung IPS Packages Funktionstest

etomer GmbH 13.09.2012 / Folie 24

# pkg list -af 'app*'

NAME (PUBLISHER) VERSION IFO

app1 1.0-0.0.0 ---

app2 1.0-0.0.0 ---

# pkg install app2

# pkg list -af 'app*'

NAME (PUBLISHER) VERSION IFO

app1 1.0-0.0.0 i--

app2 1.0-0.0.0 i--

# tail /var/adm/messages

[ID 702911 daemon.error] Script via SMF-Actuator per Service svc:/system/trigger gestartet

[ID 702911 daemon.error] Script via SMF-Actuator per Service svc:/system/trigger beendet

IT. Menschen. Leidenschaft.

Einfache Variante ber Erhhung der Versionsnummer im Manifest

name=pkg.frmi value="pkg://custom/[email protected],5.11-0.0.0

name=pkg.frmi value="pkg://custom/[email protected],5.11-0.0.0

Neu ins Manifest importieren

Update

Erstellung IPS Packages Update

etomer GmbH 13.09.2012 / Folie 25

# pkg list -af app1

NAME (PUBLISHER) VERSION IFO

app1 2.0-0.0.0 ---

app1 1.0-0.0.0 i--

# pkg install app1

# pkg list -af app1

NAME (PUBLISHER) VERSION IFO

app1 2.0-0.0.0 i--

app1 1.0-0.0.0 ---

IT. Menschen. Leidenschaft.

Hint: Reverse engineering

Erstellung IPS Packages Hints (1)

etomer GmbH 13.09.2012 / Folie 26

# pkg contents -r app2

PATH

opt/app2

opt/app2/bin

opt/app2/bin/app2.sh

opt/app2/lib

opt/app2/lib/app2.lib.so1

opt/app2/lib/app2.libg.so1

var/svc/manifest/system/trigger.xml

# pkg contents -mr app2

set name=pkg.fmri value=pkg://custom/[email protected],0.5.11-0.0.0:20121120T211200Z

set name=pkg.summary value="App2 package"

set name=pkg.description value="Full Description of app2 functionality"

set name=info.classification value=org.opensolaris.category.2008:Applications/Accessories

set name=variant.arch value=i386 value=sparc

dir group=bin mode=0755 owner=root path=opt/app2

file a061a7139a9470536cb2bf957415b91cab2c3f7b chash=d543f28bb17807cfa7a565b9a0193ba7358ab937

group=bin mode=0644 owner=root path=var/svc/manifest/system/trigger.xml pkg.csize=451

pkg.size=1092 restart_fmri=svc:/system/manifest-import:default

set name=org.opensolaris.smf.fmri value=svc:/system/trigger:default value=svc:/system/trigger

IT. Menschen. Leidenschaft.

Hint: Package in *.p5p Package Archive umwandeln

Vergleichbar mit SysV Datastream Format

Hint: *.p5p ist ein Pax-Archiv

Erstellung IPS Packages Hints (2)

etomer GmbH 13.09.2012 / Folie 27

# pkgrecv -s /install/repo_custom/repo -a -d app2.p5p app2

Retrieving packages for publisher custom ...

Retrieving and evaluating 1 package(s)...

DOWNLOAD PKGS FILES XFER (MB) SPEED

Completed 1/1 4/4 0.0/0.0 94.5k/s

ARCHIVE FILES STORE (MB)

app2.p5p 16/16 0.0/0.0

# pax -vf app2.p5p

USTAR format archive extended

-rw-r--r-- 0 root root 330 Nov 20 22:05 pkg5.index.0.gz

drwxr-xr-x 0 root root Nov 16 14:23 publisher

drwxr-xr-x 0 root root Nov 20 22:05 publisher/custom

drwxr-xr-x 0 root root Nov 20 22:05 publisher/custom/pkg

drwxr-xr-x 0 root root Nov 20 22:05 publisher/custom/pkg/app2

-rw-r--r-- 0 root root 1631 Nov 20 22:05 publisher/custom/pkg/app2/1.0%2C0.5.11-

0.0.0%3A20121120T210456Z

IT. Menschen. Leidenschaft.

Hint: Metadatenmanifest fr Gruppendependencies

Vergleichbar mit Solaris 10 Installcluster

Hint: Keine Prfung der Paket Version bei Import ins Repository (Timestamp)

Erstellung IPS Packages Hints (3)

etomer GmbH 13.09.2012 / Folie 28

# more group-app.mog

set name=pkg.fmri value=pkg://custom/group/[email protected],5.11-0.0.0

set name=pkg.summary value="App1 and App2"

set name=pkg.description value="Bundle of great applications app1 and app2"

set name=info.classification value="org.opensolaris.category.2008:Meta Packages/Group

Packages"

set name=variant.arch value=sparc value=i386

set name=variant.opensolaris.zone value=global value=nonglobal

depend fmri=/custom/[email protected] type=group

depend fmri=/custom/[email protected] type=group

# pkg list -afv app1

FMRI IFO

pkg://custom/[email protected],5.11-0.0.0:20121112T145517Z ---

pkg://custom/[email protected],5.11-0.0.0:20121112T145513Z ---

pkg://custom/[email protected],5.11-0.0.0:20121112T145509Z ---

pkg://custom/[email protected],5.11-0.0.0:20121112T145504Z ---

pkg://custom/[email protected],5.11-0.0.0:20121112T132052Z i--

IT. Menschen. Leidenschaft.

Die Einfhrung von IPS als neues Packaging Formates in Oracle Solaris 11 fhrt zu einer

neuen Form der automatisierten Installation

Mit dieser neuen Installationsmethode werden viele Mechanismen klarer strukturiert und

vereinfacht

Einfache, als auch komplexe Softwarestrukturen knnen ausgerollt werden

Zusammenfassung

etomer GmbH 13.09.2012 / Folie 29

IT. Menschen. Leidenschaft.

Application Packaging Developer's Guide

http://defect.opensolaris.org/bz/attachment.cgi?id=4607

Copying and Creating Oracle Solaris 11 Package Repositories

http://docs.oracle.com/cd/E23824_01/html/E21803/index.html

Quellen

etomer GmbH 13.09.2012 / Folie 30

http://defect.opensolaris.org/bz/attachment.cgi?id=4607http://defect.opensolaris.org/bz/attachment.cgi?id=4607http://docs.oracle.com/cd/E23824_01/html/E21803/index.htmlhttp://docs.oracle.com/cd/E23824_01/html/E21803/index.html

IT. Menschen. Leidenschaft.

Fragen? Gern.

etomer GmbH 01.03.2012 / Folie 31

IT. Menschen. Leidenschaft.

Vielen Dank fr Ihre Aufmerksamkeit. [email protected]

etomer GmbH 01.03.2012 / Folie 32

IT. Menschen. Leidenschaft.

Package Dependencies Require

verweist auf ein Package mit einer definierten Version

Require-any verweist auf ein beliebiges Package aus einer Liste von Packages

Conditional Installiert ein weiteres Package, insofern das referenzierte Package installiert ist

Group Gruppe, kann vom User berschrieben werden

Optional Optional, wird installiert wenn vorhanden

Kurzeinfhrung IPS / Anhang (1)

etomer GmbH 13.09.2012 / Folie 33

IT. Menschen. Leidenschaft.

Package Dependencies Origin

Minimalversion des zu installierenden Images

Incorporate Limitieren der Version eines referenzierten Packages

Parent Erzwingt die Installation in lokale Zone

Exclude

- Ausschluss der Installation des benannten Packages

Kurzeinfhrung IPS / Anhang (2)

etomer GmbH 13.09.2012 / Folie 34

IT. Menschen. Leidenschaft.

IPS Commands

IPS Commands

pkg(1) Use the pkg(1) command to create an image, to install packages to your image, and to manage packages on

your image.

pkgdepend(1) pkgdepend(1) is used to generate and resolve dependencies for packages. A package may depend upon

files from other packages. pkgdepend(1) is typically used in two passes :

file dependency generation

file-to-package resolution.

pkgmogrify(1) Use pkgmogrify(1) to transform the raw manifest file that had been generated with pkgdepend(1)

pkgsend(1) Use the pkgsend(1) command to publish packages from your image to an existing repository.

pkgrecv(1) Use the pkgrecv(1) command to download the contents of a package from a server. The user can use

pkgrecv(1) to automatically republish the retrieved packages to a local repository. Alternatively the user can modify the contents by adding additional package attributes and republish the package with the pkgsend(1) command.

pkgrepo(1M) Use the pkgrepo(1M) command to create and manage local repository's storage and properties.

pkg.depotd(1M) Use the pkg.depotd(1M) daemon to run your own network repository or set up mirror repositories.

Kurzeinfhrung IPS / Anhang (3)

etomer GmbH 13.09.2012 / Folie 35

IT. Menschen. Leidenschaft.

Actuators Tag applied to any action that causes a system change when that

action is installed, removed or updated

The following tags can be added to any action in a manifest:

reboot-needed

This actuator takes the value true or false. This actuator declares that installation, removal or update of the

tagged action requires a reboot when IPS is operating on a live image.

The following actuators are related to SMF services, and are the ones we will focus on in this chapter.

SMF Actuators

SMF actuators take a single SMF FMRI as a value, possibly including globbing characters to match multiple FMRIs.

If the same FMRI is tagged by multiple actions, possibly across multiple packages being operated on, IPS will only

trigger that actuator once.

The following list of SMF actuators describes the effect on the service FMRI that is the value of each named

actuator:

disable_fmri

The given service should be disabled prior to the package operation being performed

refresh_fmri

The given service should be refreshed after the package operation has completed

restart_fmri

The given service should be restarted after the package operation has completed

suspend_fmri

The given service should be temporarily suspended prior to the package operation and enabled once it has

completed

Kurzeinfhrung IPS / Anhang (4)

etomer GmbH 13.09.2012 / Folie 36