Giter Site home page Giter Site logo

marathon-resource's Introduction

Marathon Resource

Build Status Coverage Status Code Climate License Go Report Card Docker Pulls

A Concourse resource to deploy applications to Marathon.

Source Configuration

  • app_id: Required. The name of your app in Marathon.

  • uri: Required. The URI of the Marathon instance you wish to deploy to.

  • basic_auth: Optional. Use if you are using HTTP Basic Auth to protect your Marathon instance. Takes user_name and password

  • api_token: Optional. Use if you are using DC/OS and need to set an HTTP API token.

Behavior

check: Extract versions of an app from Marathon.

Returns a list of any versions greater than or equal the last know version of the app defined by app_id.

in: Fetch data about the current version of an app.

Returns JSON description of the current running version of the app.

Parameters

None.

out: Deploy an app to Marathon.

Given a JSON file specified by app_json, post it to Marathon to deploy the app. The resource will cancel the deployment if its not successful after time_out.

Parameters

  • app_json: Required. Path to the JSON file describing your marathon app. For more information about the format see the Marathon docs.

  • time_out: Required. How long, in seconds, to wait for Marathon to deploy the app. Timed out deployments will roll back and fail the job.

  • replacements: Optional. A name/value list of templated strings in the app.json to replace during the deploy. Useful for things such as passwords or urls that change.

  • replacement_files: Optional. Similar to replacements except value is a path to a file who's content will be used in the replace.

  • restart_if_no_update: Optional. If Marathon doesn't detect any change in your app.json it won't deploy a new version. Setting this to true will restart an existing app causing a new version. Default is false.

Example Configuration

Resource type

- name: marathon
  type: docker-image
  source:
    repository: ckaznocha/marathon-resource

Resource

- name: marathon_app
  type: marathon
  source:
    app_id: my_app
    uri: http://my-marathon.com/
    basic_auth:
      user_name: my_name
      password: {{ marathon_password }}

Plan

- get: marathon_app
- put: marathon_app
  params:
    app_json: path/to/app.json
    time_out: 10
    replacements:
    - name: db_password
      value: {{ db_password }}
    - name: db_url
      value: {{ db_url }}

Contributing

See the CONTRIBUTING file.

License

See LICENSE file

marathon-resource's People

Contributors

ckaznocha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.