Salt Bundle
1. Salt Bundle이란 무엇입니까?
Salt 번들은 Salt Minion, Python 3, 필수 Python 모듈 및 라이브러리가 포함된 단일 바이너리 패키지입니다.
Salt 번들은 Python 3과 Salt가 실행되기 위한 모든 요구사항과 함께 제공됩니다. 따라서 Salt 번들은 클라이언트에 설치된 Python 버전을 시스템 소프트웨어로 사용하지 않습니다. 해당 Salt 버전에 대한 요구사항을 충족하지 않는 클라이언트에도 Salt 번들을 설치할 수 있습니다.
SUSE Multi-Linux Manager Salt Master가 아닌 Salt Master에 연결된 Salt Minion을 실행하는 시스템에서도 Salt 번들을 사용할 수 있습니다.
2. Client Registration With Salt Bundle as a Minion
The registration method with the Salt Bundle is the recommended registration method. This section explains the advantages and limitations of the current implementation.
The Salt Bundle is provided as the venv-salt-minion package that consists of Salt, Python 3, and the Python modules Salt depends on.
Bootstrapping with Web UI is using Salt Bundle as well, so bootstrapping with Web UI is not Python dependant. Using the Salt Bundle, it is no longer needed that the client provides any Python interpreter or modules.
새 클라이언트를 부트스트랩하는 경우 Salt Bundle에 등록하는 것이 기본 방법입니다. 기존 클라이언트를 Salt Bundle 방식으로 전환할 수 있습니다. 전환하면 salt-minion 패키지와 종속 항목이 설치된 상태로 유지됩니다.
2.1. Using the Salt Bundle With the Salt Minion
Salt 번들은 Salt와 함께 사용할 수 있습니다. 미니언이 관리하는 Salt Master 이외의 SUSE Multi-Linux Manager 서버에서 동시에 사용할 수 있습니다. Salt 번들을 클라이언트에 설치한 경우 SUSE Multi-Linux Manager 서버가 Salt 번들의 구성 파일을 관리하게 되며, 이 경우 salt-minion의 구성 파일은 관리되지 않습니다. 자세한 내용은 Salt 번들 구성에서 확인할 수 있습니다.
  | 
2.2. Switching From Salt Minion to Salt Bundle
Salt 상태 util.mgr_switch_to_venv_minion을 사용하여 salt-minion에서 venv-salt-minion으로 전환할 수 있습니다. 프로세스 이동 문제를 방지하려면 두 단계에 걸쳐 venv-salt-minion으로 전환하는 것이 좋습니다.
util.mgr_switch_to_venv_minion State to venv-salt-minion- 
우선 열을 지정하지 않고
util.mgr_switch_to_venv_minion을 적용하십시오. 그러면 구성 파일 등을 복사하는venv-salt-minion으로 전환됩니다. 원래salt-minion구성 및 해당 패키지는 정리되지 않습니다.salt <minion_id> state.apply util.mgr_switch_to_venv_minion
mgr_purge_non_venv_salt가True로 설정된util.mgr_switch_to_venv_minion을 적용하여salt-minion을 제거하고mgr_purge_non_venv_salt_files을True로 설정하여salt-minion과 관련된 모든 파일을 제거하십시오. 이 두 번째 단계는 첫 번째 단계가 처리되었는지 확인한 후 이전 구성 파일과 더 이상 사용되지 않는salt-minion패키지를 제거합니다.salt <minion_id> state.apply util.mgr_switch_to_venv_minion pillar='{"mgr_purge_non_venv_salt_files": True, "mgr_purge_non_venv_salt": True}' 
2.3. Additional Concerns
- 
In case of running the second step only and the first step, state apply process could fail as it requires stopping the
salt-minionwhich is used to execute the command on the client side. - 
It is also possible to avoid installing the Salt Bundle and keep using
salt-minioninstead. In this case, specify one of these options:- 
--no-bundle옵션으로mgr-bootstrap을 실행하십시오. - 
생성된 부트스트랩 스크립트에서
AVOID_VENV_SALT_MINION을1로 설정합니다. - 
For bootstrap state set the
mgr_avoid_venv_salt_minionpillar toTruein/srv/pillar/salt_bundle_config.sls. 
 - 
 
3. SSH Push With the Salt Bundle
Salt 번들은 클라이언트로 SSH Push 작업을 수행할 때도 사용됩니다.
셸 스크립트는 Salt 명령이 실행되기 전에 venv-salt-minion을 설치하지 않고 대상 시스템에 Salt 번들을 배포합니다. Salt 번들에는 전체 Salt 코드 베이스가 포함되어 있으므로 salt-thin은 배포되지 않습니다. SSH Push(Web UI를 사용한 부트스트랩 포함)는 번들 내의 Python 3 인터프리터를 사용합니다. 대상 시스템에는 다른 Python 인터프리터가 설치되어 있지 않아도 됩니다.
번들과 함께 배포된 Python 3은 클라이언트에서 SSH Push 세션을 처리하는 데 사용되므로 SSH Push(Web UI를 사용한 부트스트랩 포함)는 시스템에 설치된 Python에 종속되지 않습니다.
다른 방법으로 salt-thin을 사용할 수 있지만, 클라이언트에 Python 3이 설치되어 있어야 합니다. 이 방법은 권장되거나 지원되지 않으며 개발 목적으로만 존재합니다. web.ssh_use_salt_thin을 /etc/rhn/rhn.conf 구성 파일에서 true로 설정합니다.
  | 
4. Extend Salt Bundle With Python Packages using pip
Salt 번들에는 pip이 포함되어 있어 번들된 Salt 미니언의 기능을 추가 Python 패키지로 확장할 수 있습니다.
기본적으로 salt <minion_id> pip.install <package-name> 은 <package_name>에 의해 지정된 Python 패키지를 /var/lib/venv-salt-minion/local에 설치합니다.
| 
 필요한 경우  [Service] Environment=VENV_PIP_TARGET=/new/path/local/venv-salt-minion/pip  | 
| 
 
  |