F5 Container Integrations v1.1

Current Page

Application Services Proxy

Cloud Foundry

Kubernetes

Mesos Marathon

OpenShift

Support

Troubleshooting

Tutorials

Cloud Docs Home > F5 Container Integrations Index

Install the F5 ASP Controller for Marathon

The F5 ASP Controller for Marathon installs as a Marathon Application. You can do so via the Marathon REST API, or via the Marathon Web Interface.

Initial Setup

Before you can use the Application Services Proxy, you must complete the following tasks:

  1. Accept the Terms of Service in Docker Store.

  2. Set up Marathon to use a private Docker registry.

Deploy the F5 ASP Controller for Marathon using the Marathon REST API

  1. Create a JSON config file defining the default Marathon ASP configuration labels.

    Tip

    Be sure to include "ASP_DEFAULT_URIS": "<docker-config-file-URI>" in the App definition. Otherwise, Marathon won’t be able to pull the ASP image from Docker Store.

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    {
      "id": "/marathon-asp-ctlr",
      "cpus": 1,
      "mem": 128,
      "instances": 1,
      "container": {
        "type": "DOCKER",
        "docker": {
          "image": "f5networks/marathon-asp-ctlr:1.0.0",
          "network": "BRIDGE",
          "forcePullImage": true,
          "privileged": false,
          "portMappings": []
        },
        "volumes": []
      },
      // defines the global ASP configurations
      "env": {
        "MARATHON_URL": "http://10.190.25.75:8080",
        // ASP image
        "ASP_DEFAULT_CONTAINER": "store/f5networks/asp:1.0.0",
        // defines the label you will use in App definitions to activate the ASP
        "ASP_ENABLE_LABEL": "f5-asp",
        // provide the location where credentials for Docker Store can be found
        // REQUIRED TO PULL THE ASP IMAGE
        "ASP_DEFAULT_URIS": "file:///etc/docker.tar.gz",
        "ASP_DEFAULT_CPU": "1",
        "ASP_DEFAULT_MEM": "256",
        "ASP_DEFAULT_LOG_LEVEL": "debug",
        "ASP_DEFAULT_STATS_FLUSH_INTERVAL": "10000",
        // include if sending stats to an external service
        "ASP_DEFAULT_STATS_URL": "http://<splunk_url>:8088",
        "ASP_DEFAULT_STATS_TOKEN": "<provide_stats_auth_token>",
        "ASP_DEFAULT_STATS_BACKEND": "splunk"
      }
    }
    

    f5-marathon-asp-ctlr-example.json

  2. Upload the config file to the Marathon API server.

    1
    user@mesos-master:~$ curl -X POST -H "Content-Type: application/json" http://10.190.25.75:8080/v2/apps -d @f5-marathon-asp-ctlr.json
    

Verify creation

Send a GET request to the Marathon API server to verify successful creation of the ASP Controller App.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
user@mesos-master:~$ curl -X GET http://10.190.25.75:8080/v2/apps/marathon-asp-ctlr | jq .
{
   "app": {
      "id": "/marathon-asp-ctlr",
      "cmd": null,
      "args": null,
      "user": null,
      "env": {
         "ASP_DEFAULT_MEM": "256",
         "MARATHON_URL": "http://10.190.25.75:8080",
         "ASP_DEFAULT_CONTAINER": "store/f5networks/asp:1.0.0",
         "ASP_DEFAULT_URIS": "file:///etc/docker.tar.gz",
         "ASP_DEFAULT_STATS_FLUSH_INTERVAL": "10000",
         "ASP_DEFAULT_CPU": "1",
         "ASP_ENABLE_LABEL": "f5-asp",
         "ASP_DEFAULT_LOG_LEVEL": "debug"
      },
      "instances": 1,
      "cpus": 1,
      "mem": 128,
      "disk": 0,
      "executor": "",
      "constraints": [],
      "uris": [],
      "fetch": [],
      "storeUrls": [],
      "ports": [],
      "requirePorts": false,
      "backoffSeconds": 1,
      "backoffFactor": 1.15,
      "maxLaunchDelaySeconds": 3600,
      "container": {
         "type": "DOCKER",
         "volumes": [],
         "docker": {
            "image": "f5networks/marathon-asp-ctlr:master",
            "network": "BRIDGE",
            "privileged": false,
            "parameters": [],
            "forcePullImage": true
         }
      },
      "healthChecks": [],
      "dependencies": [],
      "upgradeStrategy": {
         "minimumHealthCapacity": 1,
         "maximumOverCapacity": 1
      },
      "labels": {},
      "acceptedResourceRoles": null,
      "ipAddress": null,
      "version": "2017-02-23T17:51:50.608Z",
      "versionInfo": {
         "lastScalingAt": "2017-02-23T17:51:50.608Z",
         "lastConfigChangeAt": "2017-02-23T17:51:50.608Z"
      },
      "tasksStaged": 0,
      "tasksRunning": 1,
      "tasksHealthy": 0,
      "tasksUnhealthy": 0,
      "deployments": [],
      "tasks": [{
         "id": "marathon-asp-ctlr.c0fd94aa-f9f0-11e6-b795-fa163eb3c6bc",
         "host": "172.16.1.11",
         "ipAddresses": [],
         "ports": [],
         "startedAt": "2017-02-23T17:52:06.982Z",
         "stagedAt": "2017-02-23T17:51:50.669Z",
         "version": "2017-02-23T17:51:50.608Z",
         "slaveId": "28f24575-ca18-4e99-a2fb-a64544c0c67c-S0",
         "appId": "/marathon-asp-ctlr"
      }]
   }
}