Skip to content

Commit

Permalink
Improve CLI documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Tobin C. Harding <me@tobin.cc>
  • Loading branch information
tcharding committed Jun 5, 2018
1 parent 2bb4f49 commit 41dedcb
Showing 1 changed file with 38 additions and 27 deletions.
65 changes: 38 additions & 27 deletions cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ AppSwitch features are provided through the ``ax`` command.

This guide goes over various options supported by ``ax`` command thereby
describing the related features. The top level commands include:

::

daemon Start the AppSwitch daemon
run Run an application under AppSwitch
get Show resource(s)
get Get active resources
create Create a resource
delete Delete a resource
delete, del Delete a resource


Daemon
======
Expand Down Expand Up @@ -124,14 +124,6 @@ optionally specify a DNS suffix and a list of forwarding DNS servers. For examp

$ sudo ax daemon --dns-servers 127.0.0.1:5533,8.8.8.8

::

--dns-override Take over application's DNS requests (default: true)

This option overrides existing resolv.conf file for the application with
one that points to the built-in DNS server by mounting over it. Host is
not affected by this.


.. _tls:

Expand Down Expand Up @@ -178,7 +170,7 @@ AppSwitch binds application sockets to ports on the host from this port space.

.. _rest-port-label:

REST port number
REST Port Number
----------------
::

Expand All @@ -191,7 +183,7 @@ specifies the port number used for the REST endpoint.

.. _serf-label:

Gossip protocol
Gossip Protocol
---------------

AppSwitch uses Serf as the gossip channel. Serf can be configured with the
Expand All @@ -202,7 +194,7 @@ following options
--gossip-auto-discover Auto discover neighbors


Egress gateway
Egress Gateway
--------------
::

Expand All @@ -217,7 +209,7 @@ egress gateway.

.. _cluster-label:

Cluster name
Cluster Name
------------
::

Expand Down Expand Up @@ -285,7 +277,7 @@ used for other applications, in which case, all those applications become
backends for the vservice.


DNS resolvable name
DNS Resolvable Name
-------------------
::

Expand Down Expand Up @@ -322,7 +314,7 @@ Exposed Ports
The specified application port would be exposed on the specified external
port on every node in the AppSwitch cluster. This is equivalent to the
nodePort feature of Kubernetes. A similar result can also be produced by
creating an external ``vservice``_.
creating an external `vservice`_.

For example, a python web server (port 8000) started with the ``--ports``
option can be exposed on external port 9999 as follows
Expand Down Expand Up @@ -394,14 +386,25 @@ Network Namespace
-----------------
::

--no-new-netns Don't create a new network namespace (default: false)
--new-netns Create a new network namespace (default: true)

Each application run by AppSwitch is run in a separate namespace. Creation
of a new namespace is handled by AppSwitch by default. Sometimes this
behavior is not required, for example when running within a Docker
container. Note that creating a new network namespace also requires
privilege. To prevent from new network namespace from being created
``--no-new-netns=true`` can be used.
``--new-netns=false`` can be used.


DNS Override
------------
::

--dns-override Take over application's DNS requests (default: true)

This option overrides existing resolv.conf file for the application with
one that points to the built-in DNS server by mounting over it. Host is
not affected by this. To prevent dns override use ``--dns-override=false``.


Get
Expand All @@ -425,7 +428,7 @@ Examples:
Displays information about applications currently running under AppSwitch
::

NAME APPID NODEID CLUSTER IP DRIVER LABELS ZONES
NAME APPID NODEID CLUSTER APPIP DRIVER LABELS ZONES
------------------------------------------------------------------------------------------------------------
<ab856b81-7db0-4d88-8a1e-1bfbf0c5fe9f> f00001bb node1 appswitch 192.168.178.2 user zone=default [zone==default]
<04a275bc-b9b4-4496-9c9d-a838daecdffb> f000028e node1 appswitch 192.168.178.2 user zone=default [zone==default]
Expand All @@ -437,8 +440,8 @@ Displays information about applications currently running under AppSwitch
Shows information about currently running services.
::

NODEID CLUSTER APPID PROTO SERVICEADDR IPV4ADDR PROXYADDR
-----------------------------------------------------------------------------
NODEID CLUSTER APPID PROTO SERVICEADDR IPV4ADDR
--------------------------------------------------------------------------
node1 appswitch f00001bb tcp 192.168.178.2:6000 10.0.23.11:40000
node1 appswitch f000028e tcp 192.168.178.2:5201 10.0.23.11:40001

Expand All @@ -453,16 +456,24 @@ IP and port where the service is actually bound.
Displays socket information for currently running applications
::

ID NODEID APPID INODE PROTO FLAGS BINDIP BACKLOG
---------------------------------------------------------------------------------------
4daa64c4-2091-46e0-8a67-5428fae9775d node1 f00001bb 829 tcp 0 0.0.0.0:6000 1
f6dd4f27-bb4e-4c4a-a076-dc07c29af7be node1 f000028e 833 tcp 0 0.0.0.0:5201 5
ID NODEID APPID INODE PROTO FLAGS BINDIP BACKLOG
----------------------------------------------------------------------------------------------------
4daa64c4-2091-46e0-8a67-5428fae9775d node1 f00001bb 829 tcp 0 0.0.0.0:6000 1
f6dd4f27-bb4e-4c4a-a076-dc07c29af7be node1 f000028e 833 tcp 0 0.0.0.0:5201 5


``ax show proxies``
-------------------

TODO
Displays current proxies. Example listing is off a node configured to be
a federation gateway node (see :ref:`federation-label` for details).
::

ID PROTO LISTENER DIALERS
--------------------------------------------
1 tcp 10.0.0.10:6660 [0.0.0.0:0]
2 tcp 192.168.0.10:36869 [0.0.0.0:0]


Create
======
Expand Down

0 comments on commit 41dedcb

Please sign in to comment.