Salt-Minion
Salt-Minion은 yum으로 관리 및 설치해야 하므로 Local Repository를 구성해야 합니다.
Installing Agent Node > Yum install에서 Salt-Minon을 설치합니다.
epel-release
저장소 등록 과정은 Pass합니다.
For SWAN only (conda)
conda에는 salt-minion만 설치합니다.
복사해간 conda 압축 파일 풀기
# conda 설치 경로에 압축 풀기 # '/opt/miniconda3' 폴더 자동 생성 $ tar zxvf conda.tar.gz -C / # bash에 conda 설정 $ echo ". /opt/miniconda3/etc/profile.d/conda.sh" >> ~/.bashrc $ source ~/.bashrc > /dev/null 2>&1 $ source /opt/miniconda3/etc/profile.d/conda.sh
conda 가상환경 실행합니다.
$ conda env list # conda environments: # base * /opt/miniconda3 saltenv /opt/miniconda3/envs/saltenv # saltenv 가상환경 실행 $ conda activate saltenv # create salt log $ echo "/opt/miniconda3/var/log/salt/minion { rotate 7 daily missingok dateext notifempty compress }" > /etc/logrotate.d/snet-salt
salt-minoin 실행합니다.
# create salt-minion service $ echo "[Unit] Description=The Salt Minion After=network.target [Service] KillMode=process Type=notify NotifyAccess=all LimitNOFILE=8192 ExecStart=/opt/miniconda3/envs/saltenv/bin/salt-minion -c '/opt/miniconda3/etc/salt' [Install] WantedBy=multi-user.target" > /usr/lib/systemd/system/snet-salt-minion.service # snet-salt-minion.service 등록 $ systemctl daemon-reload > /dev/null 2>&1 $ systemctl enable snet-salt-minion.service > /dev/null 2>&1 # snet-salt-minion.service 시작 $ systemctl start snet-salt-minion.service $ systemctl status snet-salt-minion.service ● snet-salt-minion.service - The Salt Minion Loaded: loaded (/usr/lib/systemd/system/snet-salt-minion.service; enabled; vendor preset: disabled) Active: active (running) since 수 2020-12-23 08:31:51 KST; 1s ago Main PID: 2568 (salt-minion) CGroup: /system.slice/snet-salt-minion.service ├─2568 /opt/miniconda3/envs/saltenv/bin/python /opt/miniconda3/envs/saltenv/bin/salt-minion -c /opt/miniconda3/etc/salt ├─2573 /opt/miniconda3/envs/saltenv/bin/python /opt/miniconda3/envs/saltenv/bin/salt-minion -c /opt/miniconda3/etc/salt └─2575 /opt/miniconda3/envs/saltenv/bin/python /opt/miniconda3/envs/saltenv/bin/salt-minion -c /opt/miniconda3/etc/salt 12월 23 08:31:51 conda systemd[1]: Starting The Salt Minion... 12월 23 08:31:51 conda systemd[1]: Started The Salt Minion. 12월 23 08:31:51 conda salt-minion[2568]: [WARNING ] /opt/miniconda3/envs/saltenv/lib/python3.7/site-packages/salt/utils/dictdiffer.py:16: DeprecationWarning: Using or importing the ABCs from 'collections' instead of fro...will stop working 12월 23 08:31:51 conda salt-minion[2568]: from collections import Mapping Hint: Some lines were ellipsized, use -l to show in full. # saltenv 가상환경 종료 (saltenv) [root@conda salt]# conda deactivate
Add Comment