{"action":"created","issue":{"url":"https://api.github.com/repos/projectatomic/atomicapp/issues/310","labels_url":"https://api.github.com/repos/projectatomic/atomicapp/issues/310/labels{/name}","comments_url":"https://api.github.com/repos/projectatomic/atomicapp/issues/310/comments","events_url":"https://api.github.com/repos/projectatomic/atomicapp/issues/310/events","html_url":"https://github.com/projectatomic/atomicapp/issues/310","id":110934151,"number":310,"title":"Saving atomicapp run config for reuse during stop","user":{"login":"rtnpro","id":231684,"avatar_url":"https://avatars.githubusercontent.com/u/231684?v=3","gravatar_id":"","url":"https://api.github.com/users/rtnpro","html_url":"https://github.com/rtnpro","followers_url":"https://api.github.com/users/rtnpro/followers","following_url":"https://api.github.com/users/rtnpro/following{/other_user}","gists_url":"https://api.github.com/users/rtnpro/gists{/gist_id}","starred_url":"https://api.github.com/users/rtnpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtnpro/subscriptions","organizations_url":"https://api.github.com/users/rtnpro/orgs","repos_url":"https://api.github.com/users/rtnpro/repos","events_url":"https://api.github.com/users/rtnpro/events{/privacy}","received_events_url":"https://api.github.com/users/rtnpro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-12T09:01:44Z","updated_at":"2015-10-12T12:51:08Z","closed_at":null,"body":"# Problem statement\r\n\r\nCurrently, whenever we try to run a nulecule application using atomicapp, it tries to read configuration data from ``answers.conf`` if specified/available. During run, when it discovers, params with missing values, it asks the users for data, and runs the nulecule application. But, it does not save the data asked from the user for reuse during ``stop``. So, ``stop`` command for stopping a ``nulecule`` application, again asks the user to enter values for params with missing values in ``answers.conf``.\r\n\r\n# Proposed solution\r\n\r\nWe can save the config used for running the ``nulecule`` app somewhere for reuse. Now, how and where we save this config data generated during runtime is a matter of discussion. I will discuss multiple ways that come to my mind with pros and cons for each of them:\r\n\r\n1. Write generated config (data from answers.conf and user input) data implicitly to ``answers.conf``, if ``--write-answers`` is not specified. This approach is very simple to implement, however, the downside to this is that, we are editing user data implicitly. When a user has specified ``--write-answers`` to write the runtime config data to a file, it's highly probable that the user is going to use the output answers data in subsequent runs. But, if he has written the answers output to a file other than ``answers.conf``, the user needs to explicitly mention the name of the output file against ``-a`` arg to use it for stopping the nulecule application. Not that user friendly, is it? This brings me to my second proposed solution.\r\n\r\n1. We can use a file like ``.atomicapprc`` to store runtime config and use it to compliment ``ANSWERS`` data. The downside is that it will add another layer of complexity to the code, but will make usability much simpler. Most applications do it this way, i.e. having local ``*rc`` files."},"comment":{"url":"https://api.github.com/repos/projectatomic/atomicapp/issues/comments/147388896","html_url":"https://github.com/projectatomic/atomicapp/issues/310#issuecomment-147388896","issue_url":"https://api.github.com/repos/projectatomic/atomicapp/issues/310","id":147388896,"user":{"login":"vpavlin","id":4759808,"avatar_url":"https://avatars.githubusercontent.com/u/4759808?v=3","gravatar_id":"","url":"https://api.github.com/users/vpavlin","html_url":"https://github.com/vpavlin","followers_url":"https://api.github.com/users/vpavlin/followers","following_url":"https://api.github.com/users/vpavlin/following{/other_user}","gists_url":"https://api.github.com/users/vpavlin/gists{/gist_id}","starred_url":"https://api.github.com/users/vpavlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpavlin/subscriptions","organizations_url":"https://api.github.com/users/vpavlin/orgs","repos_url":"https://api.github.com/users/vpavlin/repos","events_url":"https://api.github.com/users/vpavlin/events{/privacy}","received_events_url":"https://api.github.com/users/vpavlin/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T12:51:08Z","updated_at":"2015-10-12T12:51:08Z","body":"I am definitely in favour of saving the data provided by user by default - `answers.conf.gen` ?\r\n\r\nBut I don't really understand how would `.atomicapprc` file work. Where would it be written?"}}