solaris 11 ディープダイブセミナー automatic installer編

75
1 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Upload: solarisjp

Post on 01-Dec-2014

2.131 views

Category:

Documents


4 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Solaris 11 ディープダイブセミナー Automatic Installer編

1 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Page 2: Solaris 11 ディープダイブセミナー Automatic Installer編

2 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

“hands-free” インストールを実現する

Automated Installer

システム事業統括 ソリューション統括本部 パートナーソリューション本部

シニア・セールス・コンサルタント 黒田 俊介

2012 年 2 月 20 日

Page 3: Solaris 11 ディープダイブセミナー Automatic Installer編

3 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

以下の事項は、弊社の一般的な製品の方向性に関する概要を説明するものです。また、情報提供を唯一の目的とするものであり、いかなる契約にも組み込むことはできません。以下の事項は、マテリアルやコード、機能を提供することをコミットメント(確約)するものではないため、購買決定を行う際の判断材料になさらないで下さい。オラクル製品に関して記載されている機能の開発、リリースおよび時期については、弊社の裁量により決定されます。

OracleとJavaは、Oracle Corporation 及びその子会社、関連会社の米国及びその他の国における登録商標です。

文中の社名、商品名等は各社の商標または登録商標である場合があります。

Page 4: Solaris 11 ディープダイブセミナー Automatic Installer編

4 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Agenda

• Automated Installer (AI)

• AI マニフェスト

カスタム AI マニフェスト

派生マニフェスト

• SC プロファイル

• 条件マニフェスト

• ゾーンのインストール

• Appendix

Page 5: Solaris 11 ディープダイブセミナー Automatic Installer編

5 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Cloud

Oracle Solaris 11

様々な基盤を支える Oracle Solaris 11

Physical

Storage Pools

Virtual Switch

Virtual NIC

OVM for SPARC Solaris Zones

Virtual

Storage

Virtual

Networking

Virtual Servers

Page 6: Solaris 11 ディープダイブセミナー Automatic Installer編

6 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

システム管理をよりシンプルに

Active

BE

Active BE

New BE Old BE

Updated BE

AI Server

DHCP

Server

Net config

AI address

Automated Installer による迅速なデプロイ

Zone による迅速な開発、テスト

BE および IPS による迅速なアップデート

Oracle Solaris 11

Page 7: Solaris 11 ディープダイブセミナー Automatic Installer編

7 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

選択可能なインストール方法

Packaging System Image Packaging System (IPS),

IPS Repository, IPS Package

Upgrade Boot Environment

Install Live Media, Text Installer,

Automated Installer

Page 8: Solaris 11 ディープダイブセミナー Automatic Installer編

8 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Automated Installer の必要性

インストール媒体による設定項目の違い カスタマイズ可能な設定の必要性

膨大なシステムへのインストール対応 ネットワークベースのインストール手法の確立

クラウド基盤となるインストーラの提供 Custom Jumpstart に代わる仕組みの必然性

Page 9: Solaris 11 ディープダイブセミナー Automatic Installer編

9 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Automated Installer の必要性 インストール媒体による設定項目の違い

Live Media Text Installer

インストールディスク選択 ● ●

ホスト名 ● ●

IP アドレス ●

ネットマスク ●

デフォルトルータ ●

ネームサービス ●

タイムゾーン ● ●

root パスワード - ●

ユーザアカウント ● ●

Page 10: Solaris 11 ディープダイブセミナー Automatic Installer編

10 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Automated Installer の必要性 インストール媒体による設定項目の違い (続き)

Live Media Text Installer Solaris 10

インストールディスク選択 ● ● ●

ホスト名 ● ● ●

IP アドレス ● ●

ネットマスク ● ●

デフォルトルータ ● ●

ネームサービス ● ●

タイムゾーン ● ● ●

root パスワード - ● ●

ユーザアカウント ● ● -

swap, dump サイズ指定 - ●

OS ミラー - ●

パッケージクラスタの選択 - ●

Page 11: Solaris 11 ディープダイブセミナー Automatic Installer編

11 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Automated Installer の必要性

インストール媒体による設定項目の違い きめ細やかな設定項目の必要性

