Docker PaaS - Deis 使用( Using Deis)

原创 2015年01月16日 22:58:36
1. Installing Deis Client

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

$ deis help

The Deis command-line client issues API calls to a Deis controller.
Usage: deis <command> [<args>...]

Auth commands::
register register a new user with a controller
login login to a controller
logout logout from the current controller

Subcommands, use deis help [subcommand] to learn more::
...

$ deis help apps

Valid commands for apps:
apps:create create a new application
apps:list list accessible applications
apps:info view info about an application
apps:open open the application in a browser
apps:logs view aggregated application logs
apps:run run a command in an ephemeral app container
apps:destroy destroy an application

Use deis help [command] to learn more
Register a user
$ deis register http://deis.mycompany.com
username: deis
password:
password (confirm):
email:

Registered deis
Logged in as deis

2. Deploy app using Docker images

$ git clone https://github.com/deis/example-go.git

$ cd example-go

$ git checkout docker

$ docker build -t qishione/example-go .

$ docker push qishione/example-go

$ mkdir -p /tmp/example-go && cd /tmp/example-go

$ deis create
Creating application... done, created example-go

$ deis pull deis/example-go:latest

Creating build... done, v2

root@ec2-55-30-185-42:/tmp/example-go# deis info

=== example-go Application

{
"updated": "2015-01-16T08:36:14UTC",
"uuid": "09961802-5e2b-4d2b-a362-e828fe89ec97",
"created": "2015-01-15T09:04:13UTC",
"url": "example-go.mycompany.com",
"owner": "deis",
"id": "example-go",
"structure": {
"cmd": 1
}
}

=== example-go Processes

--- cmd:
cmd.1 up (v15)

=== example-go Domains
No domains

$ curl example-go.mycompany.com
Powered by Deis

$ deis apps
=== Apps
example-go

$ deis apps:logs

2015-01-16T08:35:16UTC deis[api]: example-go: build example-go-1f21755 created
2015-01-16T08:35:16UTC deis[api]: example-go: release example-go-v14 created
2015-01-16T08:35:16UTC deis[api]: deis deployed qishione/example-go:latest
2015-01-16T08:35:36UTC deis[api]: example-go: build example-go-4069a0f created
2015-01-16T08:35:36UTC deis[api]: example-go: release example-go-v15 created
2015-01-16T08:35:36UTC deis[api]: deis deployed deis/example-go:latest
2015-01-16T08:36:02UTC deis[api]: example-go: deis scaled containers cmd=1
2015-01-16T08:36:12UTC example-go[cmd.1]: 2015/01/16 08:36:12 server is listening on 8080...
2015-01-16T08:36:50UTC example-go[cmd.1]: 2015/01/16 08:36:50 10.21.1.152:49705 GET /

$ deis config:set "MYSQL_IP=109.106.1.17"

Creating config... done, v16
=== example-go
DEIS_APP: example-go
DEIS_RELEASE: v16
MYSQL_IP: 109.106.1.17

$ deis domains:add knight.mycompany.org
Adding knight.samsungcloud.org to example-go... done 

$ root@ec2-54-80-185-42:/tmp/example-go# deis info

=== example-go Application
{
"updated": "2015-01-16T08:36:14UTC",
"uuid": "09961802-5e2b-4d2b-a362-e828fe89ec97",
"created": "2015-01-15T09:04:13UTC",
"url": "example-go.mycompany.org",
"owner": "deis",
"id": "example-go",
"structure": {
"cmd": 1
}
}

=== example-go Processes

--- cmd:
cmd.1 up (v16)

=== example-go Domains
knight.mycompany.org

$ deis releases

=== example-go Releases
v16 8 minutes ago deis added MYSQL_IP
v15 21 minutes ago deis deployed deis/example-go:latest
v14 22 minutes ago deis deployed qishione/example-go:latest
v13 Yesterday at 09:29:36 AM deis deployed qishione/example-go:latest
v12 Yesterday at 09:29:19 AM deis deployed qishione/example-go
v11 Yesterday at 09:28:09 AM deis deployed qishione/example-go:latest
v10 Yesterday at 09:26:06 AM deis deployed gabrtv/example-go:latest
v9 Yesterday at 09:25:18 AM deis deployed qishione/example-go:latest
v8 Yesterday at 09:20:06 AM deis deployed qishione/example-go:latest
v7 Yesterday at 09:19:49 AM deis deployed qishione/example-go
v6 Yesterday at 09:15:45 AM deis deployed qishione/example-go:latest
v5 Yesterday at 09:14:37 AM deis deployed qishione/example-go:latest
v4 Yesterday at 09:13:53 AM deis deployed qishione/example-go
v3 Yesterday at 09:11:51 AM deis deployed qishione/example-go:latest
v2 Yesterday at 09:04:28 AM deis deployed gabrtv/example-go:latest
v1 Yesterday at 09:04:13 AM deis created initial release

