Devstack 설치 실습

Jmnote (토론 | 기여)님의 2017년 6월 23일 (금) 16:44 판 (→‎git clone)
devstack 설치

1 계정 생성, 권한 부여

  • 'stack'이라는 계정 생성
root@zetawiki:~# useradd -s /bin/bash -d /opt/stack -m stack
root@zetawiki:~# cat /etc/passwd | grep stack
stack:x:1000:1000::/opt/stack:/bin/bash
  • stack 계정에 sudo 권한 부여
root@zetawiki:~# echo "stack ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/stack
root@zetawiki:~# cat /etc/sudoers.d/stack
stack ALL=(ALL) NOPASSWD: ALL
  • stack 계정으로 전환
root@zetawiki:~# su - stack
stack@zetawiki:~$ pwd
/opt/stack

2 git clone

stack@zetawiki:~$ git clone https://github.com/openstack-dev/devstack.git
Cloning into 'devstack'...
remote: Counting objects: 39146, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 39146 (delta 9), reused 14 (delta 6), pack-reused 39124
Receiving objects: 100% (39146/39146), 11.63 MiB | 7.33 MiB/s, done.
Resolving deltas: 100% (27377/27377), done.
Checking connectivity... done.

3 local.conf 작성

stack@zetawiki:~$ cd devstack/
stack@zetawiki:~/devstack$ vi local.conf
[[local|localrc]]
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

4 local.conf 작성

root@zetawiki:~/devstack# vi local.conf
#cloud-config

users:
  - default
  - name: stack
    lock_passwd: False
    sudo: ["ALL=(ALL) NOPASSWD:ALL\nDefaults:stack !requiretty"]
    shell: /bin/bash

write_files:
  - content: |
        #!/bin/sh
        DEBIAN_FRONTEND=noninteractive sudo apt-get -qqy update || sudo yum update -qy
        DEBIAN_FRONTEND=noninteractive sudo apt-get install -qqy git || sudo yum install -qy git
        sudo chown stack:stack /home/stack
        cd /home/stack
        git clone https://git.openstack.org/openstack-dev/devstack
        cd devstack
        echo '[[local|localrc]]' > local.conf
        echo ADMIN_PASSWORD=password >> local.conf
        echo DATABASE_PASSWORD=password >> local.conf
        echo RABBIT_PASSWORD=password >> local.conf
        echo SERVICE_PASSWORD=password >> local.conf
        ./stack.sh
    path: /home/stack/start.sh
    permissions: 0755

runcmd:
  - su -l stack ./start.sh

5 같이 보기

6 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}