Skip to content

Commit

Permalink
Document Simplified install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinesh Subhraveti committed Jun 11, 2018
1 parent 972cf11 commit 50b9304
Showing 1 changed file with 22 additions and 57 deletions.
79 changes: 22 additions & 57 deletions install.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
=========================
Install and Configuration
=========================
==============================
Installation and Configuration
==============================

.. _install:

Running the AppSwitch docker image will start the ``ax`` daemon and also copy
the binary onto the host at ``/usr/bin/ax``. No further installation is
required.
AppSwitch client and daemon are both built as a statically linked binary (``ax``) that has no external dependencies. It's packaged into a docker image for convenience. Installation of binary (copying to /usr/bin) and bringing up of the daemon can be done by running the following comamnd:
::

curl -L http://appswitch.io/docker-compose.yaml | docker-compose -f - up -d

Running the Daemon
==================

It can be convenient to run the AppSwitch daemon in a container using
``docker-compose``. Here is an example docker-compose file
It runs the latest release of AppSwitch docker image through a docker-compose file. The compose file includes most common configuration options as environment variables. Additional options can be passed through AX_OPTS.
::

#
# docker-compose file AppSwitch Daemon
#
# Bring up with:
# docker-compose up -d appswitch
#

version: '2.3'

volumes:
Expand All @@ -32,52 +36,13 @@ It can be convenient to run the AppSwitch daemon in a container using
- /dev:/dev
- /var/run/appswitch:/var/run/appswitch
- appswitch_logs:/var/log
env_file:
- ${AX_CONFIG_FILE:-ax.config}

test:
image: python:alpine
entrypoint: /usr/bin/ax run --name test
command: python -m http.server
privileged: true
networks: []
volumes:
- /usr/bin:/usr/bin
- /var/run/appswitch:/var/run/appswitch
depends_on:
- appswitch


As indicated in this docker-compose file the AppSwitch daemon can be
passed a config file by either setting an environment variable
``AX_CONFIG_FILE`` or placing the configuration options in a file called
``ax.config`` in the same directory as the docker-compose file above.

(You only need the ``/dev`` volume if you are using the kernel driver.)

The configuration file consists of environment variable definitions.
::

# AppSwitch configuration file template.
#
# Copy to ax.config or set AX_CONFIG_FILE within your environment.

# Syscall forwarding driver
AX_DRIVER=user

# Cluster config options.
AX_NODE_INTERFACE=
AX_NEIGHBORS=

# Federation config options.
AX_CLUSTER=
AX_FEDERATION_GATEWAY_IP=
AX_FEDERATION_GATEWAY_NEIGHBORS=

# Additional options
# APPSWITCH_OPTS=--clean --dns-domain=local.appswitch
APPSWITCH_OPTS=--clean
environment:
- AX_DRIVER=user # Syscall forwarding driver
- AX_NODE_INTERFACE= # Node interface to use by daemon. Accepts IP address or interface name, eg eth0
- AX_NEIGHBORS= # List (csv) of IP addresses of cluster neighbors
- AX_CLUSTER= # Cluster name. Required if cluster is part of a federation
- AX_FEDERATION_GATEWAY_IP= # IP address or `interface` name for federation connectivity
- AX_FEDERATION_GATEWAY_NEIGHBORS= # List (`csv`) of IP addresses of federation neighbors (other gateway nodes)
- AX_OPTS=--clean # Remove any saved state from previous sessions


Of course you can just run the daemon from the command line if you prefer
but then you will need to pass all configuration options on the command line.

0 comments on commit 50b9304

Please sign in to comment.