$ deis rollback v15
Rolling back to v15... done, v17

$ deis releases
=== example-go Releases
v17 Just now deis rolled back to v15
v16 10 minutes ago deis added MYSQL_IP
v15 23 minutes ago deis deployed deis/example-go:latest
v14 23 minutes ago deis deployed qishione/example-go:latest
v13 Yesterday at 09:29:36 AM deis deployed qishione/example-go:latest
v12 Yesterday at 09:29:19 AM deis deployed qishione/example-go
v11 Yesterday at 09:28:09 AM deis deployed qishione/example-go:latest
v10 Yesterday at 09:26:06 AM deis deployed gabrtv/example-go:latest
v9 Yesterday at 09:25:18 AM deis deployed qishione/example-go:latest
v8 Yesterday at 09:20:06 AM deis deployed qishione/example-go:latest
v7 Yesterday at 09:19:49 AM deis deployed qishione/example-go
v6 Yesterday at 09:15:45 AM deis deployed qishione/example-go:latest
v5 Yesterday at 09:14:37 AM deis deployed qishione/example-go:latest
v4 Yesterday at 09:13:53 AM deis deployed qishione/example-go
v3 Yesterday at 09:11:51 AM deis deployed qishione/example-go:latest
v2 Yesterday at 09:04:28 AM deis deployed gabrtv/example-go:latest
v1 Yesterday at 09:04:13 AM deis created initial release

$ deis scale cmd=2
Scaling processes... but first, coffee!
done in 12s
=== example-go Processes
  • --- cmd: cmd.1 up (v17)
    cmd.2 up (v17)

$ deis limits:set cmd=512m
Applying limits... done, v18

=== example-go Limits
--- Memory
cmd 512m

--- CPU
Unlimited

微信公众号使用

-
  • 1970年01月01日 08:00

Docker PaaS - Deis 使用( Using Deis)

docker-PaaS - Using Deis
  • knight_zhen
  • knight_zhen
  • 2015-01-16 22:58:36
  • 662

Jersey 的使用详解

ersey是JAX-RS(JSR311)开源参考实现用于构建RESTful Web service,它包含三个部分:   核心服务器(Core Server) 通过提供JSR 311中标准化的注...
  • u010963948
  • u010963948
  • 2016-12-29 21:17:05
  • 2703

docker下使用disconf:细说demo开发

docker下使用disconf:细说demo开发
  • boling_cavalry
  • boling_cavalry
  • 2017-05-08 16:15:49
  • 1540

8月最新基于kubernetes的应用编排实践

本文根据8月22日腾讯云研发工程师颜卫在DockOne社群线上直播分享整理。颜卫来自腾讯云容器服务团队,现在主要从事腾讯云容器服务应用编排和微服务相关开发工作。     1   今天交流的话...
  • cloudking000
  • cloudking000
  • 2017-08-25 18:52:37
  • 3600

Docker应用实践总结

docker
  • Likeaboy_fire
  • Likeaboy_fire
  • 2015-03-05 16:18:51
  • 731

欢迎使用CSDN-markdown编辑器

欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦: Markdown和扩展Markdown简洁的语法 代码块高亮 图片链接和...
  • deison886
  • deison886
  • 2017-08-25 12:13:51
  • 65

Docker最有价值的八个应用场景

转载关于Docker的好文——Docker最大化实际项目价值的八个应用场景。
  • pierre_
  • pierre_
  • 2015-07-14 19:53:40
  • 1506

使用SWT开发WEB应用

SmartSWT简介为了提高传统WEB应用的界面表现能力,RIA技术应时而生,各种RIA平台通过各种手段来提高丰富的图形界面。如Bindows,它使用动态HTML技术模拟Windows控件,还有Fle...
  • foxcai
  • foxcai
  • 2006-03-09 21:11:00
  • 1750

Helm简介,安装与使用

Helm简介:       Helm把Kubernetes资源(比如deployments、services或 ingress等) 打包到一个chart中,而chart被保存到chart仓库。通过ch...
  • weiguang1017
  • weiguang1017
  • 2017-09-20 20:23:18
  • 7869
收藏助手
不良信息举报
您举报文章:Docker PaaS - Deis 使用( Using Deis)
举报原因:
原因补充:

(最多只允许输入30个字)