膨大なシステムへのインストール対応 ネットワークベースのインストール手法の確立

クラウド基盤となるインストーラの提供 Custom Jumpstart に代わる仕組みの必然性

Page 12: Solaris 11 ディープダイブセミナー Automatic Installer編

12 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Automated Installer の必要性

• メディアによるインストールの限界

ネットワークベースのインストール

• 用途に応じた OS イメージの必要性

システム環境 (Physical, Virtual)

パッケージクラスタ

膨大なシステムへのインストール対応

Page 13: Solaris 11 ディープダイブセミナー Automatic Installer編

13 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Automated Installer の必要性

インストール媒体による設定項目の違い きめ細やかな設定項目の必要性

膨大なシステムへのインストール対応 ネットワークベースのインストール手法の確立

クラウド基盤となるインストーラの提供 Custom Jumpstart に代わる仕組みの必然性

Page 14: Solaris 11 ディープダイブセミナー Automatic Installer編

14 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Automated Installer の必要性 クラウド基盤となるインストーラの提供

Page 15: Solaris 11 ディープダイブセミナー Automatic Installer編

15 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Automated Installer (AI)

Page 16: Solaris 11 ディープダイブセミナー Automatic Installer編

16 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Automated Installer インストールの仕組み

IPS Repo AI Server

DHCP

AI Client

1. PXE/WAN boot

2. IP address, AI server

3. Boot file 4. AI manifest 6. SC profile

5. Package install

Page 17: Solaris 11 ディープダイブセミナー Automatic Installer編

17 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

AI サーバ 構成要素

AI Server AI Install Tool (installadm)

Install Service A

AI

Manifest

Install Service B

AI

Manifest

SC

Profile

DHCP Service

AI サーバとの共存

もしくは独立した構成が可能

AI クライアントに

提供するインストールサービス

Automated Installer

の基盤となるツール

SC

Profile

AI クライアント用のXML 構成ファイル

Page 18: Solaris 11 ディープダイブセミナー Automatic Installer編

18 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

AI サーバ

• ハードウェア

メモリ : 最小 1GB

ディスク容量 : インストールサービスごとに 300-400MB

• ソフトウェア

Oracle Solaris 11

• 静的 IP アドレス

• デフォルトルータ

• マルチキャスト DNS (オプション)

• DHCP サービス (別マシンでも可)

IPS リポジトリへのアクセス

AI 用 ISO イメージ (オプション)

ハードウェア/ソフトウェア要件

Page 19: Solaris 11 ディープダイブセミナー Automatic Installer編

19 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

AI サーバの設定

注意事項

• マルチホーム環境で AI サーバは全てのネットワークセグメントに対してサービスを提供

svc:/system/install/server:default の以下を設定

• all_services/networks (default : 0.0.0.0/0)

• all_services/exclude_networks (default : false)

• 標準は 5555 番ポートで web サービスを起動

svc:/system/install/server:default の以下を設定

• all_services/port (default : 5555)

AI インストールツールのインストール

ポート番号の変更はサービスを作成する前に!

Terminal

root@ai[~]# pkg install install/installadm

Page 20: Solaris 11 ディープダイブセミナー Automatic Installer編

20 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

AI サーバの設定

• オプション (一部抜粋)

-n : サービス名 (default : solaris11-i386[_n]/solaris11-sparc[_n])

-s : AI イメージ (default : install-image/solaris-auto-install, FMRI/ISO)

-d : インストールサービスイメージ (default : /export/auto-install/svcname)

-a : アーキテクチャ (default : AI サーバと同じアーキテクチャ, i386/sparc)

-p : IPS リポジトリ (-s オプションで FMRI 指定時のみ有効)

-i : DHCP 開始アドレス

-c : DHCP アドレス数

インストールサービスの作成

Terminal

root@ai[~]# installadm create-service …

Page 21: Solaris 11 ディープダイブセミナー Automatic Installer編

21 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

AI サーバの設定

• 各アーキテクチャ (i386/sparc) とも最初に作成されるインストールサービスには default-arch というエイリアスが作成される

