LoginSignup
1
1

More than 5 years have passed since last update.

Install Deis on AWS

Posted at

AWSにDeisをインストールしてみる

Open PaaSのdeisをAWSに入れてみます。

前提

  • deisctlのインストール
  • deisのインストール
  • awsコマンドツールのインストール
  • go get github.com/deis/deis しておく or git clone git://github.com/deis/deis

AWS にprivate keyを登録する

$ssh-keygen
$aws ec2 import-key-pair --key-name $NAME --public-key-material file://~/{path/to/public/key}

すでに登録してある場合は、$GOPATH/src/github.com/deis/deis/contrib/aws/cloudformation.jsonParameterValue を登録済みのkeyの名前にする。

etcdのdiscovery-url を設定する

$cd $GOPATH/src/github.com/deis/deis
$make discovery-url 

Cloudformationを使って、boot

$cd contrib/aws
$./provision-aws-cluster.sh 
{
    "StackId": "arn:aws:cloudformation:us-east-1:574592877137:stack/deis/xxx"
}
Waitin
....
Instances are available:
i-075476ac      52.22.54.xxx    m3.large        us-east-1b      running
i-f0878b22      52.6.38.xxx     m3.large        us-east-1c      running
i-f7878b25      52.21.95.xxx    m3.large        us-east-1c      running
Using ELB deis-DeisWebELB-xxx at deis-DeisWebELB-xxx-xxx.us-east-1.elb.amazonaws.com
Your Deis cluster has been successfully deployed to AWS CloudFormation and is started.

deisctlにて、plaltformをインストール

$export DEISCTL_TUNNEL=52.22.54.xxx
$deisctl list
UNIT                            MACHINE                 LOAD    ACTIVE  SUB
# エラーがなければOK
$deisctl config platform set domain=example.org
$deisctl config platform set sshPrivateKey=~/.ssh/id_rsa
$deisctl install platform
$deisctl start platform

DNSの設定

provision-aws-cluster.shにて返ってきたELBのアドレスをRoute53を使って登録。*.example.comを登録するか、 registry.example.com, deis.example.com, app1.example.com(使いたいアプリ名)を登録する。

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1