자동 설치 프로파일

SUSE Multi-Linux Manager에서 설치할 클라이언트의 운영 체제에 따라 두 가지 유형의 프로파일을 사용할 수 있습니다.

  • SUSE Linux Enterprise 또는 openSUSE 클라이언트에 대해서는 AutoYaST를 사용하십시오.

  • Red Hat Enterprise Linux 클라이언트에 대해서는 Kickstart를 사용하십시오.

운영 체제가 설치되는 방법은 자동 설치 프로파일에 따라 다릅니다. 예를 들어, 설치 프로그램에 전달한 추가 커널 파라미터를 지정할 수 있습니다.

프로파일에서 가장 중요한 부분은 자동 설치 파일입니다. 수동으로 설치하는 경우 파티셔닝 및 네트워크 정보, 사용자 상세 정보와 같은 정보를 설치 프로그램에 제공해야 합니다. 자동 설치 파일은 이러한 정보를 스크립트된 형식으로 제공하는 방법입니다. 이러한 유형의 파일을 종종 답변 파일이라고도 합니다.

운영 체제가 다양한 클라이언트를 설치하려는 경우 AutoYaST 및 Kickstart 프로파일을 모두 사용할 수 있습니다.

프로파일에 포함된 자동 설치 파일에는 변수 및 코드 조각이 포함될 수 있습니다. 변수 및 코드 조각에 대한 설명은 템플릿 구문을 참조하십시오.

1. 프로파일 선언

자동 설치 파일 및 배포를 준비했으면 프로파일을 생성하여 SUSE Multi-Linux Manager 서버에서 자동 설치를 관리할 수 있습니다. 프로파일은 선택한 이 배포판을 설치하는 방법을 결정합니다. 프로파일을 만드는 한 가지 방법은 AutoYaST 또는 Kickstart 파일을 업로드하는 것입니다. 또는 Kickstart의 경우에만 Web UI 마법사를 사용할 수 있습니다.

절차: 업로드하여 자동 설치 프로파일 생성
  1. SUSE Multi-Linux Manager Web UI에서 시스템  자동 설치  프로파일로 이동합니다.

  2. Kickstart/AutoYaST 파일 업로드를 클릭합니다.

  3. In the Label field, type a name for the profile. Do not use spaces.

  4. In the Autoinstall Tree field, select the autoinstallable distribution to use for this profile.

  5. In the Virtualization Type field, select the type of virtualization to use for this profile, or select None if you do not want to use this profile to create a new virtual machine.

  6. Copy the contents of your autoinstallation file into the File Contents field, or upload the file directly using the File to Upload field.

    여기에 포함되는 세부 정보에 대한 자세한 설명은 AutoYaST 프로파일 또는 Kickstart 프로파일을 참조하십시오.

  7. 생성을 클릭하여 프로파일을 생성합니다.

절차: 마법사로 Kickstart 프로파일 생성
  1. SUSE Multi-Linux Manager Web UI에서 시스템  자동 설치  프로파일로 이동합니다.

  2. Kickstart 프로파일 생성을 클릭합니다.

  3. In the Label field, type a name for the profile. Do not use spaces.

  4. In the Base Channel field, select the base channel to use for this profile. This field is populated from the distributions available. If the base channel you need is not available, check that you have created the distribution correctly.

  5. In the Virtualization Type field, select the type of virtualization to use for this profile, or select None for no virtualization.

  6. 다음을 클릭합니다.

  7. In the Distribution File Location type the path to the installation media installed on the SUSE Multi-Linux Manager Server.

  8. 다음을 클릭합니다.

  9. 클라이언트에서 루트 사용자에게 비밀번호를 제공합니다.

  10. 완료를 클릭합니다.

  11. 새 프로파일의 상세 정보를 검토하고 필요에 따라 사용자 정의합니다.

When you are creating your autoinstallation profile, you can check Always use the newest Tree for this base channel. This setting allows SUSE Multi-Linux Manager to automatically pick the latest distribution that is associated with the specified base channel. If you add new distributions later, SUSE Multi-Linux Manager uses the most recently created or modified.

