Coder Social home page Coder Social logo

vagrant-conoha's Introduction

vagrant-conoha

Gem Version Dependency Status

[Vagrant](Vagrant ConoHa Provider)1.2以降で使える、ConoHa用のProviderです。

VagrantからConoHaにup, destroyやsshなどのコマンドを使用したり、サーバーのプロビジョニングが行えるようになります。

Note: このProviderはggiamarchi/vagrant-openstack-providerをforkして作成されています。

機能

  • VPSの作成、起動、停止、破棄が行えます
  • ConoHaの各リージョンをサポートしています
  • VPS作成時にプランとインストールイメージを選択できます
  • SSHキーペアの自動作成、それを使ったSSH接続が行えます
  • コントロールパネルから登録済みのSSHキーペアを使うこともできます。
  • インストールイメージ一覧、VPSプランの一覧、ネットワーク、サブネットの一覧を取得するコマンドが用意されています
  • その他Vagrantの各コマンドが使用できます(provisionなど)

クイックスタート

あらかじめVagrant1.2以降をインストールしておきます。次に以下のコマンドでプラグインをインストールします。

$ vagrant plugin install vagrant-conoha

次に以下の内容でVagrantfileを作成します。各パラメータの解説はこちら

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.ssh.username = 'root'
  config.ssh.pty      = true

  config.vm.provider :conoha do |conoha|
    conoha.openstack_auth_url = 'https://identity.tyo1.conoha.io/v2.0'

    conoha.username           = 'gncu*******'
    conoha.password           = '***********'
    conoha.tenant_name        = 'gnct*******'

    conoha.flavor             = 'g-1gb'
    conoha.image              = 'vmi-ubuntu-16.04-amd64-unified'
    conoha.region             = "tyo1"
    conoha.admin_pass         = "AdminPass123*"
    conoha.metadata           = {
      instance_name_tag: "vagrant_conoha"
    }
    conoha.security_groups    = [
      "default",
      "gncs-ipv4-all",
      "gncs-ipv6-all"
    ]

    conoha.sync_method = "rsync"
    # conoha.keypair_name       = "hironobu-key"

  end
  # config.ssh.private_key_path = "~/.ssh/id_rsa"
end

そしてお待ちかねvagrant upを実行します。

$ vagrant up --provider=conoha

互換性

0.1.7以降、Vagrantfile内の config.vm.box パラメータが削除されました。指定するとエラーになります。Vagrantfileを引き継ぐ場合はご注意下さい。

0.1.8以降、rsyncを自動インストールしなくなりました。比較的新しめのCentOSとUbuntuではデフォルトでインストールされているためです。古いOSでは、必要に応じてスタートアップスクリプトを利用するようにしてください。

参考

下記URLをご覧下さい。 VagrantからConoHaを使う - Qiita

サポート

このプラグインは非公式ですので、ConoHaのサポートなどへの問い合わせはご遠慮ください。 issueとかでお気軽にどうぞ。

ライセンス

オリジナルに準じてMIT Licenseを適用します。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.