I am deploying an application package which I have stored locally using the command:
curl --header Content-Type:application/zip --data-binary @application.zip localhost:19071/application/v2/tenant/default/prepareandactivate
And then I am accessing the vespa instance using the pyvespa command:
from vespa.application import Vespa
app = Vespa(url = "http://127.0.0.1", port=8080, deployment_message="Deployment successful for vespa")
But using these commands I am not able to access the application package and neither am I able to use the pyvespa functionalities associated with it.
app.application_package
Throws an error that ValueError: Application package not available.
Using which deployment command can I access the application package?
Other than that I tried using:
from vespa.application import ApplicationPackage from vespa.package import Schema, Document
app_package = ApplicationPackage(name="application", schema=[(Schema("test", Document(None, None)))])
And then I am deploying this application package app_package
using vespa Docker.
But the problem here is that I am not able to manually change the contents of the application package, like I am not able to add validation_overrides.xml
to the application package and redeploy it using the curl command.
I used app.application_package.to_files
to get the contents of the application package but making changes to it and redeploying using the curl command, doesn't reflect any changes.
curl --header Content-Type:application/zip --data-binary @application.zip localhost:19071/application/v2/tenant/default/prepareandactivate
Can you explain how we can actually make changes to the application package manually without any code and then redeploy it on the same docker instance?