본문 바로가기
IT/Saltstack_솔트스택

[Saltstack / 솔트스택] Saltstack 패키지 설치 튜토리얼 (CentOS7 버전)

by 무브영/movewoo0 2022. 6. 20.
728x90
반응형

안녕하세요. 이번 포스팅에서는 CentOS7 VM에 Saltstack을 설치하는 튜토리얼을 보면서 직접 따라해보는 과정을 포스팅합니다. 

 

 


 

0. Saltstack Install tutoral (CentOS7)

Saltstack은 구성요소를 설치하고 사용하는 가벼운 과정들을 Salt Project 에서 튜토리얼을 제공함으로써 쉽게 따라할 수 있게 해주고 있습니다.

 

이 튜토리얼들을 보면서 직접 따라하는 과정, 따라하면서 생긴 의문점들을 해소하는 과정을 담아보려 합니다. 

 

 

 

우선 테스트용으로 사용할 VM이 위와 같이 CentOS7.9 버전이므로 Redhat/CentOS 7 버전 기준으로 만들어진 튜토리얼을 사용합니다. 

 

 

아래의 링크로 접속하시게 되면 CentOS7 saltstack 설치 튜토리얼로 연결됩니다. 

위와 같이 여러 리눅스 버전은 물론 윈도우 환경에서도 설치가 가능하도록 튜토리얼을 지원합니다. 

 

https://repo.saltproject.io/#rhel

 

Salt Project Package Repo

Installs the latest release. Updating installs the latest release even if it is a new major version. Run the following commands to import the SaltStack repository key, and to create /etc/apt/sources.list.d/salt.list: # Download key sudo curl -fsSL -o /usr/

repo.saltproject.io

 

 


 

1. Saltstack 패키지 설치

순서에 따라서 패키지 설치를 진행합니다. 

 

1. saltstack repo 설치

sudo rpm --import https://repo.saltproject.io/py3/redhat/7/x86_64/latest/SALTSTACK-GPG-KEY.pub
curl -fsSL https://repo.saltproject.io/py3/redhat/7/x86_64/latest.repo | sudo tee /etc/yum.repos.d/salt.repo

위 명령어를 실행하면 /etc/yum.repos.d/ 디렉토리 안에 salt.repo가 생성됩니다.

 

 

2. 캐시 삭제

sudo yum clean expire-cache

 

 

3. salt 컴포넌트들 설치

sudo yum install salt-master
sudo yum install salt-minion
sudo yum install salt-ssh
sudo yum install salt-syndic
sudo yum install salt-cloud
sudo yum install salt-api

 

위와 같이 튜토리얼에서 언급하는 saltstack 사용에 필요한 컴포넌트들을 설치합니다. 

각 컴포넌트들의 역할을 salt project에서는 아래와 같이 정의합니다. 

 

https://docs.saltproject.io/en/latest/ref/cli/index.html#salt-master

 

Command Line Reference

 

docs.saltproject.io

salt-master: The master daemon controls the Salt minions
salt-minion: The Salt minion receives commands from the central Salt master and replies with the results of said commands.
salt-ssh: Salt SSH allows for salt routines to be executed using only SSH for transport
salt-syndic: The Salt syndic daemon, a special minion that passes through commands from a higher master.
salt-cloud: Salt Cloud is the system used to provision virtual machines on various public clouds via a cleanly controlled profile and mapping system.
salt-api: The Salt API system manages network api connectors for the Salt Master

 

 

4. salt-master/minion/components 활성화 

sudo systemctl enable salt-master && sudo systemctl start salt-master
sudo systemctl enable salt-minion && sudo systemctl start salt-minion
sudo systemctl enable salt-syndic && sudo systemctl start salt-syndic
sudo systemctl enable salt-api && sudo systemctl start salt-api

 

 salt의 서비스들을 enable 및 start 동작 시킵니다. 

정상적으로 기동에 성공한다면 아래와 같이 서비스가 활성화 됩니다. 

 

 

 

기본적인 컴포넌트들을 설치했으니 다음 단계는 post-installation configuration 단계로 넘어가보도록 하겠습니다. 


본 포스팅의 내용 및 이미지를 무단 전재, 재배포 또는 복사를 금지합니다.

인용 시 출처와 같이 공개해주세요!

도움이 되셨다면 댓글 또는 공감 부탁드립니다!

728x90
반응형

댓글