• AI クライアント起動時に特定のインストールサービスに紐づいていない場合、default-arch を利用したインストールが行われる

インストールサービスの作成 (続き)

Terminal

root@ai[~]# installadm list

Service Name Alias Of Status Arch Image Path

------------------ ---------- -------- ------ ---------------

default-i386 s11-i386 on x86 /export/auto_install/s11-i386

s11-i386 - on x86 /export/auto_install/s11-i386

Page 22: Solaris 11 ディープダイブセミナー Automatic Installer編

22 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

AI サーバの設定 インストールサービスの作成 (続き)

AI Client 2

AI Client 1 AI Server AI Install Tool (installadm)

default-i386

s11-i386

DHCP Service

orig_default orig_default

どのサービスにも紐づいて

いないクライアント

どのサービスにも紐づいて

いないクライアント

Page 23: Solaris 11 ディープダイブセミナー Automatic Installer編

23 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

AI サーバの設定

• インストールサービスの削除

• インストールサービスの名称変更

インストールサービスの管理コマンド

Terminal

root@ai[~]# installadm delete-service svcname

Terminal

root@ai[~]# installadm rename-service svcname newsvcname

Page 24: Solaris 11 ディープダイブセミナー Automatic Installer編

24 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

AI サーバの設定

• インストールサービスの設定変更

• インストールサービスの有効化

• インストールサービスの無効化

インストールサービスの管理コマンド (続き)

Terminal

root@ai[~]# installadm set-service -o aliasof=existing_svcname svcname

root@ai[~]# installadm set-service -o default-manifest=manifest_name svcname

Terminal

root@ai[~]# installadm enable svcname

Terminal

root@ai[~]# installadm disable svcname

Page 25: Solaris 11 ディープダイブセミナー Automatic Installer編

25 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

AI サーバの設定

• AI クライアントの追加

• AI クライアントの削除

AI クライアントの管理コマンド

Terminal

root@ai[~]# installadm create-client -e macaddr -n svcname

Terminal

root@ai[~]# installadm delete-client macaddr

Page 26: Solaris 11 ディープダイブセミナー Automatic Installer編

26 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

クライアントのインストール

• SMF の設定 (オプション)

• インストールサービスの作成

デフォルトサービスによるインストール

Terminal

root@ai[~]# svccfg –s install/server:default setprop all_services/networks = 192.168.1.0/24

root@ai[~]# svcadm refresh install/server:default

Terminal

root@ai[~]# installadm create-service -i 192.168.1.100 -c 10 -p solaris=http://192.168.1.1 -y

Page 27: Solaris 11 ディープダイブセミナー Automatic Installer編

27 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

クライアントのインストール デフォルトサービスで何が設定できたのか?

Live Media Text Installer Automated Installer

インストールディスク選択 ● ●

ホスト名 ● ●

IP アドレス

-

ネットマスク ●

デフォルトルータ ●

ネームサービス ●

タイムゾーン ● ●

root パスワード ●

ユーザアカウント ● ●

swap, dump サイズ指定 -

OS ミラー -

パッケージクラスタの選択 -

Page 28: Solaris 11 ディープダイブセミナー Automatic Installer編

28 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

AI マニフェスト

Page 29: Solaris 11 ディープダイブセミナー Automatic Installer編

29 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト

• クライアントにカスタマイズされた AI マニフェスト

• XML 形式のシステム構成情報ファイル

DTD (Document Type Definition) ファイル

