-
Notifications
You must be signed in to change notification settings - Fork 70
Refactor nulecule base [Fixes #145] #278
Refactor nulecule base [Fixes #145] #278
Conversation
atomicapp/nulecule/__init__.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just this morning a little picky... "an Application compliant with the Nulecule Specification" ;)
|
Hmm..you are quick, guys:) I put this together yesterday: https://gist.github.com/vpavlin/f46444efd647e0d8a48f Maybe I missed some discussion, so if that's the case, can we reiterate on it? Or if that didn't happen, can I have one, please?:) |
atomicapp/nulecule/__init__.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about moving this to load(), or moving load_components() out of load ?
|
@aweiteka Yes, I think this is going into the right direction:) |
|
|
|
👍 on the docker-py, if we decide to use that we can interact with the docker commands more programatically. although this does add another dependancy... @goern thoughts? |
|
|
|
|
|
@rtnpro nice work! LGTM |
|
Few questions,
|
atomicapp/nulecule/__init__.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is /var/atomicapp doesn't exist? fails?
|
@rtnpro can you rebase too so I can git clone your branch and test it :) |
fa2aa73 to
783940c
Compare
|
@charliedrage I just rebased the branch :) |
|
On Wed, Oct 7, 2015 at 6:20 PM, Charlie Drage notifications@github.com wrote:
Yes, of course, and I will start to work on it, to wire up this new
It is, indeed. Python suggests use of |
|
@charliedrage ^^ |
783940c to
dd0e7be
Compare
|
|
|
@rtnpro Code is more readable now :) |
atomicapp/constants.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it /var/lib/atomicapp, please:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Running a Nulecule application now generates a file named "answers.conf.gen" in the application directory, which contains all config data (answers + user input) used to run the application. The same data is loaded and used to stop the application without asking the user for any input.
- use 'in' to find a char in string rather than str.find - strip of 'docker://' prefix in source image name using Utils.getSourceImage - Update CACHE_DIR to '/var/lib/atomicapp'
- added docs - added logs - fixed dry-run, nodeps argument handling
- Fix generating paths for rendered artifacts, to feed to provider - Prevent deploying external application multipled times.
If at all it is needed to copy a Nulecule application directory to another path, when --destination option is provided in atomicapp install command, then the caller will copy the application directory to the destination first, and then call Nulecule.load_from_path to load the Nulecule application from the destination path.
and fix 'ask' option for load_config as well. This commit allows us to load_config parameters for the entire nulecule application during install and dumping it to answers.conf.sample without prompting the user for any input.
2501bad to
54bf04c
Compare
|
Rebased! |
|
Ok this has been incorporated in https://github.com/projectatomic/atomicapp/commits/cdk2-beta3-rc1 I'm going to lock comments here.. new things can go into issues/PRs to https://github.com/projectatomic/atomicapp/commits/cdk2-beta3-rc1. |
This includes initial work on refactoring Nulecule base code, as discussed in #145 .