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 BIG-IP Controller for Marathon

The BIG-IP Controller for Marathon installs as a Marathon Application. You can do this via the Marathon REST API, or via the Marathon Web Interface.

Initial Setup

  1. Set up authentication to your secure DC/OS cluster.
  2. Create a new partition for Marathon on your BIG-IP device. The BIG-IP Controller for Marathon cannot manage objects in the /Common partition.

Launch the BIG-IP Controller App using the Marathon REST API

  1. Create a JSON config file containing the required configuration parameters.

     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
    // REMOVE ALL COMMENTS FROM THIS FILE BEFORE USING
    {
      "id": "marathon-bigip-ctlr",
      "cpus": 0.5,
      "mem": 64.0,
      "instances": 1,
      "container": {
        "type": "DOCKER",
        "docker": {
          // replace the version as needed
          "image": "f5networks/marathon-bigip-ctlr:1.1.0",
          "network": "BRIDGE"
        }
      },
      "env": {
        "MARATHON_URL": "http://10.190.25.75:8080",
        "F5_CC_PARTITIONS": "mesos",
        "F5_CC_BIGIP_HOSTNAME": "10.190.25.80",
        "F5_CC_BIGIP_USERNAME": "admin",
        "F5_CC_BIGIP_PASSWORD": "admin",
        // Mesos DC/OS Enterprise Authentication
        "F5_CC_DCOS_AUTH_CREDENTIALS": "{ \"scheme\": \"RS256\", \"uid\": \"my-dcos-account\", \"login_endpoint\": \"https://10.190.25.75:8080/acs/api/v1/auth/login\", \"private_key\": \"<my-private_key-string>\" }",
        "F5_CC_MARATHON_CA_CERT": "<marathon_ca_cert>"
        // Mesos DC/OS Open oath authentication
        "F5_CC_DCOS_AUTH_TOKEN": "<authentication-token>"
      }
    }
    

    f5-marathon-bigip-ctlr-example.json

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

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    user@mesos-master:~$ curl -X POST -H "Content-Type: application/json" //
    http://10.190.25.75:8080/v2/apps -d @marathon-bigip-ctlr.json
    {"id": "/marathon-bigip-ctlr","cmd": null,"args": null,"user": null, //
    "env":{"MARATHON_URL": "http://10.190.25.75:8080","F5_CC_BIGIP_PASSWORD": "admin", //
    "F5_CC_BIGIP_USERNAME": "admin","F5_CC_BIGIP_HOSTNAME": "10.190.25.80", //
    "F5_CC_PARTITIONS": "mesos"},"instances": 1,"cpus": 0.5,"mem": 64, //
    "disk": 0,"executor": "","constraints": [],"uris": [],"fetch": [], //
    "storeUrls": [],"ports": [0],"requirePorts": false,"backoffSeconds": 1, //
    "backoffFactor": 1.15,"maxLaunchDelaySeconds": 3600,"container":{"type": "DOCKER", //
    "volumes": [],"docker": {"image": "f5networks/marathon-bigip-ctlr:1.0.0", //
    "network": "BRIDGE","privileged": false,"parameters": [],"forcePullImage": false}}, //
    "healthChecks": [],"dependencies": [],"upgradeStrategy": {"minimumHealthCapacity": 1, //
    "maximumOverCapacity": 1},"labels": {},"acceptedResourceRoles": null, //
    "ipAddress": null,"version": "2017-02-21T18:46:19.589Z","tasksStaged": 0, //
    "tasksRunning": 0,"tasksHealthy": 0,"tasksUnhealthy": 0,"deployments":  //
    [{"id": "56b6356d-65ac-478c-aa86-9b3480bd0df4"}],"tasks": []}
    

Verify creation

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

user@mesos-master:~$ curl -X GET http://10.190.25.75:8080/v2/apps/marathon-bigip-ctlr
{"app":{"id":"/marathon-bigip-ctlr","cmd":null,"args":null,"user":null, //
"env":{"F5_CC_LOG_LEVEL":"DEBUG","MARATHON_URL":"http://10.190.25.75:8080", //
"F5_CC_BIGIP_PASSWORD":"admin","F5_CC_BIGIP_USERNAME":"admin", //
"F5_CC_BIGIP_HOSTNAME":"10.190.25.80","F5_CC_PARTITIONS":"mesos"}, //
"instances":1,"cpus":0.5,"mem":64,"disk":0,"executor":"","constraints":[], //
"uris":[],"fetch":[],"storeUrls":[],"ports":[10000],"requirePorts":false, //
"backoffSeconds":1,"backoffFactor":1.15,"maxLaunchDelaySeconds":3600, //
"container":{"type":"DOCKER","volumes":[],"docker":{"image":"f5networks/marathon-bigip-ctlr:master", //
"network":"BRIDGE","privileged":false,"parameters":[],"forcePullImage":false}}, //
"healthChecks":[],"dependencies":[],"upgradeStrategy":{"minimumHealthCapacity":1, //
"maximumOverCapacity":1},"labels":{},"acceptedResourceRoles":null,"ipAddress":null, //
"version":"2017-02-21T20:49:53.630Z","versionInfo":{"lastScalingAt":"2017-02-21T20:49:53.630Z", //
"lastConfigChangeAt":"2017-02-21T20:49:53.630Z"},"tasksStaged":0,"tasksRunning":1, //
"tasksHealthy":0,"tasksUnhealthy":0,"deployments":[],"tasks":[ //
{"id":"marathon-bigip-ctlr.4bfb0f85-f877-11e6-b795-fa163eb3c6bc","host":"172.16.1.11", //
"ipAddresses":[],"ports":[11467],"startedAt":"2017-02-21T20:49:54.925Z", //
"stagedAt":"2017-02-21T20:49:54.092Z","version":"2017-02-21T20:49:53.630Z"  //
"slaveId":"28f24575-ca18-4e99-a2fb-a64544c0c67c-S0","appId":"/marathon-bigip-ctlr"}], //
"lastTaskFailure":{}}}