Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I deploy an directory(or archive) #50

Open
RAbraham opened this issue Apr 18, 2019 · 0 comments
Open

How do I deploy an directory(or archive) #50

RAbraham opened this issue Apr 18, 2019 · 0 comments

Comments

@RAbraham
Copy link

RAbraham commented Apr 18, 2019

Hi,
Thanks to @yaronha, I'm able to deploy a single file.
How do I deploy a directory or archive? My directory will contain the handler.py and other user modules.
I tried.

import nuclio
spec = nuclio.ConfigSpec(config=spec_data)
nuclio.deploy_file(
        "https://s3.amazonaws.com/fifteenrock-odin/nuclio.zip",
        dashboard_url=dashboard_url, 
        name='a-function10', 
       project=project_name,
        output_dir='./output',
        spec=spec,
        archive=True)

The error I get is

Traceback (most recent call last):
  File "/Users/myproject/nuclio_lib/nuclio_server.py", line 197, in <module>
    deploy_archive_py(dashboard_url, func_name, project_name, spec_data, "https://s3.amazonaws.com/fifteenrock-odin/nuclio.zip")
  File "/Users/myproject/nuclio_lib/nuclio_server.py", line 119, in deploy_archive_py
    archive=True)
  File "/Users/myproject/venv/lib/python3.6/site-packages/nuclio/deploy.py", line 69, in deploy_file
    create_project=create_project)
  File "/Users/myproject/venv/lib/python3.6/site-packages/nuclio/deploy.py", line 107, in deploy_zip
    tag=tag, verbose=verbose, create_new=create_project)
  File "/Users/myproject/venv/lib/python3.6/site-packages/nuclio/deploy.py", line 197, in deploy_config
    raise DeployError('failed {} {}'.format(verb, name))
nuclio.utils.DeployError: failed creating a-function10

Also, how can I deploy a local zip file? Going through the code, it seems like it needs a remote url?
The S3 link is publicly acccessible.
I added a debug statement and I got this:

{"error":"\nError - Timed out waiting for creation state to be set\nCall stack:\nTimed out waiting for creation state to be set\n"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant