-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39057/
-----------------------------------------------------------

Review request for Aurora, Kevin Sweeney and Zameer Manji.


Bugs: AURORA-1504
    https://issues.apache.org/jira/browse/AURORA-1504


Repository: aurora


Description
-------

1. Moves "metadata" into Job schema and out of AuroraConfig so that metadata 
from bindings is saved/loaded from .json output.
2. Adds "config read" command that accepts same format as job create/inspect 
etc.

This makes it simpler to build sensible deployment pipelines with binding 
helpers.  Take an .aurora or .json config, "compile" it by making all bindings 
concrete, check into a vcs, use for diff if necessary, deploy/rollback from 
json without losing metadata.


Diffs
-----

  .gitignore 6c37128b5d02b0e52eb467be3652a37b10d7bc06 
  src/main/python/apache/aurora/client/cli/config.py 
73b556266183bf17463881b87cda107d07d79d71 
  src/main/python/apache/aurora/config/__init__.py 
665e2cd08d4146e652b13bb82e04680315a1eebe 
  src/main/python/apache/aurora/config/schema/base.py 
398f737bed9ef02ce4a5636896d6587bce26501e 
  src/main/python/apache/aurora/config/thrift.py 
b40a7fdfa63eaf18d9a85f62eec5aa717a7e7d91 
  src/test/python/apache/aurora/config/test_thrift.py 
1bd745964b45b30014cabbef89949ac6221f148b 

Diff: https://reviews.apache.org/r/39057/diff/


Testing
-------

# build
mba=aurora=; ./pants binary src/main/python/apache/aurora/client:aurora

# list configs
mba=aurora=; dist/aurora.pex config list examples/jobs/hello_world.aurora 
jobs=[devcluster/www-data/prod/hello]

# write to disk
mba=aurora=; dist/aurora.pex config read devcluster/www-data/prod/hello 
examples/jobs/hello_world.aurora > /tmp/hello_world.json

# edit file to change command, ram
mba=aurora=; joe example/jobs/hello_world.aurora

# compare
mba=aurora=; diff <(dist/aurora.pex config read devcluster/www-data/prod/hello 
examples/jobs/hello_world.aurora) /tmp/hello_world.json 

    44c44
    <                 "cmdline": "\n    while true; do\n      echo hello world 
with twice as much ram\n      sleep 10\n    done\n  ", 
    ---
    >                 "cmdline": "\n    while true; do\n      echo hello 
world\n      sleep 10\n    done\n  ", 
    56c56
    <             "ram": 268435456
    ---
    >             "ram": 134217728

# submit
mba=aurora=; aurora update start --read-json devcluster/www-data/prod/hello 
/tmp/hello_world.json


Thanks,

Brian Wickman

Reply via email to