인스턴스 실행

This section creates the necessary virtual networks to support launching instances. Networking option 1 includes one provider (external) network with one instance that uses it. Networking option 2 includes one provider network with one instance that uses it and one self-service (private) network with one instance that uses it.

The instructions in this section use command-line interface (CLI) tools on the controller node. However, you can follow the instructions on any host that the tools are installed.

For more information on the CLI tools, see the OpenStackClient documentation for Pike, the OpenStackClient documentation for Queens, or the OpenStackClient documentation for Rocky.

To use the dashboard, see the Dashboard User Documentation for Pike, the Dashboard User Documentation for Queens, or the Dashboard User Documentation for Rocky.

가상 네트워크 생성

Neutron을 구성할 때 선택한 네트워킹 옵션에 대한 가상 네트워크를 생성합니다. 옵션 1을 선택했다면, 프로바이더 네트워크만 생성됩니다. 옵션 2를 선택했다면, 프로바이더 네트워크와 셀프 서비스 네트워크가 생성됩니다.

사용자 환경에 알맞은 네트워크를 만든 후 인스턴스를 시작하여 환경 설정을 계속 할 수 있습니다.

m1.nano flavor를 생성합니다

가장 작은 디폴트 flavor는 인스턴스 당 512 MB 메모리를 소비합니다. 4 GB보다 적은 메모리를 갖는 compute 노드 환경에서는, 인스턴스 당 64 MB만을 필요로 하는 m1.nano flavor로 생성할 것을 권장합니다. 테스트 목적으로 CirrOS 이미지를 해당 flavor로 사용합니다.

$ openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano

+----------------------------+---------+
| Field                      | Value   |
+----------------------------+---------+
| OS-FLV-DISABLED:disabled   | False   |
| OS-FLV-EXT-DATA:ephemeral  | 0       |
| disk                       | 1       |
| id                         | 0       |
| name                       | m1.nano |
| os-flavor-access:is_public | True    |
| properties                 |         |
| ram                        | 64      |
| rxtx_factor                | 1.0     |
| swap                       |         |
| vcpus                      | 1       |
+----------------------------+---------+

키 페어 생성

대다수의 클라우드 이미지는 기존 암호 인증보다는 public key authentication 를 지원합니다. 인스턴스 시작하기 전 Compute 서비스에 공개 키를 추가해야 합니다.

  1. demo 프로젝트 credential을 소스로 사용합니다:

    $ . demo-openrc
    
  2. 키 패어를 생성하고 공개키를 추가하세요:

    $ ssh-keygen -q -N ""
    $ openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey
    
    +-------------+-------------------------------------------------+
    | Field       | Value                                           |
    +-------------+-------------------------------------------------+
    | fingerprint | ee:3d:2e:97:d4:e2:6a:54:6d:0d:ce:43:39:2c:ba:4d |
    | name        | mykey                                           |
    | user_id     | 58126687cbcc4888bfa9ab73a2256f27                |
    +-------------+-------------------------------------------------+
    

    참고

    ssh-keygen 명령을 사용하지 않고 기존 공개키를 사용할 수 있습니다.

  3. 키 페어 추가 확인:

    $ openstack keypair list
    
    +-------+-------------------------------------------------+
    | Name  | Fingerprint                                     |
    +-------+-------------------------------------------------+
    | mykey | ee:3d:2e:97:d4:e2:6a:54:6d:0d:ce:43:39:2c:ba:4d |
    +-------+-------------------------------------------------+
    

보안그룹 규칙 추가

기본적으로 default 보안그룹은 모든 인스턴스에 제공되며, 인스턴스에 대한 원격 접근을 막는 방화벽 규칙을 포함합니다. CirrOS 와 같은 리눅스 이미지를 위해서 적어도 ICMP(ping)와 보안 셸(SSH)를 허용하는 것이 좋습니다.

  • default 보안그룹에 규칙 추가:

    • ICMP (ping) 허용:

      $ openstack security group rule create --proto icmp default
      
      +-------------------+--------------------------------------+
      | Field             | Value                                |
      +-------------------+--------------------------------------+
      | created_at        | 2017-03-30T00:46:43Z                 |
      | description       |                                      |
      | direction         | ingress                              |
      | ether_type        | IPv4                                 |
      | id                | 1946be19-54ab-4056-90fb-4ba606f19e66 |
      | name              | None                                 |
      | port_range_max    | None                                 |
      | port_range_min    | None                                 |
      | project_id        | 3f714c72aed7442681cbfa895f4a68d3     |
      | protocol          | icmp                                 |
      | remote_group_id   | None                                 |
      | remote_ip_prefix  | 0.0.0.0/0                            |
      | revision_number   | 1                                    |
      | security_group_id | 89ff5c84-e3d1-46bb-b149-e621689f0696 |
      | updated_at        | 2017-03-30T00:46:43Z                 |
      +-------------------+--------------------------------------+
      
    • Secure shell (SSH) 접근 허가:

      $ openstack security group rule create --proto tcp --dst-port 22 default
      
      +-------------------+--------------------------------------+
      | Field             | Value                                |
      +-------------------+--------------------------------------+
      | created_at        | 2017-03-30T00:43:35Z                 |
      | description       |                                      |
      | direction         | ingress                              |
      | ether_type        | IPv4                                 |
      | id                | 42bc2388-ae1a-4208-919b-10cf0f92bc1c |
      | name              | None                                 |
      | port_range_max    | 22                                   |
      | port_range_min    | 22                                   |
      | project_id        | 3f714c72aed7442681cbfa895f4a68d3     |
      | protocol          | tcp                                  |
      | remote_group_id   | None                                 |
      | remote_ip_prefix  | 0.0.0.0/0                            |
      | revision_number   | 1                                    |
      | security_group_id | 89ff5c84-e3d1-46bb-b149-e621689f0696 |
      | updated_at        | 2017-03-30T00:43:35Z                 |
      +-------------------+--------------------------------------+
      

인스턴스 실행

만약 네트워킹 옵션 1을 선택했다면 프로바이더 네트워크 상에서만 인스턴스를 작동할 수 있습니다. 옵션 2를 선택했다면, 프로바디어 네트워크와 셀프 서비스 네트워크 모두를 사용하는 인스턴스를 작동합니다.

블록 스토리지

블록 스토리지 서비스를 사용하는 환경을 구축했다면, 볼륨을 생성하여 인스턴스에 연결할 수 있습니다.

Orchestration

Orchestration 서비스를 사용하는 환경을 구축했다면, stack를 이용하여 인스턴스를 생성할 수 있습니다.

For more information, see the Orchestration installation guide for Pike, the Orchestration installation guide for Queens, or the Orchestration installation guide for Rocky.

공유 파일 시스템

공유 파일 시스템 서비스를 사용하는 환경을 구축했다면, 인스턴스 내에서 공유를 생성하고 마운트할 수 있습니다.

For more information, see the Shared File Systems installation guide for Pike, the Shared File Systems installation guide for Queens, or the Shared File Systems installation guide for Rocky.