インスタンスの起動

インスタンスの起動

This section creates the necessary virtual networks to support launching one more instances. Networking option 1 includes one public virtual network and one instance that uses it. Networking option 2 includes one public virtual network, one private virtual network, and one instance that uses each network. The instructions in this section use command-line interface (CLI) tools on the controller node. For more information on the CLI tools, see the OpenStack User Guide. To use the dashboard, see the OpenStack User Guide.

仮想ネットワークの作成

Networking サービスの追加 において選択したネットワークオプション向けの仮想ネットワークを作成します。オプション 1 を選択した場合、仮想パブリックネットワークのみを作成します。オプション 2 を選択した場合、仮想パブリックネットワークと仮想プライベートネットワークを作成します。

お使いの環境向けに適切なネットワークを作成した後、インスタンスを起動するための環境の準備を続けます。

キーペアの生成

多くのクラウドイメージは、一般的なパスワードによる認証ではなく、公開鍵認証 に対応しています。インスタンスの起動前に、公開鍵を Compute サービスに追加する必要があります。

  1. demo テナントのクレデンシャルを読み込みます。

    $ source demo-openrc.sh
    
  2. キーペアを生成し、追加します。

    $ ssh-keygen -q -N ""
    $ nova keypair-add --pub-key ~/.ssh/id_rsa.pub mykey
    

    注釈

    代わりに、ssh-keygen コマンドをスキップして、既存の公開鍵を使用することもできます。

  3. キーペアの追加を検証します。

    $ nova keypair-list
    +-------+-------------------------------------------------+
    | Name  | Fingerprint                                     |
    +-------+-------------------------------------------------+
    | mykey | 6c:74:ec:3a:08:05:4e:9e:21:22:a6:dd:b2:62:b8:28 |
    +-------+-------------------------------------------------+
    

セキュリティーグループルールの追加

デフォルトでは、セキュリティーグループ default がすべてのインスタンスに適用されます。このセキュリティーグループは、インスタンスへのリモートアクセスを拒否するファイアウォールルールを持ちます。CirrOS などの Linux イメージの場合、少なくとも ICMP (ping) と SSH を許可することを推奨します。

  • ルールをセキュリティグループ default に追加します。

    • ICMP (ping) を許可します。

      $ nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
      +-------------+-----------+---------+-----------+--------------+
      | IP Protocol | From Port | To Port | IP Range  | Source Group |
      +-------------+-----------+---------+-----------+--------------+
      | icmp        | -1        | -1      | 0.0.0.0/0 |              |
      +-------------+-----------+---------+-----------+--------------+
      
    • secure shell (SSH) アクセスを許可します。

      $ nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
      +-------------+-----------+---------+-----------+--------------+
      | IP Protocol | From Port | To Port | IP Range  | Source Group |
      +-------------+-----------+---------+-----------+--------------+
      | tcp         | 22        | 22      | 0.0.0.0/0 |              |
      +-------------+-----------+---------+-----------+--------------+
      

インスタンスの起動

ネットワークオプション 1 を選択した場合、パブリックネットワークにのみインスタンスを起動できます。ネットワークオプション 2 を選択した場合、パブリックネットワークとプライベートネットワークにインスタンスを起動できます。

Block Storage

お使いの環境に Block Storage がある場合、ボリュームを作成して、それをインスタンスに接続できます。

Orchestration

お使いの環境に Orchestration サービスがある場合、インスタンスを起動するスタックを作成できます。

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.