atomicapp icon indicating copy to clipboard operation
atomicapp copied to clipboard

Cannot use "external" with "file://"

Open cdrage opened this issue 10 years ago • 4 comments

Don't know if I'm doing something wrong here, but shouldn't this work?

---                                                                                                                                                                                                                                                            
specversion: 0.0.2                                                                                                                                                                                                                                             
id: helloapache-app                                                                                                                                                                                                                                            

metadata:                                                                                                                                                                                                                                                      
  name: Hello Apache App                                                                                                                                                                                                                                       
  appversion: 0.0.1                                                                                                                                                                                                                                            
  description: Atomic app for deploying a really basic Apache HTTP server                                                                                                                                                                                      
graph:                                                                                                                                                                                                                                                         
  - name: nested-helloapache                                                                                                                                                                                                                                   
    source: file://external/nested-helloapache                                                                                                                                                                                                                 
  - name: helloapache-app                                                                                                                                                                                                                                      
    params:                                                                                                                                                                                                                                                    
      - name: image                                                                                                                                                                                                                                            
        description: The webserver image                                                                                                                                                                                                                       
        default: centos/httpd                                                                                                                                                                                                                                  
      - name: hostport                                                                                                                                                                                                                                         
        description: The host TCP port as the external endpoint                                                                                                                                                                                                
        default: 9090                                                                                                                                                                                                                                          
    artifacts:                                                                                                                                                                                                                                                 
      docker:                                                                                                                                                                                                                                                  
        - file://artifacts/docker/hello-apache-pod_run                                                                                                                                                                                                         
      kubernetes:                                                                                                                                                                                                                                              
        - file://artifacts/kubernetes/hello-apache-pod.json 

in specific:

  - name: nested-helloapache                                                                                                                                                                                                                                   
    source: file://external/nested-helloapache                                                                                                                                                                                                                 
  - name: helloapache-app  

instead of

  - name: nested-helloapache                                                                                                                                                                                                                                   
    source: docker://external/nested-helloapache                                                                                                                                                                                                                 
  - name: helloapache-app  

I'm getting

2015-12-03 18:30:27,647 - atomicapp.cli.main - ERROR - argument of type 'NoneType' is not iterable
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/atomicapp-0.2.3-py2.7.egg/atomicapp/cli/main.py", line 74, in cli_run
    nm.run(**argdict)
  File "/usr/local/lib/python2.7/dist-packages/atomicapp-0.2.3-py2.7.egg/atomicapp/nulecule/main.py", line 187, in run
    self.nulecule.render(cli_provider, dryrun)
  File "/usr/local/lib/python2.7/dist-packages/atomicapp-0.2.3-py2.7.egg/atomicapp/nulecule/base.py", line 223, in render
    component.render(provider_key=provider_key, dryrun=dryrun)
  File "/usr/local/lib/python2.7/dist-packages/atomicapp-0.2.3-py2.7.egg/atomicapp/nulecule/base.py", line 348, in render
    if provider_key and provider_key not in self.artifacts:
TypeError: argument of type 'NoneType' is not iterable

when running said error.

or has this just not been implemented yet?

blocking #398

ping @goern since the only example I could find that relates to this was the wordpress one ;)

cdrage avatar Dec 03 '15 23:12 cdrage

This looks like you are hitting a limitation of atomicapp. The N.Spec defines that a URL should be the value of a source attribute, but atomicapp assumes that this is not a URL but a docker registry/repo/image string.

see https://github.com/projectatomic/atomicapp/blob/359ee4e914ea8b88c24a1b10fa74b0187a30ca34/atomicapp/nulecule/container.py#L50

goern avatar Dec 04 '15 15:12 goern

Isn't this duplicate of #437 ?

vpavlin avatar Jan 05 '16 14:01 vpavlin

Yup, looks that way, let's close the other one since this one has a bit of a better example.

cdrage avatar Jan 05 '16 14:01 cdrage

:+1: for this feature

rtnpro avatar Jan 05 '16 15:01 rtnpro