The Mesosphere Universe package repository.
HTML Python Other
Latest commit 750d893 Feb 23, 2017 @mesosphere-ci mesosphere-ci committed with mohitsoni Release kafka 1.1.19-0.10.1.0 (automated commit) (#976)
Changes since revision 37:
0 files added: []
0 files removed: []
4 files changed:

```
--- 37/command.json
+++ 38/command.json
@@ -1,5 +1,5 @@
 {
   "pip": [
-    "https://downloads.mesosphere.com/kafka/assets/1.1.18-0.10.1.0/bin_wrapper-0.0.1-py2.py3-none-any.whl"
+    "https://downloads.mesosphere.com/kafka/assets/1.1.19-0.10.1.0/bin_wrapper-0.0.1-py2.py3-none-any.whl"
   ]
 }
--- 37/marathon.json.mustache
+++ 38/marathon.json.mustache
@@ -3,7 +3,7 @@
   "cpus": 1.0,
   "mem": 1230,
   "instances": 1,
-  "cmd": "export PATH=$(ls -d $MESOS_SANDBOX/jre*/bin):$PATH && ./scheduler/bin/kafka-scheduler server ./scheduler/conf/scheduler.yml",
+  "cmd": "export LD_LIBRARY_PATH=$MESOS_SANDBOX/libmesos-bundle/lib:$LD_LIBRARY_PATH && export MESOS_NATIVE_JAVA_LIBRARY=$(ls $MESOS_SANDBOX/libmesos-bundle/lib/libmesos-*.so) && export PATH=$(ls -d $MESOS_SANDBOX/jre*/bin):$PATH && ./scheduler/bin/kafka-scheduler server ./scheduler/conf/scheduler.yml",
   "labels": {
     "DCOS_PACKAGE_FRAMEWORK_NAME": "{{service.name}}",
     "DCOS_MIGRATION_API_VERSION": "v1",
@@ -15,6 +15,7 @@
   },
   "env": {
     "LD_LIBRARY_PATH": "/opt/mesosphere/lib",
+    "JAVA_HOME":"./jre1.8.0_121",
     "FRAMEWORK_NAME": "{{service.name}}",
     "FRAMEWORK_PRINCIPAL": "{{service.principal}}",
     "USER": "{{service.user}}",
@@ -139,7 +140,7 @@
     "KAFKA_OVERRIDE_COMPRESSION_TYPE": "{{kafka.compression_type}}"
     {{#service.secret_name}}
     ,"DCOS_SERVICE_ACCOUNT_CREDENTIAL": { "secret": "serviceCredential" },
-    "MESOS_MODULES": "file:///opt/mesosphere/etc/mesos-scheduler-modules/dcos_authenticatee_module.json",
+    "MESOS_MODULES": "{\"libraries\": [{\"file\": \"libdcos_security.so\", \"modules\": [{\"name\": \"com_mesosphere_dcos_ClassicRPCAuthenticatee\"}]}]}",
     "MESOS_AUTHENTICATEE": "com_mesosphere_dcos_ClassicRPCAuthenticatee"
     {{/service.secret_name}}
   },
@@ -153,7 +154,8 @@
   "uris": [
     "{{resource.assets.uris.jre-tar-gz}}",
     "{{resource.assets.uris.scheduler-zip}}",
-    "{{resource.assets.uris.kafka_tgz}}"
+    "{{resource.assets.uris.kafka_tgz}}",
+    "{{resource.assets.uris.libmesos-bundle-tar-gz}}"
   ],
   "healthChecks": [
     {
--- 37/package.json
+++ 38/package.json
@@ -13,5 +13,5 @@
     "broker",
     "pubsub"
   ],
-  "version": "1.1.18-0.10.1.0"
+  "version": "1.1.19-0.10.1.0"
 }
--- 37/resource.json
+++ 38/resource.json
@@ -3,9 +3,10 @@
     "uris": {
       "jre-tar-gz": "https://downloads.mesosphere.com/java/jre-8u121-linux-x64.tar.gz",
       "kafka_tgz": "https://downloads.mesosphere.com/kafka/assets/kafka_2.11-0.10.1.0.tgz",
-      "scheduler-zip": "https://downloads.mesosphere.com/kafka/assets/1.1.18-0.10.1.0/scheduler.zip",
-      "executor-zip": "https://downloads.mesosphere.com/kafka/assets/1.1.18-0.10.1.0/executor.zip",
-      "overrider-zip": "https://downloads.mesosphere.com/kafka/assets/1.1.18-0.10.1.0/overrider.zip"
+      "scheduler-zip": "https://downloads.mesosphere.com/kafka/assets/1.1.19-0.10.1.0/scheduler.zip",
+      "executor-zip": "https://downloads.mesosphere.com/kafka/assets/1.1.19-0.10.1.0/executor.zip",
+      "overrider-zip": "https://downloads.mesosphere.com/kafka/assets/1.1.19-0.10.1.0/overrider.zip",
+      "libmesos-bundle-tar-gz": "https://downloads.mesosphere.com/libmesos-bundle/libmesos-bundle-1.9-argus-1.1.x-3.tar.gz"
     }
   },
   "images": {
@@ -17,23 +18,23 @@
     "binaries":{
       "darwin":{
         "x86-64":{
-          "contentHash":[ { "algo":"sha256", "value":"65872d25477b8cd729909a5e6087f56fd900d322af07ae5926a8389cce505d9b" } ],
+          "contentHash":[ { "algo":"sha256", "value":"660f143852b6d3d2b0b2f787fab9e5e2927f4440502a89c9e1c08488cdacc34f" } ],
           "kind":"executable",
-          "url":"https://downloads.mesosphere.com/kafka/assets/1.1.18-0.10.1.0/dcos-kafka-darwin"
+          "url":"https://downloads.mesosphere.com/kafka/assets/1.1.19-0.10.1.0/dcos-kafka-darwin"
         }
       },
       "linux":{
         "x86-64":{
-          "contentHash":[ { "algo":"sha256", "value":"682f76cc155413ebe49154114bbf3d1a5840932bcd51dc7080516065323e9dbf" } ],
+          "contentHash":[ { "algo":"sha256", "value":"0b26409c9760fd4d75fca1114d01f25ec069147d578d6f337c88424ebc64c808" } ],
           "kind":"executable",
-          "url":"https://downloads.mesosphere.com/kafka/assets/1.1.18-0.10.1.0/dcos-kafka-linux"
+          "url":"https://downloads.mesosphere.com/kafka/assets/1.1.19-0.10.1.0/dcos-kafka-linux"
         }
       },
       "windows":{
         "x86-64":{
-          "contentHash":[ { "algo":"sha256", "value":"59b3eec12870fcc5a59b5724f5bbdd755eef1bc5b23eef5e8bcb50f8549160dc" } ],
+          "contentHash":[ { "algo":"sha256", "value":"60d6f802412b94833cf8db217af162e7dc35c0f5e0a1eb4b587268c361500c3b" } ],
           "kind":"executable",
-          "url":"https://downloads.mesosphere.com/kafka/assets/1.1.18-0.10.1.0/dcos-kafka.exe"
+          "url":"https://downloads.mesosphere.com/kafka/assets/1.1.19-0.10.1.0/dcos-kafka.exe"
         }
       }
     }
```

README.md

Mesosphere Universe

Build Status
CI Build Status
Universe Server Build Status

Mesosphere Universe registry of packages made available for DC/OS Clusters.

Table of Contents

Universe Purpose

This git repo facilitates three necessary functions to publish, store and consume packages.

Publish a Package

To publish a package to Universe, fork this repo and open a Pull Request. A set of automated builds will be run against the Pull Request to ensure the modifications made in the PR leave the Universe well formed. See Creating a Package for details.

Registry of Packages

The registry of published packages is maintained as the contents of this repo in the repo/packages directory. As of repository version 3.0 multiple packaging versions are allowed to co-exist in the same repository. Validation of packages are coordinated based on the packaging version defined in package.json.

Repository Consumption

In order for published packages to be consumed and installed in a DC/OS Cluster the Universe Server needs to be built and run in a location accessible by the DC/OS Cluster. See Universe Server for details on building the Universe artifacts and Server.

Publish a Package

Creating a Package

Each package has its own directory, with one subdirectory for each package revision. Each package revision directory contains the set of files necessary to create a consumable package that can be used by a DC/OS Cluster to install the package.

└── repo/package/F/foo
    ├── 0
    │   ├── command.json
    │   ├── config.json
    │   ├── marathon.json.mustache
    │   ├── resource.json
    │   └── package.json
    ├── 1
    │   ├── command.json
    │   ├── config.json
    │   ├── marathon.json.mustache
    │   ├── resource.json
    │   └── package.json
    └── ...

package.json

Packaging Version
2.0 required
3.0 required

Every package in Universe must have a package.json file which specifies the high level metadata about the package.

Currently, a package can specify one of two values for .packagingVersion either 2.0 or 3.0; which version is declared will dictate which other files are required for the complete package as well as the schema(s) all the files must adhere to. Below is a snippet that represents a version 2.0 package. See repo/meta/schema/package-schema.json for the full json schema outlining what properties are available for each corresponding version of a package.

{
  "packagingVersion": "2.0",
  "name": "foo",
  "version": "1.2.3",
  "tags": ["mesosphere", "framework"],
  "maintainer": "help@bar.io",
  "description": "Does baz.",
  "scm": "https://github.com/bar/foo.git",
  "website": "http://bar.io/foo",
  "framework": true,
  "postInstallNotes": "Have fun foo-ing and baz-ing!"
}

For the first version of the package, add this line to the beginning of preInstallNotes: This DC/OS Service is currently EXPERIMENTAL. There may be bugs, incomplete features, incorrect documentation, or other discrepancies. Experimental packages should never be used in production! It will be removed once the package has been tested and used by the community.

.minDcosReleaseVersion
Packaging Version
2.0 not supported
3.0 optional

Introduced in packagingVersion 3.0, .minDcosReleaseVersion can be specified as a property of package.json. When .minDcosReleaseVersion is specified the package will only be made available to DC/OS clusters with a DC/OS Release Version greater than or equal to (>=) the value specified.

For example, "minDcosReleaseVersion" : "1.8" will prevent the package from being installed on clusters older than DC/OS 1.8.

config.json

Packaging Version
2.0 optional
3.0 optional

This file describes the configuration properties supported by the package, represented as a json-schema. Each property can specify whether or not it is required, a default value, as well as some basic validation.

Users can then override specific values at installation time by passing an options file to the DC/OS CLI or by setting config values through the DC/OS UI (since DC/OS 1.7).

{
  "type": "object",
  "properties": {
    "foo": {
      "type": "object",
      "properties": {
        "baz": {
          "type": "integer",
          "description": "How many times to do baz.",
          "minimum": 0,
          "maximum": 16,
          "required": false,
          "default": 4
        }
      },
      "required": ["baz"]
    }
  },
  "required": ["foo"]
}

marathon.json.mustache

Packaging Version
2.0 required
3.0 optional

This file is a mustache template that when rendered will create a Marathon app definition capable of running your service.

Variables in the mustache template will be evaluated from a union object created by merging three objects in the following order:

  1. Defaults specified in config.json

  2. User supplied options from either the DC/OS CLI or the DC/OS UI

  3. The contents of resource.json

{
  "id": "foo",
  "cpus": "1.0",
  "mem": "1024",
  "instances": "1",
  "args": ["{{{foo.baz}}}"],
  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "{{resource.assets.container.docker.foo23b1cfe8e04a}}",
      "network": "BRIDGE",
      "portMappings": [
        {
          "containerPort": 8080,
          "hostPort": 0,
          "servicePort": 0,
          "protocol": "tcp"
        }
      ]
    }
  }
}

See the Marathon API Documentation for more detailed instruction on app definitions.

command.json

Packaging Version
2.0 optional
3.0 optional [Deprecated]

As of packagingVersion 3.0, command.json is deprecated in favor of the .cli property of resource.json. See CLI Resources for details.

Describes how to install the package's CLI via pip, the Python package manager. This document represents the format of a Pip requirements file where each element in the array is a line in the requirements file.

{
  "pip": [
    "https://pypi.python.org/packages/source/f/foo/foo-1.2.3.tar.gz"
  ]
}

resource.json

Packaging Version
2.0 optional
3.0 optional

This file contains all of the externally hosted resources (E.g. Docker images, HTTP objects and images) needed to install the application.

{
  "images": {
    "icon-small": "http://some.org/foo/small.png",
    "icon-medium": "http://some.org/foo/medium.png",
    "icon-large": "http://some.org/foo/large.png",
    "screenshots": [
      "http://some.org/foo/screen-1.png",
      "http://some.org/foo/screen-2.png"
    ]
  },
  "assets": {
    "uris": {
      "log4j-properties": "http://some.org/foo/log4j.properties"
    },
    "container": {
      "docker": {
        "23b1cfe8e04a": "some-org/foo:1.0.0"
      }
    }
  }
}
Docker Images

