deisctl

command
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2014 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

README

Deis Control Utility

deisctl is a command-line utility used to provision and operate a Deis cluster.

Installation

Please refer to the installation docs at http://docs.deis.io/en/latest/installing_deis/install-deisctl/.

Remote Configuration

While deisctl can be used locally on a CoreOS host, it is extremely useful as a tool for remote administration. This requires an SSH tunnel to one of your CoreOS hosts.

Test password-less SSH connectivity to a CoreOS host:

$ ssh core@172.17.8.100 hostname
deis-1

Export the DEISCTL_TUNNEL environment variable:

$ export DEISCTL_TUNNEL=172.17.8.100

Provision a Deis Platform

The deisctl install platform command will schedule all of the Deis platform units. deisctl start platform activates these units.

$ deisctl install platform
● ▴ ■
■ ● ▴ Installing Deis...
▴ ■ ●

Logging subsystem...
deis-logger.service: loaded
Storage subsystem...
deis-store-gateway.service: loaded
Control plane...
deis-cache.service: loaded
deis-database.service: loaded
deis-registry.service: loaded
deis-controller.service: loaded
deis-builder.service: loaded
Data plane...
Routing mesh...
deis-router@1.service: loaded
deis-router@2.service: loaded
deis-router@3.service: loaded
Done.
Deis installed.
Please run `deisctl start platform` to boot up Deis.

$ deisctl start platform
● ▴ ■
■ ● ▴ Starting Deis...
▴ ■ ●

Logging subsystem...
deis-logger.service: running
deis-logspout.service: running
Storage subsystem...
deis-store-daemon.service: running
deis-store-monitor.service: running
deis-store-gateway.service: running
Control plane...
deis-cache.service: running
deis-database.service: running
deis-registry.service: running
deis-controller.service: running
deis-builder.service: running
Data plane...
deis-publisher.service: running
Routing mesh...
deis-router@1.service: running
deis-router@2.service: running
deis-router@3.service: running
Done.

Note that the default start command activates 1 of each component. You can scale components with deisctl scale router=3, for example. The router is the only component that currently scales beyond 1 unit.

You can also use the deisctl uninstall command to destroy platform units:

● ▴ ■
■ ● ▴ Uninstalling Deis...
▴ ■ ●

Routing mesh...
deis-router@1.service: inactive
deis-router@2.service: inactive
deis-router@3.service: inactive
Data plane...
Control plane...
deis-controller.service: inactive
deis-builder.service: inactive
deis-cache.service: inactive
deis-database.service: inactive
deis-registry.service: inactive
Storage subsystem...
deis-store-gateway.service: inactive
Logging subsystem...
deis-logger.service: inactive
Done.

To uninstall a specific component, use deisctl uninstall router.

Note that uninstalling platform units will not remove the data units or underlying data containers. Data must be destroyed manually.

Usage

The deisctl tool provides a number of other commands, including:

  • deisctl list - list Deis platform components
  • deisctl status <component> - retrieve Systemd status of a component
  • deisctl journal <component> - retrieve Systemd journal output
  • deisctl start <component> - start a platform component
  • deisctl stop <component> - stop a platform component
  • deisctl install <component> - install a single platform component
  • deisctl uninstall <component> - uninstall a single platform component
  • deisctl scale <component>=<num> - scale a component to the target number of units
  • deisctl refresh-units - download latest unit files

Usage Examples

$ deisctl list
UNIT				MACHINE				LOAD	ACTIVE	SUB
deis-builder.service		f936b7a5.../172.17.8.100	loaded	active	running
deis-cache.service  		f936b7a5.../172.17.8.100	loaded	active	running
deis-controller.service	    f936b7a5.../172.17.8.100	loaded	active	running
deis-database.service		f936b7a5.../172.17.8.100	loaded	active	running
deis-logger.service	    	f936b7a5.../172.17.8.100	loaded	active	running
deis-registry.service		f936b7a5.../172.17.8.100	loaded	active	running
deis-router@1.service		f936b7a5.../172.17.8.100	loaded	active	running
$ deisctl status controller
● deis-controller.service - deis-controller
   Loaded: loaded (/run/fleet/units/deis-controller.service; linked-runtime)
   Active: active (running) since Mon 2014-08-25 22:56:50 UTC; 15min ago
  Process: 22969 ExecStartPre=/bin/sh -c docker inspect deis-controller >/dev/null && docker rm -f deis-controller || true (code=exited, status=0/SUCCESS)
  Process: 22945 ExecStartPre=/bin/sh -c IMAGE=`/run/deis/bin/get_image /deis/controller`; docker history $IMAGE >/dev/null || docker pull $IMAGE (code=exited, status=0/SUCCESS)
 Main PID: 22979 (sh)
   CGroup: /system.slice/system-deis\x2dcontroller.slice/deis-controller.service
           ├─22979 /bin/sh -c IMAGE=`/run/deis/bin/get_image /deis/controller` && docker run --name deis-controller --rm -p 8000:8000 -e PUBLISH=8000 -e HOST=$COREOS_PRIVATE_IPV4 --volumes-from=deis-logger $IMAGE
           └─22999 docker run --name deis-controller --rm -p 8000:8000 -e PUBLISH=8000 -e HOST=172.17.8.100 --volumes-from=deis-logger deis/controller:latest