Changing the Virtualization Type usually requires changes to the profile bootloader and partition options. This can overwrite your customization. Verify new or changed settings before saving them, by navigating to the Partitioning tab.

배포판 및 프로파일의 커널 옵션은 결합되어 있습니다.

시스템  자동 설치  프로파일로 이동해 편집하려는 프로파일의 이름을 클릭하여 자동 설치 프로파일의 상세 정보 및 설정을 변경할 수 있습니다. 또는 시스템  시스템 목록으로 이동하여 프로비저닝할 클라이언트를 선택한 후 프로비저닝  자동 설치 하위 탭으로 이동합니다.

2. AutoYaST 프로파일

An AutoYaST profile consists of a Label that identifies the profile, an Autoinstall Tree that points to an autoinstallable distribution, various options, and, most importantly, an AutoYaST installation file.

AutoYaST 설치 파일은 AutoYaST 설치 프로그램에 방향을 제공하는 XML 파일입니다. AutoYaST에서는 이 파일을 "제어 파일"이라고 부릅니다. AutoYaST 설치 파일의 전체 구문은 https://doc.opensuse.org/projects/autoyast/#cha-configuration-installation-options를 참조하십시오.

SUSE provides templates of AutoYaST installation files that you can use as a starting point for your own custom files. You will find the templates at https://github.com/SUSE/manager-build-profiles in the AutoYast directory. Each of these profiles requires you to set some variables before you use it. Check the README file included with the script to determine which variables you need. For more information about using variables in AutoYaST scripts, see Variables.

제공된 AutoYaST 템플릿은 사용자 비밀번호를 설정하지 않습니다. 루트 계정 및 기타 사용자 계정과 비밀번호 또는 기타 인증 수단을 설정하는 것이 좋습니다. AutoYaST 프로파일의 사용자 계정에 대한 자세한 내용은 https://doc.opensuse.org/projects/autoyast/#Configuration-Security-users-and-groups에서 확인할 수 있습니다.

다음은 SUSE Multi-Linux Manager로 설치하기 위한 AutoYaST 설치 파일에서 가장 중요한 부분입니다.

AutoYaST에 대한 자세한 내용은 https://doc.opensuse.org/projects/autoyast/를 참조하십시오.

Salt를 기반으로 하는 AutoYaST의 최신 대안은 Yomi입니다. Yomi에 대한 자세한 내용은 Yomi를 사용하여 설치에서 확인할 수 있습니다.

3. 킥스타트 프로파일

Kickstart 프로파일은 매우 다양한 구성 옵션을 제공합니다. 이러한 프로파일을 생성하려면 해당 프로파일을 업로드하거나 전용 마법사를 사용합니다.

Kickstart 프로파일을 사용하면 파일 보관 목록을 사용할 수 있습니다. Kickstart를 사용하여 다시 설치할 클라이언트에 사용자 정의 구성 파일이 여러 개 있는 경우 해당 파일을 목록으로 저장하고 사용할 Kickstart 프로파일과 이 목록을 연결할 수 있습니다.

절차: 파일 보관 목록 생성
  1. SUSE Multi-Linux Manager Web UI에서 시스템  자동 설치  파일 보관으로 이동하여 파일 유지 목록 생성을 클릭합니다.

  2. 적절한 레이블을 입력하고 저장하려는 모든 파일 및 디렉토리의 절대 경로를 나열합니다.

  3. 목록 생성을 클릭합니다.

  4. Kickstart 프로파일에 파일 보관 목록을 포함시킵니다.

  5. 시스템  자동 설치  프로파일로 이동한 후 편집할 프로파일을 선택하고 시스템 세부 정보  파일 보관 하위 탭으로 이동하여 포함할 파일 보관 목록을 선택합니다.

File preservation lists are limited to a total size of 1 MB. Special devices like /dev/hda1 and /dev/sda1 cannot be preserved. Only use file and directory names, you cannot use regular expression wildcards.

Kickstart에 대한 자세한 설명은 Red Hat 문서를 참조하십시오.

