1freightctl(1)               General Commands Manual              freightctl(1)
2
3
4

NAME

6       freightctl - Control utility to manage freight-agent database
7

SYNOPSIS

9       frieghtctl [options] <operation>
10

DESCRIPTION

12       freightctl  Is a command and control utility to manipulate the database
13       for a freight-agent cluster.
14

OPTIONS

16        freightctl [OPTIONS]
17
18       -h | --help
19              Display options and usage for the daemon
20
21       -c | --config </path/to/config/file>
22              Specify the config file to use with freight-agent (defaults to
23
24       -v | --verbose
25              Verbose output
26
27

COMMANDS

29       host [add|del] <hostname> Adds or removes  a  host  from  the  list  of
30       available nodes to execute containers.  note! Admin only operation
31
32       host [subscribe|unsubscribe] <hostname> Marks the given host as elligi‐
33       ble to serve containers for a given tennant (as defined  by  the  login
34       credentials in the freight configuration
35
36       host list [tennant] Querys the database to determine which hosts a ten‐
37       nant may use.  [tennant] option is only required if  the  db  admin  is
38       querying
39
40       repo [add|del] <name> <url> Adds or removes a repository from the data‐
41       base for a given tennant
42
43       container [create] <cname> <iname> [chost] Request the  creation  of  a
44       container  <cname>  with  instance  name <iname> on host <chost>.  Note
45       that chost is optional, if left blank the freight-master  process  will
46       be  notified  to  schedule  a host on behalf of the tennant.  chost may
47       also be the reserved keyword all, which will cause all hosts  belonging
48       to the tennant to be notified, and the first to respond will create the
49       container.  Note that created containers  are  created  in  the  STAGED
50       state, it is stared by issuing the boot command below
51
52       container  boot <iname> Requests that the container named by <iname> be
53       started.  Only containers in the STAGED or FAILED state may be booted
54
55       container poweroff <iname> Requests that the container named by <iname>
56       be  shutdown  and  returned  to the STAGED state.  On containers in the
57       RUNNING state may be powered off
58
59       container [delete] <iname> Deletes the  requested  container  from  the
60       database.   Only  containers  in  the  staged  or  failed  state may be
61       deleted.
62
63       container [list] Lists the containers for the tennant  and  what  state
64       they are in
65
66       network  [create]  <name>  <configuration>  Creates  a  networked named
67       <name> with configuration supplied in the  file  named  by  <configura‐
68       tion>.  For the configuration file format, see freight-network-config
69
70       network  [delete]  <name> Delete the named network from the cluster. No
71       container may be using the named network, or the delete operation  will
72       fail
73
74       network [list] List the available networks for the tennant
75
76       network [attach] <container> <network> Attaches the refereced container
77       to the referenced network
78
79       network [detach] <container> <network>  Detaches  the  referenced  con‐
80       tainer from the referenced network
81
82

CONTAINER LIFE CYCLE

84       A  container in freight as manged by freightctl exists in the following
85       state table
86
87
88       ┌────────────────┬────────────────────────────────────────────────┬───────────────────────────┐
89CURRENT STATE  DESCRIPTION                   NEXT STATES        
90       ├────────────────┼────────────────────────────────────────────────┼───────────────────────────┤
91STAGED      Container is created in DB           START-REQUESTED      
92       ├────────────────┼────────────────────────────────────────────────┼───────────────────────────┤
93START-REQUESTED Container has been requested to boot      INSTALLING,RUNNING,FAILED 
94       ├────────────────┼────────────────────────────────────────────────┼───────────────────────────┤
95INSTALLING    Container image is downloading to agent system RUNNING,FAILED       
96       ├────────────────┼────────────────────────────────────────────────┼───────────────────────────┤
97RUNNING     Container is operational            FAILED,EXITING       
98       ├────────────────┼────────────────────────────────────────────────┼───────────────────────────┤
99EXITING     Container is shutting down           FAILED,STAGED       
100       ├────────────────┼────────────────────────────────────────────────┼───────────────────────────┤
101FAILED      Container has encountered a failure       -             
102       └────────────────┴────────────────────────────────────────────────┴───────────────────────────┘

CONFIG FILE FORMAT

104       See the freight-agent man page for a description of  the  config  file.
105       freghtctl only uses the db section of the configuration
106
107

NOTES

109       freightctl  has  direct  access to the freight database, and as such is
110       completely insecure, in that any tennant has access to  other  tennants
111       information.   If you wish to implement a production level multitennant
112       environment, use a freight front end to gate access to the cluster.
113
114
115
116Neil Horman                        Apr 2015                      freightctl(1)
Impressum