Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Salt-Minion

Local Repository 구성

설치

For SWAN only (conda)

  • conda에는 salt-minion만 설치합니다.

  • USB 또는 CD에 있는 conda 압축 파일을 Local 디렉토리(e.g. /root/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
  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.