Azure / service-fabric-mesh-preview

Service Fabric Mesh is the Service Fabric's serverless offering to enable developers to deploy containerized applications without managing infrastructure. Service Fabric Mesh , aka project “SeaBreeze” is currently available in private preview. This repository will be used for tracking bugs/feature requests as GitHub issues and for maintaining the latest documentation.
MIT License
82 stars 12 forks source link

Service Fabric Mesh deployment issue using template #290

Open srikanthshaps opened 5 years ago

srikanthshaps commented 5 years ago

I am attempting to deploy the linux container having python application inside from command line using the json template and I see 'unable to edit or replace deployment' error. The image is already there in ACR.

I have attached the template file that I am using to deploy json_template.txt

I use the command below to deploy the container

az mesh deployment create --resource-group myTestAr --template-file C:\Users\h270076\Documents\AR_POC\Azure-App-Service\python-sample-vscode-flask-tutorial\mesh_test_rp.linux.json --parameters "{'location': {'value': 'eastus'}}"

Can anyone please assist me to fix the issue and deploy the container?

Thanks, srikanth

jeffj6123 commented 5 years ago

There is currently an issue with that error being thrown, even though there is no conflicting deployment. You should still be able to check if your resources were created. Starting with az mesh network show to get your IP address.

srikanthshaps commented 5 years ago

The resources are created and I see deployment is underway for certain period. I waited for 3 hrs and it throwed time out error. I am able to deploy the image pre-built helloworld image but when I try to build the same image from source, I see these errors. I am wondering if I am building and deploying the image in correct way.

jeffj6123 commented 5 years ago

There was a fix put up for the mesh cli. Could you try running az extension remove -n mesh az extension add -n mesh

This should stop the previous deployment error from showing if there wasnt one Also you can use az mesh app show to get more information about the particular application resource.

srikanthshaps commented 5 years ago

Thanks. I was able to deploy the application. I need to run the deployed application for every 5 minutes. how do I do that?

jeffj6123 commented 5 years ago

Do you mean automate the deployment, so that it redeploys ever 5 minutes?

srikanthshaps commented 5 years ago

The linux docker container that has been deployed reads the data from redis cache, perform data analytics and writes the output to cosmos database. The application is deployed but its not running. I need to run this on specific time interval(5 min). I am just learning and do not know much about deployment process. can you please provide me some ideas to run the application?

jeffj6123 commented 5 years ago

If that is the only purpose the container serves, Azure App Services could potentially be another solution that would be simpler to maintain, https://docs.microsoft.com/en-us/azure/app-service/web-sites-create-web-jobs. Otherwise it sounds like it might be an issue with the container itself

srikanthshaps commented 5 years ago

How do I start the container which contains python flask application in service fabric mesh? Should I need to have any startup script to launch the container?

jeffj6123 commented 5 years ago

Mesh will start running the container you specify in the deployment template you send. To make sure the flask application is coming up properly, you could run it locally and verify its behaving as expected.

srikanthshaps commented 5 years ago

I have tested flask locally and it is working fine as expected. When the container is deployed on the mesh, it is not working. I am wondering if I need make any changes to template file which I am using for deployment. Please see the attached template file and dockerfile and please let me know if there are corrections. template.txt dockerfile.txt

jeffj6123 commented 5 years ago

Are you seeing any errors when you deploy? If you were to perform az mesh app show for the application you deployed, what does it show?