deis

module
v0.15.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2014 License: Apache-2.0

README

Deis

Deis (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.

Build Status Current Release Latest Docs

Deis Graphic

Deis is pre-release software. The current release is v0.15.1. Until there is a stable release, we recommend you check out the latest "master" branch code and refer to the latest documentation. Upgrading from a previous Deis release? See Upgrading Deis for additional information.

Deploying Deis

Deis is a set of Docker containers that can be deployed anywhere including public cloud, private cloud, bare metal or your workstation. Decide where you'd like to deploy Deis, then follow the deployment-specific documentation for Rackspace, EC2, DigitalOcean, Google Compute Engine or bare-metal provisioning. Want to see a particular platform supported? Please open an issue.

Trying out Deis? Continue following these instructions for a local installation using Vagrant.

Install prerequisites

  • Due to its nature as a distributed system, we strongly recommend using Deis with a minimum of 3 nodes even for local development and testing
  • The Deis "control plane" containers will consume approximately 2 GB of RAM across the cluster. Please be sure you have sufficient free memory before proceeding.
  • Install Vagrant v1.6.5+ and VirtualBox

Note for Ubuntu users: the VirtualBox package in Ubuntu (as of the last known release for 14.04) has some issues when running in RAM-constrained environments. Please install the latest version of VirtualBox from Oracle's website.

Configure Discovery

Each time you spin up a new CoreOS cluster, you must provide a new discovery service URL in the CoreOS user-data file. This unique discovery URL allows hosts to find each other and perform leader election.

Create a user-data file with a new discovery URL this way:

$ make discovery-url

Or copy contrib/coreos/user-data.example to contrib/coreos/user-data and follow the directions in the etcd: section to add a unique discovery URL.

Boot CoreOS

Start the CoreOS cluster on VirtualBox. From a command prompt, cd to the root of the Deis project code and type:

$ export DEIS_NUM_INSTANCES=3
$ vagrant up

This instructs Vagrant to spin up 3 VMs. To be able to connect to the VMs, you must add your Vagrant-generated SSH key to the ssh-agent (deisctl requires the agent to have this key):

$ ssh-add ~/.vagrant.d/insecure_private_key

Install deisctl

Install the deisctl utility used to provision and operate Deis.

$ curl -sSL http://deis.io/deisctl/install.sh | sh

Export DEISCTL_TUNNEL so you can connect to one of the VMs using the deisctl client on your workstation.

$ export DEISCTL_TUNNEL=172.17.8.100

Configure Deis

Before Deis will start successfully, there are a few administrative settings we need to provide.

Set the default domain used to anchor your applications. For a Vagrant environment, use local3.deisapp.com as it will resolve to your local routers:

$ deisctl config platform set domain=local3.deisapp.com

If you want to allow deis run for one-off admin commands, you must provide an SSH private key that allows Deis to gather container logs on CoreOS hosts:

$ deisctl config platform set sshPrivateKey=~/.vagrant.d/insecure_private_key

Provision Deis

Use deisctl install platform to install all Deis components across the cluster, then deisctl start platform to start them.

$ deisctl install platform
$ deisctl start platform

This can take some time - the builder must download and install the beefy Heroku cedar stack. Grab some more coffee!

Your Deis platform should be accessible at deis.local3.deisapp.com. For clusters on other platforms see our guide to Configuring DNS.

Install the Deis Client

If you're using the latest Deis release, use pip install --upgrade 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:

$ sudo ln -fs $(pwd)/client/deis.py /usr/local/bin/deis

or

$ cd client && python setup.py install

Register a User

Use the Deis Client to register a new user.

$ deis register http://deis.local3.deisapp.com
$ deis keys:add

Use deis keys:add to add your SSH public key for git push access -- normally $HOME/.ssh/id_rsa.pub.

Usage

Deis supports 3 deployment workflows:

As an example, we will walk through deploying a Ruby application using the Heroku Buildpack workflow.

Prepare an Application

Clone an example Ruby application:

$ git clone https://github.com/deis/example-ruby-sinatra.git
$ cd example-ruby-sinatra

Create an Application

From within the application directory, create an application on Deis:

$ cd example-ruby-sinatra
$ deis create

Don't like our name-generator? Use deis create myappname.

Deploy

When you created the application, a git remote for Deis was added automatically. Deploy with git push.

$ git push deis master

This will use the Deis builder to package your application as a Docker Image and automatically deploy it to the platform. Each build creates a new release, which can be rolled back.

Configure

Configure your application with environment variables. Each config change also creates a new release.

$ deis config:set DATABASE_URL=postgres://

Test

Test the application by running your test suite inside an ephemeral Docker container.

$ deis run make test

Use the return code to integrate with a CI system.

Scale

Scale containers horizontally with ease.

$ deis scale web=8

Debug

Access to aggregated logs makes it easy to troubleshoot problems with your application.

$ deis logs

Use deis run to execute one-off commands and explore the deployed container.

Testing the cluster

Integration tests and corresponding documentation can be found under the tests/ folder.

Hacking on Deis

Learn how to hack on Deis with a Docker-based development workflow.

Troubleshooting

See the Troubleshooting Deis documentation for assistance with common issues.

License

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 http://www.apache.org/licenses/LICENSE-2.0

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.

Directories

Path Synopsis
cache
contrib
bumpver/Godeps/_workspace/src/github.com/docopt/docopt-go
Package docopt parses command-line arguments based on a help message.
Package docopt parses command-line arguments based on a help message.
Godeps/_workspace/src/code.google.com/p/go-uuid/uuid
The uuid package generates and inspects UUIDs.
The uuid package generates and inspects UUIDs.
Godeps/_workspace/src/code.google.com/p/go.crypto/ssh
Package ssh implements an SSH client and server.
Package ssh implements an SSH client and server.
Godeps/_workspace/src/code.google.com/p/go.crypto/ssh/agent
Package agent implements a client to an ssh-agent daemon.
Package agent implements a client to an ssh-agent daemon.
Godeps/_workspace/src/code.google.com/p/go.crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Godeps/_workspace/src/code.google.com/p/go.crypto/ssh/test
This package contains integration tests for the code.google.com/p/go.crypto/ssh package.
This package contains integration tests for the code.google.com/p/go.crypto/ssh package.
Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi
Package googleapi contains the common code shared by all Google API libraries.
Package googleapi contains the common code shared by all Google API libraries.
Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/internal/uritemplates
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570).
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570).
Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/transport
Package transport contains HTTP transports used to make authenticated API requests.
Package transport contains HTTP transports used to make authenticated API requests.
Package ssh implements an SSH client and server.
Package agent implements a client to an ssh-agent daemon.
Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/code.google.com/p/go.crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/code.google.com/p/go.crypto/ssh/test
This package contains integration tests for the code.google.com/p/go.crypto/ssh package.
This package contains integration tests for the code.google.com/p/go.crypto/ssh package.
Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi
Package googleapi contains the common code shared by all Google API libraries.
Package googleapi contains the common code shared by all Google API libraries.
Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/transport
Package transport contains HTTP transports used to make authenticated API requests.
Package transport contains HTTP transports used to make authenticated API requests.
Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/docker/libcontainer/netlink
Packet netlink provide access to low level Netlink sockets and messages.
Packet netlink provide access to low level Netlink sockets and messages.
Godeps/_workspace/src/github.com/coreos/fleet/schema
Package schema provides access to the Fleet API.
Package schema provides access to the Fleet API.
Godeps/_workspace/src/github.com/coreos/go-omaha/omaha
Implements the Google omaha protocol.
Implements the Google omaha protocol.
Godeps/_workspace/src/github.com/coreos/go-systemd/activation
Package activation implements primitives for systemd socket activation.
Package activation implements primitives for systemd socket activation.
Godeps/_workspace/src/github.com/coreos/go-systemd/dbus
Integration with the systemd D-Bus API.
Integration with the systemd D-Bus API.
Package googleapi contains the common code shared by all Google API libraries.
Package transport contains HTTP transports used to make authenticated API requests.
Package hawk implements the Hawk HTTP authentication scheme.
Package update provides access to the .
Godeps/_workspace/src/github.com/docker/docker/pkg/mflag
Package flag implements command-line flag parsing.
Package flag implements command-line flag parsing.
Godeps/_workspace/src/github.com/docker/libcontainer/netlink
Packet netlink provide access to low level Netlink sockets and messages.
Packet netlink provide access to low level Netlink sockets and messages.
Godeps/_workspace/src/github.com/docopt/docopt-go
Package docopt parses command-line arguments based on a help message.
Package docopt parses command-line arguments based on a help message.
Godeps/_workspace/src/github.com/godbus/dbus
Package dbus implements bindings to the D-Bus message bus system.
Package dbus implements bindings to the D-Bus message bus system.
Godeps/_workspace/src/github.com/godbus/dbus/introspect
Package introspect provides some utilities for dealing with the DBus introspection format.
Package introspect provides some utilities for dealing with the DBus introspection format.
Godeps/_workspace/src/github.com/godbus/dbus/prop
Package prop provides the Properties struct which can be used to implement org.freedesktop.DBus.Properties.
Package prop provides the Properties struct which can be used to implement org.freedesktop.DBus.Properties.
Godeps/_workspace/src/github.com/satori/go.uuid
Package uuid provides implementation of Universally Unique Identifier (UUID).
Package uuid provides implementation of Universally Unique Identifier (UUID).
Godeps/_workspace/src/github.com/tent/hawk-go
Package hawk implements the Hawk HTTP authentication scheme.
Package hawk implements the Hawk HTTP authentication scheme.
cmd
syslog
Package syslog implements a syslog server library.
Package syslog implements a syslog server library.
router
Package tests contains integration tests for the Deis open source PaaS.
Package tests contains integration tests for the Deis open source PaaS.
_vendor/src/github.com/docker/docker/pkg/mflag
Package flag implements command-line flag parsing.
Package flag implements command-line flag parsing.
_vendor/src/github.com/docker/docker/pkg/pools
Package pools provides a collection of pools which provide various data types with buffers.
Package pools provides a collection of pools which provide various data types with buffers.
_vendor/src/github.com/kballard/go-shellquote
Shellquote provides utilities for joining/splitting strings using sh's word-splitting rules.
Shellquote provides utilities for joining/splitting strings using sh's word-splitting rules.
_vendor/src/github.com/kr/pty
Package pty provides functions for working with Unix terminals.
Package pty provides functions for working with Unix terminals.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL