Skip to end of metadata
Go to start of metadata

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

Compare with Current View Version History

« Previous Version 4 Next »

Conda 환경에 Salt-Minion 설치

이미 Salt Minion이 설치되어 있거나, 다른 Application의 의존성 문제가 예상될 경우를 대비하여,
Conda 가상 환경으로 Minion을 구동한다.

Download Install Script

curl -O https://github.com/snetsystems/cmp/blob/master/etc/install_conda.sh
or
wget https://github.com/snetsystems/cmp/blob/master/etc/install_conda.sh

설치방법

  • $ sh install_conda.sh -m [salt-master ip address] -i [salt-minion ID]

    • Argument

      • -m : Salt-Master의 IP address (혹은 domain)를 입력한다.

      • -i : Salt-Minion의 ID를 입력한다.

        • 입력하지 않을 경우 hostname으로 등록

      • -h : Argument의 설명

        [root@localhost ~]# sh install_conda.sh -h
        
        usage: install_conda.sh [options]
        
        Installs Miniconda3 & Salt-Minion
        
        -m          Set salt-master ip address, -m [ip address]
        -i          Set salt-minion ID (default : hostname), -i [minion id]
    • Conda 설치경로

      • 기본 설치경로 : /opt/miniconda3

      • 설치경로 변경 예제

        [root@localhost ~]# sh install_conda.sh -m 192.168.56.101 -i minion1
        
        --------------------------------------------------
        Salt-Master : 192.168.56.101
        Salt-Minion ID : minion1
        --------------------------------------------------
        
        Miniconda3 will now be installed into this location:
        /opt/miniconda3
        
          - Press ENTER to confirm the location
          - Press CTRL-C to abort the installation
          - Or specify a different location below
        
        [/opt/miniconda3] >>> "설치경로 입력 (미입력 시 기본설치 폴더에 설치)"

설치 후 확인사항

  • Minion Conifg

    [root@localhost ~]# cat /opt/miniconda3/etc/salt/minion
    # Set the location of the salt master server. If the master server cannot be
        # resolved, then the minion will fail to start.
        master: 192.168.56.101
        id: minion1
        # The directory to store the pki information in
        root_dir: /opt/conda/
        #file_roots:
        #  base:
        #    - /opt/conda/srv/salt/prod
  • 서비스 시작, 서비스 상태

    [root@localhost ~]# systemctl start snet-salt-minion
    [root@localhost ~]# systemctl status snet-salt-minion
    ● 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 Thu 2020-02-27 17:05:18 KST; 6s ago
     Main PID: 12991 (salt-minion)
       CGroup: /system.slice/snet-salt-minion.service
               ├─12991 /opt/conda/envs/saltenv/bin/python /opt/conda/envs/saltenv/bin/salt-minion -c /opt/conda/etc/salt
               ├─12996 /opt/conda/envs/saltenv/bin/python /opt/conda/envs/saltenv/bin/salt-minion -c /opt/conda/etc/salt
               └─12998 /opt/conda/envs/saltenv/bin/python /opt/conda/envs/saltenv/bin/salt-minion -c /opt/conda/etc/salt
    
    Feb 27 17:05:18 localhost.localdomain systemd[1]: Starting The Salt Minion...
    Feb 27 17:05:18 localhost.localdomain systemd[1]: Started The Salt Minion.
    Feb 27 17:05:18 localhost.localdomain salt-minion[12991]: [WARNING ] /opt/conda/envs/saltenv/lib/python3.7/site-packages/salt/utils/dictdiffer.py:16: DeprecationWarning: ...op working
    Feb 27 17:05:18 localhost.localdomain salt-minion[12991]: from collections import Mapping
    Feb 27 17:05:23 localhost.localdomain salt-minion[12991]: [ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds be...thenticate
    Hint: Some lines were ellipsized, use -l to show in full.
  • 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.