For the Docker image, please use the image ID for the referenced image. You can find this by pulling the image locally and running docker images some-org/foo:1.0.0.

Images

While images is an optional field, it is highly recommended you include icons and screenshots in resource.json and update the path definitions accordingly. Specifications are as follows:

  • icon-small: 48px (w) x 48px (h)
  • icon-medium: 96px (w) x 96px (h)
  • icon-large: 256px (w) x 256px (h)
  • screenshots[...]: 1200px (w) x 675px (h)

NOTE: To ensure your service icons look beautiful on retina-ready displays, please supply 2x versions of all icons. No changes are needed to resource.json - simply supply an additional icon file with the text @2x in the name before the file extension. For example, the icon icon-cassandra-small.png would have a retina-ready alternate image named icon-cassandra-small@2x.png.

CLI Resources
Packaging Version
2.0 not supported
3.0 optional

The new .cli property allows for a package to configure native CLI subcommands for several platforms and architectures.

{
  "cli":{
    "binaries":{
      "darwin":{
        "x86-64":{
          "contentHash":[
            { "algo": "sha256", "value": "..." }
          ],
          "kind": "executable",
          "url":"https://some.org/foo/1.0.0/cli/darwin/dcos-foo"
        }
      },
      "linux":{
        "x86-64":{
          "contentHash":[
            { "algo":"sha256", "value":"..." }
          ],
          "kind":"executable",
          "url":"https://some.org/foo/1.0.0/cli/linux/dcos-foo"
        }
      },
      "windows":{
        "x86-64":{
          "contentHash":[
            { "algo":"sha256", "value":"..." }
          ],
          "kind":"executable",
          "url":"https://some.org/foo/1.0.0/cli/windows/dcos-foo"
        }
      }
    }
  }
}