Aug 25 22:57:07 deis-1 sh[22979]: [2014-08-25 16:57:07,959: INFO/MainProcess] Connected to redis://172.17.8.100:6379/0
Aug 25 22:57:07 deis-1 sh[22979]: 2014-08-25 16:57:07 [121] [INFO] Booting worker with pid: 121
Aug 25 22:57:07 deis-1 sh[22979]: [2014-08-25 16:57:07,968: INFO/MainProcess] mingle: searching for neighbors
Aug 25 22:57:08 deis-1 sh[22979]: 2014-08-25 16:57:08 [122] [INFO] Booting worker with pid: 122
Aug 25 22:57:08 deis-1 sh[22979]: 2014-08-25 16:57:08 [123] [INFO] Booting worker with pid: 123
Aug 25 22:57:08 deis-1 sh[22979]: 2014-08-25 16:57:08 [124] [INFO] Booting worker with pid: 124
Aug 25 22:57:08 deis-1 sh[22979]: 2014-08-25 16:57:08 [125] [INFO] Booting worker with pid: 125
Aug 25 22:57:08 deis-1 sh[22979]: 2014-08-25 16:57:08 [126] [INFO] Booting worker with pid: 126
Aug 25 22:57:08 deis-1 sh[22979]: [2014-08-25 16:57:08,979: INFO/MainProcess] mingle: all alone
Aug 25 22:57:08 deis-1 sh[22979]: [2014-08-25 16:57:08,997: WARNING/MainProcess] celery@4378062f17a5 ready.
$ deisctl journal controller
...
Aug 25 22:57:08 deis-1 sh[22979]: 2014-08-25 16:57:08 [125] [INFO] Booting worker with pid: 125
Aug 25 22:57:08 deis-1 sh[22979]: 2014-08-25 16:57:08 [126] [INFO] Booting worker with pid: 126
Aug 25 22:57:08 deis-1 sh[22979]: [2014-08-25 16:57:08,979: INFO/MainProcess] mingle: all alone
Aug 25 22:57:08 deis-1 sh[22979]: [2014-08-25 16:57:08,997: WARNING/MainProcess] celery@4378062f17a5 ready.
$ deisctl stop controller
deis-controller.service: loaded
$ deisctl start controller
deis-controller.service: launched
$ deisctl scale router=3
deis-router@1.service: loaded
deis-router@2.service: loaded
deis-router@3.service: loaded

$ deisctl start router
deis-router@1.service: launched
deis-router@2.service: launched
deis-router@3.service: launched

Unit Search Paths

deisctl looks for unit files in these directories, in this order:

  • the $DEISCTL_UNITS environment variable, if set
  • $HOME/.deis/units
  • /var/lib/deis/units

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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/code.google.com/p/go-uuid/uuid
The uuid package generates and inspects UUIDs.
The uuid package generates and inspects UUIDs.
_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.
_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.
_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.
_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.
_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.
_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).
_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.
_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.
_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.
_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.
_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.
_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.
_workspace/src/github.com/coreos/fleet/schema
Package schema provides access to the Fleet API.
Package schema provides access to the Fleet API.
_workspace/src/github.com/coreos/go-omaha/omaha
Implements the Google omaha protocol.
Implements the Google omaha protocol.
_workspace/src/github.com/coreos/go-systemd/activation
Package activation implements primitives for systemd socket activation.
Package activation implements primitives for systemd socket activation.
_workspace/src/github.com/coreos/go-systemd/dbus
Integration with the systemd D-Bus API.
Integration with the systemd D-Bus API.
_workspace/src/github.com/coreos/updateservicectl/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.
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 .
_workspace/src/github.com/docker/docker/pkg/mflag
Package flag implements command-line flag parsing.
Package flag implements command-line flag parsing.
_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.
_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.
_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.
_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.
_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.
_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).
_workspace/src/github.com/tent/hawk-go
Package hawk implements the Hawk HTTP authentication scheme.
Package hawk implements the Hawk HTTP authentication scheme.

Jump to

Keyboard shortcuts

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