• /usr/share/install/*.dtd.1

サンプル AI マニフェスト

• /usr/share/auto_install/manifest/*.xml

• AI クライアントに対して主に以下を設定

インストール先のディスク

ディスク構成 (パーティション, ミラー有無など)

ソフトウェアパッケージ

Page 30: Solaris 11 ディープダイブセミナー Automatic Installer編

30 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト

AI Client 2

AI Client 1 AI Server AI Install Tool (installadm)

default-i386

demo

DHCP Service

orig_default orig_default demo_custom

どのサービスにも紐づいて

いないクライアント

demo サービスに紐づいた

クライアント

Page 31: Solaris 11 ディープダイブセミナー Automatic Installer編

31 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト

• デフォルトで利用される AI マニフェストは以下のディレクトリに配置

/var/ai/service/svcname/AI_data/orig_default

AI マニフェストの確認

<auto_install>

<ai_instance name=“orig_default">

</ai_instance>

</auto_install>

Terminal

root@ai[~]# installadm list –m

Service Name Manifest Status

------------------ ----------- --------

default-i386 orig_default Default

s11-i386 orig_default Default

Page 32: Solaris 11 ディープダイブセミナー Automatic Installer編

32 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト

• 特定のインストールサービスの AI マニフェスト

AI マニフェストの確認 (続き)

Terminal

root@ai[~]# installadm list -n s11-i386 -m

Manifest Status Criteria

----------- -------- ---------

orig_default Default None

Page 33: Solaris 11 ディープダイブセミナー Automatic Installer編

33 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト

• AI マニフェストの登録

• AI マニフェストのアップデート

AI マニフェストの管理コマンド

Terminal

root@ai[~]# installadm create-manifest -n svcname -f manifest_file

Terminal

root@ai[~]# installadm update-manifest -n svcname -f manifest_file

Page 34: Solaris 11 ディープダイブセミナー Automatic Installer編

34 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト

• AI マニフェストの削除

• AI マニフェストのエクスポート

AI マニフェストの管理コマンド (続き)

Terminal

root@ai[~]# installadm export -n svcname -m manifest_name

Terminal

root@ai[~]# installadm delete-manifest -n svcname -m manifest_name

Page 35: Solaris 11 ディープダイブセミナー Automatic Installer編

35 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト AI マニフェストの構造

Terminal

root@ai[~]# installadm export -n default-i386-m orig_default

<auto_install>

<ai_instance name=“orig_default">

<target>

</target>

<software type=“IPS”>

</software>

</ai_instance>

</auto_install>

インストール対象 (ディスク, レイアウト) に関する情報

ソフトウェアパッケージに関する情報

Page 36: Solaris 11 ディープダイブセミナー Automatic Installer編

36 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト AI マニフェストの構造

Element Tree

auto_install ai_instance boot_modes?

target?

software+

add_drivers? software*

search_all? source?

configuration*

source*

Element Attribute Value

ai_instance name CDATA #IMPLIED

http_proxy CDATA #IMPLIED

auto_reboot true | false

Page 37: Solaris 11 ディープダイブセミナー Automatic Installer編

37 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト

• rpool という名前の root pool を作成

• ブート環境 (BE) 名は solaris

• ブート環境 (BE) 外* に /export をマウントポイントとして export を作成

• export/home を作成

AI マニフェストの構造 ~ target 要素と属性

Terminal

<target>

<logical>

<zpool name="rpool" is_root="true">

<filesystem name="export" mountpoint="/export"/>

<filesystem name="export/home"/>

<be name="solaris"/>

</zpool>

</logical>

</target>

* 暗黙的に in_be=“false” が指定

xyz : 要素

xyz : 属性

Page 38: Solaris 11 ディープダイブセミナー Automatic Installer編

38 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト

AI マニフェストの構造 ~ target 要素と属性

Element Tree

target? disk* disk_name | disk_prop | disk_keyword | iscsi

partition* size?

slice*

slice* size?

logical? zpool* vdev*

filesystem* options? option+

zvol* options? option+

size

pool_options? option+

dataset_options? option+

be? options? option+

Page 39: Solaris 11 ディープダイブセミナー Automatic Installer編

39 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト AI マニフェストの構造 ~ target 要素と属性 (続き)

Element Attribute Value

disk in_zpool CDATA #IMPLIED

in_vdev CDATA #IMPLIED

whole_disk true | false

disk_name name CDATA #REQUIRED

name_type ctd | volid | devpath | devid | receptacle

Page 40: Solaris 11 ディープダイブセミナー Automatic Installer編

40 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト AI マニフェストの構造 ~ target 要素と属性 (続き)

Element Attribute Value

logical noswap true | false

nodump true | false

zpool name CDATA #REQUIRED

action create | delete | preserve | use_existing

is_root true | false

mountpoint CDATA #IMPLIED

vdev name CDATA #REQUIRED

redundancy mirror | raidz | raidz1 | raidz2 | raidz3 | spare | log | cache | logmirror | none

zvol action create | delete | preserve | use_existing

name CDATA #REQUIRED

use none | swap | dump

Page 41: Solaris 11 ディープダイブセミナー Automatic Installer編

41 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト AI マニフェストの構造 ~ software 要素と属性

<software type="IPS">

<destination>

<image>

<facet set="false">facet.locale.*</facet>

<facet set="true">facet.locale.zh_TW</facet>

</image>

</destination>

<source>

<publisher name="solaris">

<origin name="http://pkg.oracle.com/solaris/release"/>

</publisher>

</source>

<software_data action="install">

<name>pkg:/entire@latest</name>

<name>pkg:/group/system/solaris-large-server</name>

</software_data>

</software>

ロケールに関する情報

IPS リポジトリに関する情報

パッケージに関する情報

xyz : 要素

xyz : 属性

Page 42: Solaris 11 ディープダイブセミナー Automatic Installer編

42 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト AI マニフェストの構造 ~ software 要素と属性 (続き)

Element Tree

software+ destination? image | dir facet* facet, image_type,

property は image 要素にのみ適用

image_type?

property*

source* publisher+ | dir origin+ origin, mirror は

publisher 要素にのみ適用 mirror*

software_data* name*

Element Attribute Value

software name CDATA #IMPLIED

type IPS | SVR4 | CPIO | ARCHIVE | IMAGE | P5I | DU | P5P

Page 43: Solaris 11 ディープダイブセミナー Automatic Installer編

43 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

カスタム AI マニフェスト カスタム AI マニフェスト例

<target>

<disk in_vdev=“mirror_vdev” in_zpool=“rpool” whole_disk=“true”>

<disk_name name=“c3t0d0” name_type=“ctd”/>

</disk>

<disk in_vdev=“mirror_vdev” in_zpool=“rpool” whole_disk=“true”>

<disk_name name=“c3t1d0” name_type=“ctd”/>

</disk>

<logical>

<zpool name="rpool" is_root="true">

<vdev name=“mirror_vdev” redundancy=“mirror”/>

<filesystem name="export" mountpoint="/export"/>

<filesystem name="export/home"/>

<zvol name=“swap” use=“swap” action=“create”>

<size val=“1gb”/>

</zvol>

<be name="solaris"/>

</zpool>

</logical>

</target>

Page 44: Solaris 11 ディープダイブセミナー Automatic Installer編

44 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

派生マニフェスト

• カスタム AI マニフェストはあくまで決め打ちの構成

• クライアントの構成に応じて動的に AI マニフェストを生成する仕組みが必要

膨大なクライアントへの対応

AI マニフェストの削減 AI Client

AI Client

c0t0d0

c3t0d0

c3t1d0

demo

demo_derived demo_custom

Page 45: Solaris 11 ディープダイブセミナー Automatic Installer編

45 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Terminal

root@ai[~]# cat demo_derived

#!/bin/ksh93

SCRIPT_SUCCESS=0

SCRIPT_FAILURE=1

function handler {

exit $SCRIPT_FAILURE

}

trap handler ERR

/usr/bin/aimanifest load http://192.168.1.2/export/auto_install/demo/auto_install/manifest/default.xml

派生マニフェスト 派生マニフェスト例

次のページへ続く

Page 46: Solaris 11 ディープダイブセミナー Automatic Installer編

46 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

派生マニフェスト 派生マニフェスト例 (続き)

if [[ $SI_NUMDISKS -ge 2 ]] ; then

typeset -i disk_num

vdev=$(/usr/bin/aimanifest add -r target/logical/zpool[@name=rpool]/vdev@name mirror_vdev)

/usr/bin/aimanifest set ${vdev}@redundancy mirror

for ((disk_num = 1 ; disk_num <= $SI_NUMDISKS ; disk_num++)) ; do

eval curr_disk=“$”SI_DISKNAME_${disk_num}

disk=$(/usr/bin/aimanifest add -r target/disk@in_vdev mirror_vdev)

/usr/bin/aimanifest set ${disk}@in_zpool rpool

/usr/bin/aimanifest set ${disk}@whole_disk true

disk_name=$(/usr/bin/aimanifest add -r ${disk}/disk_name@name $curr_disk)

/usr/bin/aimanifest set ${disk_name}@name_type ctd

done

fi

exit $SCRIPT_SUCCESS

<disk in_vdev=“mirror_vdev” in_zpool=“rpool” whole_disk=“true”>

<disk_name name=“c3t0d0” name_type=“ctd”/>

</disk>

<vdev name=“mirror_vdev” redundancy=“mirror”/>

Page 47: Solaris 11 ディープダイブセミナー Automatic Installer編

47 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

クライアントのインストール

• 新しいインストールサービスの作成

• カスタム AI マニフェストの登録

• AI クライアントの登録

カスタム AI マニフェストによるインストール

Terminal

root@ai[~]# installadm create-service -n demo -p solaris=http://192.168.1.1 -y

Terminal

root@ai[~]# installadm create-manifest -n demo -f /root/demo_custom -d

root@ai[~]# installadm create-manifest -n demo -f /root/demo_derived

Terminal

root@ai[~]# installadm create-client -e 2:8:20:67:e8:81 -n demo

Page 48: Solaris 11 ディープダイブセミナー Automatic Installer編

48 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

クライアントのインストール カスタム AI マニフェストで何が設定できたのか?

Live Media Text Installer Automated Installer

インストールディスク選択 ● ● ●

ホスト名 ● ●

IP アドレス

-

ネットマスク ●

デフォルトルータ ●

ネームサービス ●

タイムゾーン ● ●

root パスワード ●

ユーザアカウント ● ●

swap, dump サイズ指定 - ●

OS ミラー - ●

パッケージクラスタの選択 - ●

Page 49: Solaris 11 ディープダイブセミナー Automatic Installer編

49 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

SC プロファイル

Page 50: Solaris 11 ディープダイブセミナー Automatic Installer編

50 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

SC プロファイル

• システム構成 (System Configuration) プロファイル

• XML 形式の OS 構成情報ファイル

DTD (Document Type Definition) ファイル

• /usr/share/lib/xml/dtd/service_bundle.dtd.1

• AI クライアントに対して主に以下を設定

ホスト名

ネットワーク

タイムゾーン

root パスワード

一般ユーザ

Page 51: Solaris 11 ディープダイブセミナー Automatic Installer編

51 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

SC プロファイル

• SC プロファイルの作成

• SC プロファイルの削除

SC プロファイルの管理コマンド

Terminal

root@ai[~]# installadm create-profile -n svcname -f profile_file

Terminal

root@ai[~]# installadm delete-profile -n svcname -p profile_file

Page 52: Solaris 11 ディープダイブセミナー Automatic Installer編

52 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

SC プロファイル

• SC プロファイルの一覧

• SC プロファイルのエクスポート

SC プロファイルの管理コマンド (続き)

Terminal

root@ai[~]# installadm export -n svcname -p profile_name

Terminal

root@ai[~]# installadm list -n svcname -p

Page 53: Solaris 11 ディープダイブセミナー Automatic Installer編

53 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

SC プロファイル

• sysconfig(1M) コマンドを使用

SC プロファイル (雛型) の作成

Terminal

root@ai[~]# sysconfig create-profile -o demo_profile.xml

1 2 3

Page 54: Solaris 11 ディープダイブセミナー Automatic Installer編

54 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

SC プロファイル SC プロファイル (雛型) の作成 (続き)

7 8

4 5 6

6

3

Page 55: Solaris 11 ディープダイブセミナー Automatic Installer編

55 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

クライアントのインストール

• インストールサービスの停止

• SC プロファイルの登録

• インストールサービスの開始

SC プロファイルを利用したインストール

Terminal

root@ai[~]# installadm disable demo

Terminal

root@ai[~]# installadm create-profile -n demo -f /root/demo_profile

Terminal

root@ai[~]# installadm enable demo

Page 56: Solaris 11 ディープダイブセミナー Automatic Installer編

56 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

クライアントのインストール SC プロファイルで何が設定できたのか?

Live Media Text Installer Automated Installer

インストールディスク選択 ● ● ●

ホスト名 ● ● ●

IP アドレス

-

● ●

ネットマスク ● ●

デフォルトルータ ● ●

ネームサービス ● ●

タイムゾーン ● ● ●

root パスワード ● ●

ユーザアカウント ● ● ●

swap, dump サイズ指定 - ●

OS ミラー - ●

パッケージクラスタの選択 - ●

Page 57: Solaris 11 ディープダイブセミナー Automatic Installer編

57 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

条件マニフェスト

Page 58: Solaris 11 ディープダイブセミナー Automatic Installer編

58 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

条件マニフェスト

• クライアントに対して条件付けをする仕組み

AI マニフェスト/SC プロファイルの選択

インストールサービスの削減

• Relax NG スキーマ

/usr/share/auto_install/criteria_schema.rng

• 条件付けのキーワード

arch : uname -m

cpu : uname -p

hostname* : Client hostname

ipv4 : IP address

mac : MAC address

mem : Mbyte, unbounded

network : Network segment

platform : uname -i

zonename : zoneadm list

* SC プロファイルにのみ指定可能

Page 59: Solaris 11 ディープダイブセミナー Automatic Installer編

59 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

条件マニフェスト

AI Client 2

AI Client B

AI Client 3 AI Server AI Install Tool (installadm)

default-i386

demo

DHCP Service

orig_default demo_derived demo_custom

demo サービスの demo_derived

に条件づけされたクライアント

demo サービスに紐づいた

クライアント

Page 60: Solaris 11 ディープダイブセミナー Automatic Installer編

60 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

条件マニフェスト

• 条件マニフェストの登録

コマンドによる登録

条件マニフェストの管理コマンド

Terminal

root@ai[~]# installadm set-criteria -n svcname -m manifest_file | profile_file -c criteria=value | range

Terminal

root@ai[~]# installadm create-manifest | create-profile -n svcname -f manifest_file | profile_file ¥

-c criteria=value | range

Page 61: Solaris 11 ディープダイブセミナー Automatic Installer編

61 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

条件マニフェスト

• 条件マニフェストの登録

ファイルによる登録

条件マニフェストの管理コマンド (続き)

Terminal

root@ai[~]# installadm set-criteria -n svcname -m manifest | -p profile -C criteria_manifest_file

Terminal

root@ai[~]# installadm create-manifest | create-profile -n svcname -f manifest_file | profile_file ¥

-C criteria_manifest_file

Page 62: Solaris 11 ディープダイブセミナー Automatic Installer編

62 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

条件マニフェスト

• 4GB 以上のメモリを持つシステムへの条件づけ

条件マニフェスト例

Terminal

root@ai[~]# cat demo_criteria

<ai_criteria_manifest>

<ai_criteria name=“mem”>

<range>

4096

unbounded

</range>

</ai_criteria>

</ai_criteria_manifest>

Page 63: Solaris 11 ディープダイブセミナー Automatic Installer編

63 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

クライアントのインストール

• 条件マニフェストの登録

• インストールサービスの開始

条件マニフェストを利用したインストール

Terminal

root@ai[~]# installadm create-manifest -n demo -m demo_derived -c mac=2:8:20:dc:39:9e

Terminal

root@ai[~]# installadm create-client -e 2:8:20:dc:39:9e -n demo

Page 64: Solaris 11 ディープダイブセミナー Automatic Installer編

64 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

ゾーンのインストール

Page 65: Solaris 11 ディープダイブセミナー Automatic Installer編

65 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

ゾーンのインストール

• 大域ゾーンのインストールと同時に非大域ゾーンを構築

• 必要なもの

大域ゾーン用カスタム AI マニフェスト

非大域ゾーン構成情報ファイル

• 構成ファイル (必須)

• AI マニフェスト (オプション)

• SC プロファイル (オプション)

ゾーン単体を AI でインスト

ールできる訳ではない

Page 66: Solaris 11 ディープダイブセミナー Automatic Installer編

66 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

ゾーンのインストール 大域ゾーン用カスタム AI マニフェスト

Terminal

root@ai[~]# cat zone_custom

<auto_install>

<ai_instance name=“zone_custom">

<target>

</target>

<software type=“IPS”>

</software>

<configuration type=“zone” name=“zone1” source=“http://192.168.1.2:5555/export/auto_install/zone/zone1/config”/>

</ai_instance>

</auto_install>

Page 67: Solaris 11 ディープダイブセミナー Automatic Installer編

67 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

ゾーンのインストール

• 非大域ゾーン用の構成ファイル

zonecfg -z zonename export -f config_file の出力ファイル

構成ファイル

Terminal

root@ai[~]# cat config

create –b

set zonepath=/zones/zone1

set brand=solaris

set autoboot=true

set ip-type=exclusive

add anet

set linkname=net0

set lower-link=auto

set configure-allowed-address=false

set link-protection=mac-nospoof

set mac-address=random

end

Page 68: Solaris 11 ディープダイブセミナー Automatic Installer編

68 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

ゾーンのインストール

• 非大域ゾーン用カスタム AI マニフェスト

/usr/share/auto_install/manifest/zone_default.xml

• 非大域ゾーンでは以下の要素および属性は利用不可

ai_instance 要素の auto_reboot/http_proxy 属性

target 要素の disk 子要素

logical 要素の noswap/nodump 属性

configuration 要素

• 注意事項

software 要素の type 属性は IPS のみ

構成ファイル (続き)

Page 69: Solaris 11 ディープダイブセミナー Automatic Installer編

69 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

クライアントのインストール

• 新しいインストールサービスの作成

• 大域ゾーン用カスタム AI マニフェストの登録

• 大域ゾーン用 SC プロファイルの登録

ゾーンのインストール

Terminal

root@ai[~]# installadm create-service -n zone -p solaris=http://192.168.1.1 -y

Terminal

root@ai[~]# installadm create-manifest -n zone -f /root/zone_derived -d

Terminal

root@ai[~]# installadm create-profile -n zone -f /root/zone_profile

Page 70: Solaris 11 ディープダイブセミナー Automatic Installer編

70 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

クライアントのインストール

• 非大域ゾーン用カスタム AI マニフェストの登録

• 非大域ゾーン用 SC プロファイルの登録

• AI クライアントの登録

ゾーンのインストール (続き)

Terminal

root@ai[~]# installadm create-manifest -n zone -f /root/zone1_custom -c zonename=“zone1”

Terminal

root@ai[~]# installadm create-profile -n zone -f /root/zone1_profile -c zonename=“zone1”

Terminal

root@ai[~]# installadm create-client -e 2:8:20:ea:38:d6 -n zone

Page 71: Solaris 11 ディープダイブセミナー Automatic Installer編

71 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Appendix

Page 72: Solaris 11 ディープダイブセミナー Automatic Installer編

72 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

AI Client

Virtu

alB

ox

Zo

ne

Cro

ss

bo

w

デモ環境

zone : ips

ips/n

et0

zone : ai

ai/n

et0

IPS Repository AI Server

vn

ic10

192.168.1.1 192.168.1.2

eth1 a

i/ne

t1

eth2

192.168.2.2

x86 PC vn

ic11

Page 73: Solaris 11 ディープダイブセミナー Automatic Installer編

73 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

参考 URL

• Oracle Solaris 11 Downloads http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html

• Oracle Solaris 11 Information Library (日本語) http://docs.oracle.com/cd/E26924_01/

• Oracle Solaris 11 システムのインストール http://docs.oracle.com/cd/E26924_01/pdf/E25760.pdf

• Oracle Solaris 10 Jumpstart から Oracle Solaris 11 自動インストーラへの移行 http://docs.oracle.com/cd/E26924_01/pdf/E25765.pdf

Page 74: Solaris 11 ディープダイブセミナー Automatic Installer編

74 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.

Page 75: Solaris 11 ディープダイブセミナー Automatic Installer編

75 | Copyright © 2012 Oracle and/or its affiliates. All rights reserved.