검색결과 리스트
CM/ansible에 해당되는 글 4건
- 2019.01.23 SBT + ANSIBLE
- 2018.10.23 Error: ✗ Could not create /var/lib/grafana/plugins/grafana-piechart-panel/.gitignore. Permission denied. Make sure you have write access to plugindir
- 2018.10.23 ansible error - may be elsewhere in the file depending on the exact syntax problem.
- 2018.07.31 ansible 주요 역할 정리
글
[ If you think that is useful, please click the finger on the bottom~^-^good~ ]
by ace-T
빌드서버에서 빌드 후 배포(배치 서버로)
build는 shell을 통해 처리 하였다. (음..뭔가 ansible style은 아니다..ㅠㅠ 책을 사서 좀 더 파봐야겠다.)
- name: Execute sbt build |
sbt.sh에서는 sbt를 통해 명령어로 처리! sbt가 export가 잘안되어서 그냥 절대경로로 처리!
/daum/program/sbt/bin/sbt clean assembly |
deploy는 간단히 copy해주는 형식으로 처리 하였다. 즉, local jar를 deploy할 서버로 카피!
|
배치 서버에서 스파크 수행
Spark Submit
'CM > ansible' 카테고리의 다른 글
글
Error: ✗ Could not create /var/lib/grafana/plugins/grafana-piechart-panel/.gitignore. Permission denied. Make sure you have write access to plugindir
[ If you think that is useful, please click the finger on the bottom~^-^good~ ]
by ace-T
ansible + grafana환경에서 아래와 같은 오류가 발생하였다.
Error: ✗ Could not create /var/lib/grafana/plugins/grafana-piechart-panel/.gitignore. Permission denied. Make sure you have write access to plugindir
NAME:
Grafana cli plugins install - install <plugin id> <plugin version (optional)>
USAGE:
Grafana cli plugins install [arguments...]
첫번째 해결책으로 아래와 같이 user: root를 통해 해결하였다.
- name: run grafana
docker_container:
name: grafana
user: root
.....
하지만 user: root 특히 root권한을 사용하는것이 review통해 지적이 나왔다.
그래서 테스트를 하다 원인을 알게 되었다. 원인은 바로 기존에 사용되어진 볼륨 이였다.
docker volume rm 볼륨이름 을 통하여 삭제 한 뒤 해보니 잘되었다.
아쉽게 재현을 다시 해보려고 하는데 잘되지 않았다..ㅠㅠ
(하도 개발서버에서 이것저것 했더니..) 정확한 원인을 찾아내기가 여간 어려운 일이 아니다..
'CM > ansible' 카테고리의 다른 글
글
ansible error - may be elsewhere in the file depending on the exact syntax problem.
[ If you think that is useful, please click the finger on the bottom~^-^good~ ]
by ace-T
may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Create a data volume
^ here
위의 오류는 ansible 버전이 낮아서 나는 오류이다.
ansible은 버전이 2.7이상이어야 docker_volume을 사용할 수가 있다.
참고 사이트 :
https://docs.ansible.com/ansible/latest/modules/docker_volume_module.html?highlight=docker_volume
'CM > ansible' 카테고리의 다른 글
글
[ If you think that is useful, please click the finger on the bottom~^-^good~ ]
by ace-T
inventory file은
리모트 서버에 대한 meta 데이터를 기술하는 파일.
기본 파일은 /etc/ansible/hosts이나 따로 inventory file을 사용할 수 있는 옵션(-i)을 줄수 있음.
alpha파일이라고 가정하고 그 안의 내용은 아래와 같다.
acet1 ansible_host=acet-dev.cc [acet] |
playbook은
ansible의 환경 설정, 배포를 가능케 함.
yaml 문법을 채용하여 정책을 기술
conditional(when), variables, loops(with_items), include, 결과 저장(register) 지원.
하나의 playbook은 하나 이상의 play를 두며 play의 목적은 여러 호스트들에 잘 정의된 role과 task를 매핑하는 역할을 맡음.
task 는
ansible module을 호출하는 단위(필수)
task 종류
1) 간단 task : name / action
- name: install git |
2) Ansible 모듈 이용 task
- copy: src=/srv/myfiles/foo.conf 블라블라
3) item을 이용한 복수 작업
- template: |
4) include - 변수 값을 지정해서 include yaml 파일로 넘길수도 있음.
- include: fluentd.yml user=www group=www |
5) when(conditional)
vsc_branch: false - include: acet-branch.yml ansible-playbook -i alpha -l acet deploy.yml -v -e "BUILD_TAG=${ACET_BUILD_TAG}" -e "acet_branch=true" |
6) event 발생(task -> handler) 예제는 pass~
role 은
structure 기본 단위로서 설치, 사용이 가능
acet dir 등 사용자가 정의하여 만들수 있다.
참고문서 : 슬라이드쉐어