Submit your Package

Developers are invited to publish a package containing their DC/OS Service by submitting a Pull Request targeted at the version-3.x branch of this repo.

Full Instructions:

  1. Fork this repo and clone the fork:

    git clone https://github.com/<user>/universe.git /path/to/universe
  2. Ensure that the jsonschema command line tool is installed:

    sudo pip install jsonschema
  3. Run the verification and build script:

    scripts/build.sh
  4. Verify all build steps completed successfully

  5. Submit a pull request against the version-3.x branch with your changes. Every pull request opened will have a set of automated verifications run against it. These automated verification are reported against the pull request using the GitHub status API. All verifications must pass in order for a pull request to be eligible for merge.

  6. Respond to manual review feedback provided by the DC/OS Community.

    • Each Pull Request to Universe will also be manually reviewed by a member of the DC/OS Community. To ensure your package is able to be made available to users as quickly as possible be sure to respond to the feedback provided.
  7. Add a getting started example of how to install and use the DC/OS package. To add the example, fork the examples repo and send in a pull request. Re-use the format from the existing examples there.

Repository Consumption

In order for Universe to be consumed by DC/OS the build process needs to be run to create the Universe Server.

Universe Server

Universe Server is a new component introduce alongside packagingVersion 3.0. In order for Universe to be able to provide packages for many versions of DC/OS at the same time, it is necessary for a server to be responsible for serving the correct set of packages to a cluster based on the cluster's version.

All Pull Requests opened for Universe and the version-3.x branch will have their Docker image built and published to the DockerHub image mesosphere/universe-server. In the artifacts tab of the build results you can find docker/server/marathon.json which can be used to run the Universe Server for testing in your DC/OS cluster. For each Pull Request, click the details link of the "Universe Server Docker image" status report to view the build results.

Build Universe Server locally

  1. Validate and build the Universe artifacts

    scripts/build.sh
  2. Build the Universe Server Docker image

    DOCKER_TAG="my-package" docker/server/build.bash

    This will create a Docker image universe-server:my-package and docker/server/target/marathon.json on your local machine

  3. If you would like to publish the built Docker image, run

    DOCKER_TAG="my-package" docker/server/build.bash publish

Run Universe Server

Using the marathon.json that is created when building Universe Server we can run a Universe Server in our DC/OS Cluster which can then be used to install packages.

Run the following commands to configure DC/OS to use the custom Universe Server (DC/OS 1.8+):

dcos marathon app add marathon.json
dcos package repo add --index=0 dev-universe http://universe.marathon.mesos:8085/repo

For DC/OS 1.7, a different URL must be used:

dcos marathon app add marathon.json
dcos package repo add --index=0 dev-universe http://universe.marathon.mesos:8085/repo-1.7

Consumption Protocol

A DC/OS Cluster can be configured to point to multiple Universe Servers; each Universe Server will be fetched via HTTPS or HTTP. When a DC/OS Cluster attempts to fetch the package set from a Universe Server, the Universe Server will provide ONLY those packages which can be run on the cluster.

For example: A DC/OS 1.6.1 Cluster will only receive packages with a minDcosReleaseVersion less than or equal to (<=) 1.6.1 in the format the DC/OS Cluster expects.

 +----------------------+   +-----------------------+
 │public universe server│   │private universe server│
 +----------------------+   +-----------------------+
                http \         / http
                      \       /
                       \     /
                       +-----+           +--------+
                       │DC/OS│-----------│Marathon│
                       +-----+    http   +--------+

Supported DC/OS Versions

Currently Universe Server provides support for the following versions of DC/OS

DC/OS Release Version Support Level
1.6.1 Full Support
1.7 Full Support
1.8 Full Support
1.9 Full Support
1.10 Full Support