Ansible: 여러개의 리모트 머신에 일괄로 명령을 실행하기 위한 툴. 여러개의 리모트 머신들에게 SSH 세션을 열고, 명령어를 입력하는 등의 관리 과정을 코드로 자동화할 수 있음.
- Getting started
- Control node, Managed node
- Terminology
- playbook: A list of plays
- facts: data gathered about managed node
- become: privilege escalation
- become_method: sudo or su
- state: present(installed), latest, absent(removed)
- play: An ordered list of tasks
- task: A reference to a single module that defines the operations that Ansible performs.
- Inventory
- Configuration
- Playbook
1. 블록체인 노드 로그 관리
로그
작업2. 데이터 파일 백업
백업
문제해결
- 문제: Failed to connect to the host via ssh: WARNING: UNPROTECTED PRIVATE KEY FILE! : Permission denied (publickey).
- 해결
- 문제: [WARNING]: Platform linux on host BOOTNODE is using the discovered Python interpreter at /usr/bin/python3.9, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible-core/2.17/reference_appendices/interpreter_discovery.html for more
information.
- 해결
- 문제: fatal: [NODE2]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Host key verification failed.", "unreachable": true}
- 해결
- 문제: missing newline before EOF (/etc/cron.d/$FILENAME) upload failed: ./ to s3://bucketname/ Parameter validation failed: Invalid length for parameter Key, value: 0, valid min length: 1
- 해결