当前位置: 首页 > 工具软件 > Deis > 使用案例 >

Docker PaaS - Deis 安装(Installing Deis on AWS)

冯翔
2023-12-01
1. Get the source code
$ git clone https://github.com/deis/deis.git
$ cd deis

2. Generate SSH key
$ssh-keygen -q -t rsa -f ~/.ssh/deis -N ' ' -C deis

3. Generate a new discovery URL
$ make discovery-url

4.Install the aws client
$ pip install awscli
$ pip install pyyaml

5. Configure the aws client
$ aws configure

AWS Access Key ID [None]: ***************
AWS Secret Access Key [None]:************************
Default region name [None]: us-west-1
Default output format [None]:

6. Upload the keys to aws
$ ssh-keygen -q -t rsa -f ~/.ssh/deis -N '' -C deis 
$ aws ec2 import-key-pair --key-name deis --public-key-material file://~/.ssh/deis.pub

7. Set the number of instances
$ export DEIS_NUM_INSTANCES=5

8. Customize  cloudformation.json (Optional)
[
   {
       "ParameterKey":    "KeyPair",
       "ParameterValue":  "deis"
   }
]

9. Run the provision Script
$ cd contrib/ec2
$ ./provision-ec2-cluster.sh { "StackId":"arn:aws:cloudformation:ap-southeast-1:413516096905:stack/deis/9699ec20-c297-11e3-89eb-50fa01cd7096"}

Your Deis cluster has successfully deployed.
Please wait for all instances to come up as "running" before continuing.

10. Configure DNS (PS: I configure a A record for deis.mycompany.com.)
11. Install Deisctl

$ curl -sSL http://deis.io/deisctl/install.sh | sh -s 1.2.1 
$ ln -fs $PWD/deisctl /usr/local/bin/deisctl

12. Install Deis Platform

$ deisctl --version
1.2.1

$ eval `ssh-agent -s`
$ ssh-add ~/.ssh/deis
$ export DEISCTL_TUNNEL="deis.mycompany.com"
$ deisctl config platform set sshPrivateKey=~/.ssh/deis
$ deisctl config platform set domain=mycompany.com
$ deisctl install platform

You will see the output like following:

●■
■●Installing Deis...
■●

Scheduling data containers......

Deis installed.

Please run `deisctl start platform` to boot up Deis.

Login in AWS and 5 instance has be launched.


$ deisctl start platform start platform
$ deisctl list

You will see the output like following:

UNIT MACHINE LOAD ACTIVE SUB
deis-builder.service ad04b506.../10.21.2.136 loaded active running
deis-cache.service a6b009f5.../10.21.2.138 loaded active running
deis-controller.service ad04b506.../10.21.2.136 loaded active running
deis-database.service f2fc4fb0.../10.21.1.152 loaded active running
deis-logger.service a6b009f5.../10.21.2.138 loaded active running
deis-logspout.service 7aa4377f.../10.21.1.151 loaded active running
deis-logspout.service 860a1cd3.../10.21.2.137 loaded active running
deis-logspout.service a6b009f5.../10.21.2.138 loaded active running
deis-logspout.service ad04b506.../10.21.2.136 loaded active running
deis-logspout.service f2fc4fb0.../10.21.1.152 loaded active running
deis-publisher.service 7aa4377f.../10.21.1.151 loaded active running
deis-publisher.service 860a1cd3.../10.21.2.137 loaded active running
deis-publisher.service a6b009f5.../10.21.2.138 loaded active running
deis-publisher.service ad04b506.../10.21.2.136 loaded active running
deis-publisher.service f2fc4fb0.../10.21.1.152 loaded active running
deis-registry@1.service 7aa4377f.../10.21.1.151 loaded active running
deis-router.service 7aa4377f.../10.21.1.151 loaded active running
deis-router@1.service a6b009f5.../10.21.2.138 loaded active running
deis-router@2.service ad04b506.../10.21.2.136 loaded active running
deis-router@3.service f2fc4fb0.../10.21.1.152 loaded active running
deis-store-daemon.service 7aa4377f.../10.21.1.151 loaded active running
deis-store-daemon.service 860a1cd3.../10.21.2.137 loaded active running
deis-store-daemon.service a6b009f5.../10.21.2.138 loaded active running
deis-store-daemon.service ad04b506.../10.21.2.136 loaded active running
deis-store-daemon.service f2fc4fb0.../10.21.1.152 loaded active running
deis-store-gateway.service 7aa4377f.../10.21.1.151 loaded active running
deis-store-metadata.service 7aa4377f.../10.21.1.151 loaded active running
deis-store-metadata.service 860a1cd3.../10.21.2.137 loaded active running
deis-store-metadata.service a6b009f5.../10.21.2.138 loaded active running
deis-store-metadata.service ad04b506.../10.21.2.136 loaded active running
deis-store-metadata.service f2fc4fb0.../10.21.1.152 loaded active running
deis-store-monitor.service 7aa4377f.../10.21.1.151 loaded active running
deis-store-monitor.service 860a1cd3.../10.21.2.137 loaded active running
deis-store-monitor.service  a6b009f5.../10.21.2.138 loaded active running
deis-store-monitor.service ad04b506.../10.21.2.136 loaded active running
deis-store-monitor.service f2fc4fb0.../10.21.1.152 loaded active running
deis-store-volume.service 7aa4377f.../10.21.1.151 loaded active running
deis-store-volume.service 860a1cd3.../10.21.2.137 loaded active running
deis-store-volume.service a6b009f5.../10.21.2.138 loaded active running
deis-store-volume.service ad04b506.../10.21.2.136 loaded active running
deis-store-volume.service f2fc4fb0.../10.21.1.152 loaded active running
 类似资料: