構築したDeis の設定と、簡単なアプリのデプロイまで行ってみます。
Deis in Google Compute Engine で使っている、Google Cloud DNS の代わりにxip.io を、Load Balancing の代わりに、IDCFクラウドに標準機能であるロードバランサー を利用します。
Deisクライアントのインストール 作業マシンにDeisクライアントをインストールします。バージョンは0.10.0です。
$ sudo pip install --upgrade deis $ deis --version Deis CLI 0.10 .0  $ which deis /usr/ local/bin/ deis
ネットワーク設定 2222ポートと80ポートのロードバランサーを設定します。
WildcardDNSはxip.ioを使うため、Deisの命名規則に従い以下のドメイン名にしました。
deis .210.140.16.229 .xip.io
Deisコントローラーへユーザー登録 Deisコントローラーにユーザーを登録します。
$ deis register http: username:  masatopassword: password (confirm): email:  ma6ato@gmail.comRegistered masato Logged in as masato 
deis keys:addを入力すると、~/.sshに存在する鍵をリストしてくれるので、
以降の管理作業をするため、Deisコントローラーにログインします。
$ deis login http: username:  masatopassword: Logged in as masato 
Deisクラスタの作成 アプリケーションをデプロイするために、Deisのクラスタを作成します。--hostsがわかりづらいところですが、CoreOSの内部IPアドレスを指定します。
$ deis clusters:create dev deis.210.140.16.229 .xip.io \     --hosts=10.1.2.34 ,10.1.3.33 ,10.1.0.249  \     --auth=~/.ssh/deis Creating cluster... done, created dev 
Sinatraのデプロイ Deisが提供しているSinatraのサンプルアプリ をcloneします。
$ git clone https: //github.com /deis/example-ruby -sinatra.git $ cd  example-ruby -sinatra 
アプリケーションを作成します。Gitのリモートリポジトリが追加されました。
$  deis createCreating Warning: Permanently added '[deis.210.140.16.229.xip.io]:2222,[210.140.16.229]:2222'  (ECDSA) to the list of known hosts. Git remote deis added 
git pushをしてデプロイします。ログをみるとHerokuのようにslugを作成してからデプロイしています。
$ git push deis master Counting objects: 102 , done. Delta compression using up to  4  threads. Compressing objects: 100 % (53 /53 ), done. Writing objects: 100 % (102 /102 ), 22.19  KiB | 0  bytes/s, done. Total 102  (delta 43 ), reused 102  (delta 43 )        Running: bundle install         Don't  run Bundler as root. Bundler can ask for  sudo if  it is  needed, and         installing your bundle as root will break this application for  all  non-root        users on  this machine.        Fetching gem metadata from http://rubygems.org/..........        Using bundler 1.6 .3         Installing tilt 1.3 .6         Installing rack 1.5 .2         Installing rack-protection 1.5 .0         Installing sinatra 1.4 .2         Your bundle is  complete!        Gems in  the groups development and  test were not  installed.        It was installed into ./vendor/bundle        Bundle completed (13.48 s)        Cleaning up the bundler cache.        Procfile declares types -> web        Default  process  types for  Ruby -> rake, console, web remote:  remote: Sending build context  to  Docker daemon 11.77  MB remote: Sending build context  to  Docker daemon remote: Step 0  : FROM deis/slugrunner remote:   remote: Step 1  : RUN mkdir -p /app remote:   remote:   remote: Removing intermediate container 0 b97b30b3657 remote: Step 2  : ADD slug.tgz /app remote:   remote: Removing intermediate container d1b6139bd64c remote: Step 3  : ENTRYPOINT ["/runner/init" ] remote:   remote:   remote: Removing intermediate container 19 ae5bcceb39 remote: Successfully built abdcc4adba9a remote:  remote: remote:        Launching... done, v2 remote: remote:  remote:        http://outlaw-rucksack.deis.210.140 .16.229 .xip.io remote: remote:        To  learn more, use  `deis help` or  visit http://deis.io remote: To  ssh://git@deis.210.140 .16.229 .xip.io:2222 /outlaw-rucksack.git * [new  branch]      master -> master 
確認 git push deis masterログの最後の方にアプリのURLが表示されるので、curlで確認してみます。
$ curl -s http: Powered by  Deis! Running on container  ID 3110024e035 b 
ブラウザからも確認してみます。