오후 1:56 2015-10-27
Ubuntu PPA (Personal Package Archives)?
http://deviantcj.tistory.com/24
sudo apt-add repository xx:xx 로 하거나 /etc/apt/source.list 에 아래 2 문장을 추가한다. deb http://ppa.launchpad.net/ansible/ansible/ubuntu YOUR_UBUNTU_VERSION_HERE main deb-src http://ppa.launchpad.net/ansible/ansible/ubuntu YOUR_UBUNTU_VERSION_HERE main
-E 옵션을 추가해서 proxy를 적용시킨다. sudo -E apt-add-repository ppa:ansible/ansible
에러 메시지
gpg: keyring /tmp/tmpyS_CPZ/secring.gpg' created gpg: keyring
/tmp/tmpyS_CPZ/pubring.gpg' created
gpg: requesting key 7BB9C367 from hkp server keyserver.ubuntu.com
gpgkeys: key 6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367 not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
recv failed
문제 1.
W: GPG 오류: http://nginx.org trusty Release: 다음 서명들은 공개키가 없기 때문에 인증할 수 없습니다: NO_PUBKEY ABF5BD827BD9BF62 $ gpg --keyserver keyserver.ubuntu.com --recv ABF5BD827BD9BF62
이것도 안됨
hi25shin@hi25shin-test:~$ gpg --keyserver keyserver.ubuntu.com --recv C2518248EEA14886 gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com gpgkeys: key C2518248EEA14886 not found on keyserver gpg: no valid OpenPGP data found. gpg: Total number processed: 0
해결책
- http://keyserver.ubuntu.com/ 에서 직접 찾는다. (뭔가 네트웍 문제 같은데....음..... 이 무슨 삽질인가...) url을 찾는다.
- wget -q "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x93C4A3FD7BB9C367" -O- | sudo apt-key add -
git config --global --unset http.proxy git 설정에서 http.proxy를 사용하는 것은 별로 좋지 않다. http://stackoverflow.com/questions/5102361/pull-command-error-failed-connect-to-github-com8080
hi25shin@hi25shin-test:/ansible/ansible$ debuild
The program 'debuild' is currently not installed. You can install it by typing:
sudo apt-get install devscripts
hi25shin@hi25shin-test:/ansible/ansible$ sudo apt-get install devscripts
-> 그래도 빌드 실패함
sshd 설치된 docker image 만들기
https://github.com/sullof/docker-sshd
adds/authorized_keys 수정 sudo docker inspect [container] 로 ip 찾기 접속: ssh root@ip (반드시 root로 접속 가능하다.)
위 이미지를 이용하여 sshd 5개 container를 생성
ssh1: 172.17.0.9 ssh2: 172.17.0.8 ssh3: 172.17.0.10 ssh4: 172.17.0.11 ssh5: 172.17.0.12
테스트
ansible all -m ping -u root
hi25shin@hi25shin-test:~/ansible$ ansible all -a "/bin/echo hello" -u root 172.17.0.11 | success | rc=0 >> hello
172.17.0.10 | success | rc=0 >> hello
172.17.0.12 | success | rc=0 >> hello
172.17.0.8 | success | rc=0 >> hello
172.17.0.9 | success | rc=0 >> hello
https://github.com/ansible/ansible-examples
mysql-server 동작하지 않음
sshd docker container에서 mysql-server 설치하였으나 실행할 수 없음 service mysql start -> nothing happens mysqld -> 실행되고 mysql 접속됨, 그러나 stop, restart 등을 할 수 없음
docker build 에서 mysql-server 설치 시 나타나는 오류 메시지 "invoke-rc.d: policy-rc.d denied execution of stop." ==> I think apt is messing up with you by trying to start/restart services automaticallly. Usually in the build process you dont want that. Here's an easy way to disable it http://jpetazzo.github.io/2013/10/06/policy-rc-d-do-not-start-services-automatically/
결론: ubuntu:12.04 이미지에 뭔가 mysql-server installation/run에 필요한 뭔가가 부족한 것 같음