4. 템플릿 구문

설치 파일의 일부는 설치 중에 대체됩니다. 변수는 단일 값으로 대체되며 코드 조각은 텍스트의 전체 섹션으로 대체됩니다. 이스케이프된 기호 또는 섹션은 대체되지 않습니다.

Cheetah라는 템플릿 엔진을 사용하면 Cobbler가 해당 대체를 수행할 수 있습니다. 이 방식을 통해 각각에 대한 프로파일을 수동으로 생성할 필요 없이 대량의 시스템을 다시 설치할 수 있습니다.

You can create autoinstallation variables and code snippets within the SUSE Multi-Linux Manager Web UI. Within a profile, the Autoinstallation File tab allows you to see the result of the substitutions.

  • 변수에 대한 설명은 변수를 참조하십시오.

  • 코드 조각에 대한 설명은 코드 조각을 참조하십시오.

  • 이스케이프 기호 또는 텍스트 블록에 대한 설명은 이스케이핑을 참조하십시오.

4.1. 변수

Autoinstallation variables can be used to substitute values into Kickstart and AutoYaST profiles. To define a variable, from the profile, navigate to the Variables subtab, and create a name=value pair in the text box.

For example, you could create a variable that holds the IP address of the client, and another that holds the address of its gateway. Those variables can then be defined for all the clients installed from the same profile. To do that, add these lines to the Variables text box:

ipaddr=192.168.0.28
gateway=192.168.0.1

To use the variable, prepend a $ sign in the profile to substitute the value. For example, the network part of a Kickstart file may look like the following:

network --bootproto=static --device=eth0 --onboot=on --ip=$ipaddr \
--gateway=$gateway

The $ipaddr is resolved to 192.168.0.28, and the $gateway to 192.168.0.1.

설치 파일에서 변수는 계층 구조를 사용합니다. 시스템 변수는 프로파일 변수에 우선하고, 프로파일 변수는 배포 변수에 우선합니다.

4.2. 코드 조각

SUSE Multi-Linux Manager는 미리 정의된 다양한 코드 조각과 함께 제공됩니다. 시스템  자동 설치  자동 설치 조각으로 이동하여 기존 조각의 목록을 확인합니다.

Use a snippet by inserting the $SNIPPET() macro in your autoinstallation file. For example, in Kickstart:

$SNIPPET('spacewalk/redhat_register_using_salt')

또는 AutoYaST에서는 다음과 같습니다.

<init-scripts config:type="list">
  $SNIPPET('spacewalk/minion_script')
</init-scripts>

매크로는 Cobbler로 구문 분석되고 코드 조각의 컨텐트로 대체됩니다. 또한 나중에 자동 설치 파일에서 사용할 자체 코드 조각을 저장할 수 있습니다. 조각 생성을 클릭하여 새 코드 조각을 생성하십시오.

다음 예에서는 일반 하드 드라이브 파티션 구성에 대한 Kickstart 코드 조각을 다음과 같이 설정합니다.

clearpart --all
part /boot --fstype ext3 --size=150 --asprimary
part / --fstype ext3 --size=40000 --asprimary
part swap --recommended

part pv.00 --size=1 --grow

volgroup vg00 pv.00
logvol /var --name=var vgname=vg00 --fstype ext3 --size=5000

예를 들어, 다음과 같이 코드 조각을 사용합니다.

$SNIPPET('my_partition')

4.3. 이스케이핑

If the autoinstallation file contains shell script variables like $(example), the content needs to be escaped with a backslash: \$(example). Escaping the $ symbol prevents the templating engine from evaluating the symbol as an internal variable.

Text blocks such as code fragments or scripts can be escaped by wrapping them with the \#raw and \#end raw directives. For example:

#raw
#!/bin/bash
for i in {0..2}; do
echo "$i - Hello World!"
done
#end raw

Any line with a # symbol followed by a whitespace is treated as a comment and is therefore not evaluated. For example:

# 특정 섹션 시작(주석임)
echo "Hello, world"
# 특정 섹션 종료(주석임)