Skip to content

Commit

Permalink
Fix install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinesh Subhraveti committed Jun 10, 2018
1 parent 972cf11 commit a15df7d
Showing 1 changed file with 34 additions and 62 deletions.
96 changes: 34 additions & 62 deletions install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,80 +4,52 @@ Install 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.

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.

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
The daemon can be conveniently brought up with this ``docker-compose.yaml``. Most common configuration options are included and explained in the file. 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.
::

version: '2.3'

volumes:
appswitch_logs:

services:
appswitch:
image: appswitch/ax
pid: "host"
network_mode: "host"
privileged: true
volumes:
- /usr/bin:/usr/bin
- /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
#
# docker-compose file AppSwitch Daemon
#
# Bring up with:
# docker-compose up -d appswitch
#

version: '2.3'

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.
volumes:
appswitch_logs:

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

The configuration file consists of environment variable definitions.
services:
appswitch:
image: appswitch/ax
pid: "host"
network_mode: "host"
privileged: true
volumes:
- /usr/bin:/usr/bin
- /dev:/dev
- /var/run/appswitch:/var/run/appswitch
- appswitch_logs:/var/log
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


The daemon can be brought up by running:
::

# 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=
docker-compose up -d appswitch

# 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


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 a15df7d

Please sign in to comment.