openstack magnum 프로젝트 설치

| 2019년 7월 30일 | 0 Comments

openstack에는 많은 프로젝트들이 있습니다.

magnum은 docker 컨테이너 작업을 자동화 하는 오픈 소스들 kubernetes, swarm 등을 원하는 형태로 생성하게 합니다.

마스터노드 ,워커 노드의 수 및 cni 선택 등 heat 프로젝트와 연동하여 템플릿 형태로 동작 합니다.

설치 테스트는 openstack queens 버전이 설치된 Ubuntu 18.04 LTS에서 진행하였습니다.

 


  • 데이터베이스 생성

    MariaDB [(none)]> CREATE DATABASE magnum;

    MariaDB [(none)]> GRANT ALL PRIVILEGES ON magnum.* TO ‘magnum’@’localhost’ IDENTIFIED BY {패스워드};

    MariaDB [(none)]> GRANT ALL PRIVILEGES ON magnum.* TO ‘magnum’@’%’ IDENTIFIED BY {패스워드};

  • user, service, endpoint등 설정

    # openstack user create –domain default –password {패스워드} magnum

    # openstack role add –project service –user magnum admin

    # openstack service create –name magnum \
    > –description “OpenStack Container Infrastructure Management Service” \
    > container-infra

    # openstack endpoint create –region test container-infra public http://controller:9511/v1

    # openstack endpoint create –region test container-infra internal http://controller:9511/v1

    # openstack endpoint create –region test container-infra admin http://controller:9511/v1

    # openstack domain create –description “Owns users and projects \
    > created by magnum” magnum

    # openstack user create –domain magnum –password {패스워드} magnum_domain_admin

    # openstack role add –domain magnum –user-domain magnum –user \
    > magnum_domain_admin admin

  • 패키지 설치

    # apt-get install magnum-api magnum-conductor python-magnumclient

  • 설정 파일 수정(magnum.conf)

    [DEFAULT]
    ..
    transport_url = rabbit://openstack:{rabbitmq 패스워드}@controller

    [api]
    ..
    host = {컨트롤러 ip}

    [certificates]
    ..
    cert_manager_type = barbican

    [cinder_client]
    ..
    region_name = {region 이름]

    [database]
    ..
    connection = mysql+pymysql://magnum:{데이터베이스 패스워드}@controller/magnum

    [keystone_authtoken]
    ..
    memcached_servers = controller:11211
    auth_version = v3
    auth_uri = http://controller:5000/v3
    project_domain_id = default
    project_name = service
    user_domain_id = default
    password = {magnum 패스워드}
    username = magnum
    auth_url = http://controller:5000
    auth_type = password
    admin_user = magnum
    admin_password = {magnum 패스워드}
    admin_tenant_name = service

    [trust]
    ..
    trustee_domain_name = magnum
    trustee_domain_admin_name = magnum_domain_admin
    trustee_domain_admin_password = {magnum_domain_admin 패스워드}
    trustee_keystone_interface = public
    cluster_user_trust = True

    [oslo_messaging_notifications]
    ..
    driver = messaging

  • 데이터베이스 테이블 생성

    # su -s /bin/sh -c “magnum-db-manage upgrade” magnum

  • 확인

    # systemctl restart magnum-api.service magnum-conductor.service

    # openstack coe service list
    +—-+——+——————+——-+———-+—————–+—————————+—————————+
    | id | host | binary | state | disabled | disabled_reason | created_at | updated_at |
    +—-+——+——————+——-+———-+—————–+—————————+—————————+
    | 1 | None | magnum-conductor | up | False | None | 2019-07-30T04:48:04+00:00 | 2019-07-30T04:50:06+00:00 |
    +—-+——+——————+——-+———-+—————–+—————————+—————————+

Category: 가상화/클라우드

장영호

About the Author ()