본문 바로가기

OpenStack10

[ Glance with Swift backend ] 1. cd /usr/share/diskimage-builder/elements/centos7/post-install.d 2. cat 01-enable-service #!/bin/bash systemctl enable httpd 설치 후에 systemctl enable httpd 명령어를 실행하기 위한 01-enable-service 파일 3. chmod 755 01-enable-service or chmod +x 01-enable-service 실행 파일이기 때문에 실행 권한을 부여한다. 4. export DIB_LOCAL_IMAGE=/root/centos7.qcow2 env | grep DIB 환경 변수 설정 및 확인 5. disk-image-create -a amd64 -t qcow2 -o ~/web.. 2020. 7. 7.
Image 생성 (diskimage-builder) 1. openstack image list dashboard에 centos7.qcow2 있는지 확인 2. source keystonerc_admin 쉘 환경변수를 등록해 자격증명을 할 수 있도록 제공 3. openstack image save --file test_image.qcow2 centos7 centos7을 test_image.qcow2라는 이름으로 controller에 저장. 4. yum list diskimage-builder yum install diskimage-builder.noarch package 설치 5. cd /usr/share/diskimage-builder/elements/ 이미지는 이 디렉토리안의 내용을 조합해서 만든다. 제일 필수적인 부분은 operating-system이다.. 2020. 7. 7.
Image 생성 (Snapshot) 1. Instance 생성 2. 원격 접속을 위해 floating ip 설정 3. sealing 참고 linux vm sealing 검색. rm -rf /etc/ssh/ssh_host_* ssh key 모두 삭제 hostname=localhost.localdomain hostname 초기화 rm -rf /etc/udev/rules.d/70-* 장치 정보를 제거 ( 머신을 사용하면서 여러가지 추가된 장치 (ex. usb...)) HWADDR (MAC 주소 세팅), UUID (network card ID) 있다면 제거 -> /etc/sysconfig/network-scripts/ifcfg-eth* 경우에 따라 DNS도 제거 system power off 오류가 발생 할 수 있으므로 snapshot항상 멈춤 .. 2020. 7. 7.
Open Stack - Cloud-init (wordpress) ** script를 사용해 Instance로 wordpress 올리기 ** Instance 생성할 때 Script를 shell 파일로 만들어 Browse를 이용해 파일을 올릴 수 있다. Customization Script -> 직접 작성도 가능하다. * Instance 생성하기 참고 2020/07/02 - [Infra/프라이빗 클라우드 인프라] - Open Stack 운영.3 (user) /etc/yum.repos.d/mariadb.repo [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.5/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 EOF yum-c.. 2020. 7. 2.