[Container-tools] "atomic projectatomic/helloapache" UX feedback

Václav Pavlín vpavlin at redhat.com
Thu May 21 05:44:43 UTC 2015


Hi Nick,

This is great! Thank you very much

On 21.5.2015 07:01, Nick Coghlan wrote:
> Since I got a new personal laptop recently that didn't have *any* of
> the container tech installed yet, I decided to take a look at the
> "What's the UX like when you do it wrong?" experience for the Nulecule
> helloapache app. System is running the F22 beta release.
>
> I also figure I only get one shot at being a complete Nulecule noob,
> so I may as well make the most of it :)
>
> I'm posting my observations here initially in order to get feedback on
> what's a bug, what's an RFE, and what I should just turn into a PR for
> the helloapache example (e.g. adding a "Prerequisites" section to its
> README)
>
> Example I'm (mostly) following:
> https://github.com/projectatomic/nulecule/tree/master/examples/helloapache
>
> 1. I took "yum install atomic" as implied. All good :)
>
> $ rpm -qa atomic
> atomic-0-0.7.gita7ff4cb.fc22.x86_64
>
> 2. "atomic run projectatomic/helloapache" fails cryptically and sudo
> doesn't help:
>
> $ atomic run projectatomic/helloapache
> ('Connection aborted.', error(2, 'No such file or directory'))
> $ sudo atomic run projectatomic/helloapache
> [sudo] password for ncoghlan:
> ('Connection aborted.', error(2, 'No such file or directory'))
>
> 3. Guess likely cause as being the docker daemon not running:
>
> $ systemctl status docker.service
> ● docker.service - Docker Application Container Engine
>    Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled;
> vendor preset: disabled)
>    Active: inactive (dead)
>      Docs: http://docs.docker.com
> $ systemctl start docker.service
> (This prompted me to escalate privileges appropriately, rather than
> just failing)
>
> 4. Try again
>
> $ atomic run projectatomic/helloapache
> ('Connection aborted.', error(13, 'Permission denied'))
> $ sudo atomic run projectatomic/helloapache
> [This downloads the image and starts running, but...]
>
> The problem here is that this did *not* go into interactive mode as
> claimed in the README, but tried to use kubernetes as the default
> provider. This a) wasn't going to work anyway (no k8s on this system);
> and b) failed with a Python traceback due to an indentation error:
>
> 2015-05-21 04:40:39,027 - atomicapp.plugin - DEBUG - Loading providers
> from /usr/lib/python2.7/site-packages/atomicapp-0.1-py2.7.e
> gg/atomicapp/providers
> Traceback (most recent call last):
>   File "/usr/bin/atomicapp", line 9, in <module>
>     load_entry_point('atomicapp==0.1', 'console_scripts', 'atomicapp')()
>   File "/usr/lib/python2.7/site-packages/atomicapp-0.1-py2.7.egg/atomicapp/cli/main.py",
> line 110, in main
>     cli.run()
>   File "/usr/lib/python2.7/site-packages/atomicapp-0.1-py2.7.egg/atomicapp/cli/main.py",
> line 92, in run
>     args.func(args)
>   File "/usr/lib/python2.7/site-packages/atomicapp-0.1-py2.7.egg/atomicapp/cli/main.py",
> line 32, in cli_run
>     ae = Run(**vars(args))
>   File "/usr/lib/python2.7/site-packages/atomicapp-0.1-py2.7.egg/atomicapp/run.py",
> line 72, in __init__
>     self.plugin.load_plugins()
>   File "/usr/lib/python2.7/site-packages/atomicapp-0.1-py2.7.egg/atomicapp/plugin.py",
> line 65, in load_plugins
>     f_module = imp.load_source(module_name, os.path.join(providers_dir, f))
>   File "/usr/lib/python2.7/site-packages/atomicapp-0.1-py2.7.egg/atomicapp/providers/kubernetes.py",
> line 60
>     if not self.dryrun:
>     ^
> IndentationError: unexpected indent
Sorry about that: https://github.com/projectatomic/atomicapp/pull/104
>
> The other unexpected-if-you-didn't-watch-the-demo-video behaviour here
> was the creation of several files and a subdirectory in the current
> directory. It would likely be useful for the demo to explicitly
> recommend running from a fresh empty directory.
>
> 5. Try turning answers.conf.sample into answers.conf, realise
> everything is owned by root because I had to run atomic under sudo to
> get docker access
It's not because atomic has been run as root, but because the those 
files were copied from a container by atomicapp tool which in that 
container is run as root...I guess we need user namespace to solve this:(
>
> $ mv answers.conf.sample answers.conf
> $ sudoedit answers.conf
> [Change the provider from kubernetes to docker]
Yeah, helloapache does not have data for docker provider anyway so it 
would fail with that error - any suggestion how to let the user know in 
advance?
>
> 6. Try again, hit the same Indentation Error attempting to import kubernetes.py
>
> 7. No image listing command in atomic to check version, so use docker:
>
> $ docker images
> FATA[0000] Get http:///var/run/docker.sock/v1.18/images/json: dial
> unix /var/run/docker.sock: permission denied. Are you trying to
> connect to a TLS-enabled daemon without TLS?
> $ sudo docker images
> REPOSITORY                  TAG                 IMAGE ID
> CREATED             VIRTUAL SIZE
> projectatomic/helloapache   latest              a5a07ae9014a        10
> hours ago        289.8 MB
>
> I'll move on to try the other examples that were used in the demo, and
> report to the list if there are any notable additions to the above
> initial experience report.
>
> Regards,
> Nick.
>

Cheers,
Vašek

-- 

Lead Infrastructure Engineer
Developer Experience
Brno, Czech Republic
Phone: +420 739 666 824




More information about the Container-tools mailing list