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

Kubernetes是什么?

【译者按】译自kubernetes官网文档,主要介绍kubernetes的基本概念以及应用场景,K8s的设计理念,以及K8s能干什么不能干什么。什么是kubernetes?Kubernetes是一款应...
  • deerlux
  • deerlux
  • 2016年03月17日 22:25
  • 2054

Flynn初探:基于Docker的PaaS平台

[Flynn](https://flynn.io/)是一个开源的PaaS平台,可自动构建部署任何应用到Docker容器集群上运行,其功能特性与组件设计大量参考了传统的PaaS平台[Heroku](ht...
  • TragicJun
  • TragicJun
  • 2014年11月19日 01:04
  • 8344

Docker解析及轻量级PaaS平台演练(一)--Docker简介与安装

Container技术:传统的虚拟化技术: 通过对硬件层模拟,从而实现了能够在一套硬件上面运行多个操作系统,因为通过硬件虚拟化,使得操作系统认为在它之下就是硬件层但是实际情况是这样的:虚拟机中的OS...
  • qq1010885678
  • qq1010885678
  • 2015年05月31日 19:37
  • 2724

中国移动一级业务支撑系统多Kubernetes集群PaaS平台实践经验分享

背景 中国移动一级业务支撑系统是整个中国移动的集中管理和一点对外的门户,包括网状网、BBOSS、一级营销、内容计费、一级客服、VGOP、电渠等多个业务支撑系统,各系统呈烟囱化建设。在小型机时代由于主...
  • horsefoot
  • horsefoot
  • 2016年07月15日 09:28
  • 14301

基于Docker开发的PaaS平台 DINP

DINP是又一个基于Docker开发的PaaS平台。 DINP 包含如下组件: dinp-server master组件,控制集群中所有计算节点 dinp-agent Agent,部...
  • xiangxizhishi
  • xiangxizhishi
  • 2016年11月02日 21:52
  • 153

基于Docker及Kubernetes技术构建容器云(PaaS)平台概述

【编者的话】 目前很多的容器云平台通过Docker及Kubernetes等技术提供应用运行平台,从而实现运维自动化,快速部署应用、弹性伸缩和动态调整应用环境资源,提高研发运营效率。 从宏观到微观(...
  • huwh_
  • huwh_
  • 2017年07月23日 17:39
  • 2237

【转】使用Kubeadm快速搭建Kubernetes(docker)

原文链接:https://my.oschina.net/u/3559870/blog/1031428 摘要: 使用Kubeadm快速搭建Kubernetes(docker) 版本说...
  • CSDN_duomaomao
  • CSDN_duomaomao
  • 2017年06月28日 08:45
  • 782

基于docker+kubernetes的一站式运维管理实践

2015年下半年,搜狐北京研发中心基于docker和kubernetes开发了一套企业级的一站式运维管理系统——DomeOS。该系统是一个持续交付和自动运维平台,解决用户从代码自动编译打包,到线上运行...
  • horsefoot
  • horsefoot
  • 2016年06月06日 10:09
  • 18269

Docker与Kubernetes系列(一): Docker的基本概念

这段时间工作中用到了Docker以及Kubernetes(简称K8S),现在整理下我学习Docker以及K8S过程中看的一些比较好的资料,方便自己回顾,也希望能给容器小白一些帮助。给自己定一个小目标,...
  • u012422829
  • u012422829
  • 2017年02月09日 00:01
  • 4172

基于Kubernetes的Docker集群搭建过程详解(原创)

最近在学习使用Docker,而Kubernetes是Google退出的开源的Docker集群调度管理系统,是基于Google使用了多年的Borg系统设计理念进行的开源实现,具有非常好的稳定性,但是Ku...
  • zhangchixtacbn
  • zhangchixtacbn
  • 2016年07月01日 08:41
  • 2892
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Docker PaaS - Deis 使用( Using Deis)
举报原因:
原因补充:

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