3.2 注册用户
为了使用 Deis,你必须首先在 Controller 上注册一个用户。
注册一个 Controller
使用 deis register 和 Controller URL(你的 Deis administrator 支持的) 来创建一个新账号。你将自动登录。
你使用的域应该与你使用 deisctl config platform 中设置的 domain= 相匹配。注意你需要一直使用 deis.<domain> 来与你的 controller 通信。
$ deis register http://deis.example.comusername: myuserpassword:password (confirm):email: myuser@example.comRegistered myuserLogged in as myuser
注意 如果 deis register http://deis.example.com 注册返回404可以尝试改为 http://deis.example.com:8000
注意 对于 Vagrant 集群: deis register http://deis.local3.deisapp.com
重要 注册到 Deis 的第一个用户拥有“superuser”权限
上传你的 SSH 公钥
如果你计划使用 git push 来部署你的应用程序到 Deis,你必须提供的 SSH 公钥。使用 deis keys:add 命令来上传你默认的 SSH 公钥,通常是其中之一:
- ~/.ssh/id_rsa.pub
- ~/.ssh/id_dsa.pub
$ deis keys:addFound the following SSH public keys:1) id_rsa.pubWhich would you like to use with Deis? 1Uploading /Users/myuser/.ssh/id_rsa.pub to Deis... done
从 Controller 退出
使用 deis logout 从一个已经存在的 controller 会话退出。
$ deis logoutLogged out as deis
登录 Controller
如果你已经有一个账号,使用 deis login 来校验身份登录 Deis Controller。
$ deis login http://deis.example.comusername: deispassword:Logged in as deis
注意 对于 Vagrant 集群:deis login http://deis.local3.deisapp.com
重要 Deis 会话(session)信息是存储在你的用户的
~/.deis目录。
