deis/registryDeis (pronounced DAY-iss) is an open source PaaS that makes it easy to deploy and manage applications on your own servers. Deis builds upon Docker and CoreOS to provide a lightweight PaaS with a Heroku-inspired workflow.
: $ export DEIS_NUM_INSTANCES=3DEIS_NUM_ROUTERS: $ export DEIS_NUM_ROUTERS=2local.deisapp.com, use either local3.deisapp.com or local5.deisapp.com as your cluster domainNote that for scheduling to work properly, clusters must consist of at least 3 nodes and always have an odd number of members. For more information, see optimal etcd cluster size.
Deis clusters of less than 3 nodes are unsupported for anything other than local development.
First, start the CoreOS cluster on VirtualBox. From a command prompt, cd to the root of the Deis project code and type:
console$ vagrant up
This instructs Vagrant to spin up each VM. To be able to connect to the VMs, you must add your Vagrant-generated SSH key to the ssh-agent (fleetctl tunnel requires the agent to have this key):
console$ ssh-add ~/.vagrant.d/insecure_private_key
Export some environment variables so you can connect to the VM using the docker and fleetctl clients on your workstation.
console$ export DOCKER_HOST=tcp://172.17.8.100:4243 $ export FLEETCTL_TUNNEL=172.17.8.100
Use make pull to download cached layers from the public Docker Index. Then use make build to assemble all of the Deis components from Dockerfiles. Grab some coffee while it builds the images on each VM (it can take a while).
console$ make pull $ make build
Use make run to start all Deis containers and attach to their log output. This can take some time - the registry service will pull and prepare a Docker image. Grab some more coffee!
console$ make run
Your Vagrant VM is accessible at local.deisapp.com (or local3.deisapp.com/local5.deisapp.com). For clusters on other platforms (EC2, Rackspace, bare metal, etc.), see our guide to Configuring DNS.
Integration tests and corresponding documentation can be found under the test/ folder.
If you're using the latest Deis release, use pip install deis to install the latest Deis Client or download pre-compiled binaries.
If you're working off master, precompiled binaries are likely out of date. You should either symlink the python file directly or build a local copy of the client:
console$ ln -fs $(pwd)/client/deis.py /usr/local/bin/deis
or
console$ cd client && python setup.py install
Use the Deis Client to register a new user.
console$ deis register [***] $ deis keys:add
Use deis keys:add to add your SSH public key for git push access.
Initialize a dev cluster with a list of CoreOS hosts and your CoreOS private key.
console$ deis clusters:create dev local.deisapp.com --hosts=local.deisapp.com --auth=~/.vagrant.d/insecure_private_key
The parameters to deis clusters:create are:
dev) - the name used by Deis to reference the clusterlocal.deisapp.com) - the hostname under which apps are created, like balancing-giraffe.local.deisapp.com--hosts) - a comma-separated list of cluster members -- not necessarily all members, but at least one (for EC2 and Rackspace, this is a list of the internal IPs like --hosts=10.21.12.1,10.21.12.2,10.21.12.3)--auth) - the SSH private key used to provision servers (for EC2 and Rackspace, this key is likely ~/.ssh/deis)The dev cluster will be used as the default cluster for future deis commands.
Example applications can be cloned from the Deis GitHub organization. Commonly-used example applications include Helloworld (Dockerfile), Go, and Ruby.
From within the application directory, create an application on the default dev cluster:
console$ cd example-ruby-sinatra $ deis create
Use deis create --cluster=prod to place the app on a different cluster. Don't like our name-generator? Use deis create myappname.
Push builds of your application from your local git repository or from a Docker Registry. Each build creates a new release, which can be rolled back.
When you created the application, a git remote for Deis was added automatically.
console$ git push deis master
This will use the Deis builder to package your application as a Docker Image and deploy it on your application's cluster.
Configure your application with environment variables. Each config change also creates a new release.
console$ deis config:set DATABASE_URL=postgres://
Test your application by running commands inside an ephemeral Docker container.
console$ deis run make test
To integrate with your CI system, check the return code.
Scale containers horizontally with ease.
console$ deis scale web=8
Access to aggregated logs makes it easy to troubleshoot problems with your application.
console$ deis logs
Use deis run to execute one-off commands and explore the deployed container. Coming soon: deis attach to jump into a live container.
Common issues that users have run into when provisioning Deis are detailed below.
make action - 'Failed initializing SSH client: ssh: handshake failed: ssh: unable to authenticate'Did you remember to add your SSH key to the ssh-agent? ssh-agent -L should list the key you used to provision the servers. If it's not there, ssh-add -K /path/to/your/key.
make action - 'All the given peers are not reachable (Tried to connect to each peer twice and failed)'The most common cause of this issue is that a new discovery URL wasn't generated and updated in contrib/coreos/user-data before the cluster was launched. Each Deis cluster must have a unique discovery URL, else there will be entries for old hosts that etcd will try and fail to connect to. Destroy and relaunch the cluster, ensuring to use a fresh discovery URL.
This means the controller failed to submit jobs for the app to fleet. fleetctl status deis-controller will show detailed error information, but the most common cause of this is that the cluster was created with the wrong SSH key for the --auth parameter. The key supplied with the --auth parameter must be the same key that was used to provision the Deis servers. If you suspect this to be the issue, you'll need to clusters:destroy the cluster and recreate it, along with the app.
Use fleetctl status deis-<component>.service to get the output of the service. The most common cause of services failing to start are sporadic issues with the Docker index. The telltale sign of this is:
consoleMay 12 18:24:37 deis-3 systemd[1]: Starting deis-controller... May 12 18:24:37 deis-3 sh[6176]: 2014/05/12 18:24:37 Error: No such id: deis/controller May 12 18:24:37 deis-3 sh[6176]: Pulling repository deis/controller May 12 18:29:47 deis-3 sh[6176]: 2014/05/12 18:29:47 Could not find repository on any of the indexed registries. May 12 18:29:47 deis-3 systemd[1]: deis-controller.service: control process exited, code=exited status=1 May 12 18:29:47 deis-3 systemd[1]: Failed to start deis-controller. May 12 18:29:47 deis-3 systemd[1]: Unit deis-controller.service entered failed state.
We are exploring workarounds and are working with the Docker team to improve their index. In the meantime, try starting the service again with fleetctl start deis-<component>.service.
Running into something not detailed here? Please open an issue or hop into #deis and we'll help!
Copyright 2014, OpDemand LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <[***]>
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.



manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务