본문 바로가기

CentOS3

간단한 Docker 실습 1. volume 생성 docker volume create web_vol docker volume create db_vol docker volume ls //확인 2. network 생성 docker network create --subnet=192.168.100.0/24 --gateway=192.168.100.254 --internal alpha docker network ls //확인 bridge network는 기본으로 있다. 3. os / web1 / web2 container 생성 docker run -itd --name os -v web_vol:/root/html:rw --network bridge centos:latest docker run -itd --name web1 -v web_vol.. 2020. 7. 20.
[ 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.