구성 관리
각 클라이언트를 수동으로 구성하는 대신에 구성 파일 및 채널을 사용해 클라이언트에 대한 구성을 관리할 수 있습니다.
구성 파라미터는 스크립트되고 구성 파일에 저장됩니다. SUSE Multi-Linux Manager Web UI를 사용해 직접 구성 파일을 작성할 수 있습니다. 또는 다른 위치에 있는 파일을 업로드하거나 그러한 파일에 링크할 수 있습니다.
구성 채널은 구성 파일을 체계적으로 정리하는 데 사용됩니다. 클라이언트를 구성 채널에 가입하고 필요에 따라 구성 파일을 배포할 수 있습니다.
구성 파일은 버전이 관리되므로 구성 설정을 추가하고, 이를 클라이언트에서 테스트하고, 필요에 따라 이전 리비전으로 롤백할 수 있습니다. 구성 채널을 생성했다면 다양한 구성 파일 간에, 그리고 동일한 구성 파일의 리비전 간에 비교를 수행할 수도 있습니다.
Configuration files are provided through Configuration Channels or State Channels.
이 표에는 지원되는 기능이 나와 있으며, 여기서:
-
기능은 SUSE에서 지원합니다.
-
기능은 SUSE에서 지원하지 않습니다.
-
기능은 현재 지원 고려 중이며, 이후에 지원될 수도 있고 지원되지 않을 수도 있습니다.
| Feature | Status |
|---|---|
Config Channels |
|
State Channels |
|
Deploying Files |
|
Comparing Files |
|
Applying the Highstate |
|
File Import from a Client |
|
Jinja Templating |
1. Create configuration channels
1.1. Configuration channel
To create a new configuration channel:
SUSE Multi-Linux Manager Web UI에서 로 이동하여 구성 채널 생성을 클릭합니다.
채널의 이름을 입력합니다.
채널의 레이블을 입력합니다. This field must contain only letters, numbers, hyphens (
-) and underscores (_).다른 채널과 구별할 수 있게 해주는 채널 설명을 입력합니다.
구성 채널 생성을 클릭하여 새 채널을 생성합니다.
1.2. State channel
State channels use Salt states on clients:
SUSE Multi-Linux Manager Web UI에서 로 이동하여 상태 채널 생성을 클릭합니다.
채널의 이름을 입력합니다.
채널의 레이블을 입력합니다. This field must contain only letters, numbers, hyphens (
-) and underscores (_).다른 채널과 구별할 수 있게 해주는 채널 설명을 입력합니다.
Type the
SLS Contentsfor theinit.slsfile.Click Create Config State Channel to create the new channel.
2. Add configuration files, directories, or symbolic links
구성 채널을 생성했으면 이제 구성 파일, 디렉토리 또는 심볼 링크를 추가할 수 있습니다.
SUSE Multi-Linux Manager Web UI에서 로 이동하여 구성 파일을 추가하려는 구성 채널의 이름을 클릭한 후, 하위 탭으로 이동합니다.
In the
File Typefield, choose whether you want to create a text file, directory, or symbolic link.In the
Filename/Pathfield, type the absolute path to the location where the file should be deployed.If you are creating a symbolic link, type the target file and path in the
Symbolic Link Target Filename/Pathfield.Type the
User nameandGroup namefor the file in theOwnershipfield, and theFile Permissions Mode.If the client has SELinux enabled, you can configure
SELinux contextsto enable the required file attributes (for example: user, role, and file type).You can use Jinja templating with grains or pillar data instead of legacy macro delimiters.
Enter the configuration file contents in the
File Contentstext box, using the script drop-down box to choose the appropriate scripting language.구성 파일 생성을 클릭합니다.
3. Subscribe clients to configuration channels
You can subscribe individual clients to configuration channels by navigating to , selecting the client you want to subscribe, and navigating to the Configuration tab. To subscribe multiple clients to a configuration channel, you can use the system set manager (SSM).
SUSE Multi-Linux Manager Web UI에서 으로 이동하여 작업하려는 클라이언트를 선택합니다.
로 이동하여 하위 탭에서 사용 가능한 구성 채널의 목록을 확인합니다.
OPTIONAL: Click the number in the
Systems currently subscribedcolumn to see which clients are currently subscribed to the configuration channel.가입하려는 구성 채널을 확인하고 계속을 클릭합니다.
위 및 아래 방향 화살표를 사용해 구성 채널의 순위를 지정합니다. 설정이 구성 채널 간에 서로 충돌하는 경우 목록 상단에 더 가까이 있는 채널이 우선합니다.
선택한 클라이언트에 채널이 적용되는 방식을 결정합니다. 최하위 우선순위로 가입을 클릭하여 새 채널을 현재 가입된 채널보다 낮은 우선순위로 추가합니다. 최상위 우선순위로 가입을 클릭하여 새 채널을 현재 가입된 채널보다 높은 우선순위로 추가합니다. 기존 구독 대체를 클릭하여 기존 채널을 제거하고 새 채널로 교체합니다.
구독 적용을 클릭합니다.
|
새 구성 채널 우선순위가 기존 채널과 충돌하는 경우 중복 채널이 제거되고 새로운 우선순위에 따라 교체됩니다. 작업에 의해 클라이언트의 구성 우선순위가 변경되는 경우 Web UI는 작업을 진행하기 전에 이러한 변경을 확인하도록 사용자에게 요구합니다. |
4. Compare configuration files
또한 시스템 세트 관리자(SSM)를 사용해 클라이언트에 배포된 구성 파일을 SUSE Multi-Linux Manager 서버에 저장된 구성 파일과 비교할 수 있습니다.
SUSE Multi-Linux Manager Web UI에서 으로 이동하여 비교하려는 구성 파일에 가입된 클라이언트를 선택합니다.
로 이동하여 하위 탭에서 사용 가능한 구성 채널의 목록으로 이동합니다.
OPTIONAL: Click the number in the
Systemscolumn to see which clients are currently subscribed to the configuration file.비교할 구성 파일을 확인하고 파일 비교 작업 일정 잡기를 클릭합니다.
5. 클라이언트의 Jinja 템플릿
Jinja templating is possible on Salt clients. Jinja is only evaluated when content is processed by the Salt engine. Jinja provides variables from pillars or grains. They can be used in files managed by Salt (for example, via file.managed) or Salt states.
|
File configuration channels deliver static files without Jinja processing. State channel files are only applied if referenced in a Salt state. |
자세한 내용은 다음 예제와 함께 https://docs.saltproject.io/salt/user-guide/en/latest/topics/jinja.html에서 확인할 수 있습니다.
{% if grains.os_family == 'RedHat' %}
{% set dns_cfg = '/etc/named.conf' %}
{% elif grains.os_family == 'Debian' %}
{% set dns_cfg = '/etc/bind/named.conf' %}
{% else %}
{% set dns_cfg = '/etc/named.conf' %}
{% endif %}
dns_conf:
file.managed:
- name: {{ dns_cfg }}
- source: salt://dns/files/named.conf
- template: jinja