Manish Ramchand
Manish Ramchand

Reputation: 63

Porting existing web application to Azure Service Fabric Mesh

I am aware of how to create a new service fabric mesh application using the service fabric mesh SDK and then publish the same to Service Fabric Mesh. My question is - I have an existing Web project created from Angular CLI, how do I containerize this and publish it to Azure service fabric mesh?

Upvotes: 1

Views: 253

Answers (1)

Jeffrey Jarry
Jeffrey Jarry

Reputation: 156

First, if you are currently developing locally on an application by using 'ng serve' that would not work for a production ready solution. You would want to use a production ready web server for serving the project. The process would look like something like this(assuming you only need to serve your angular app and are not dealing with connections to a database or maintaining some state or information on a backend)

  1. run ng build and ideally use the production flag.
  2. configure at least a simple webserver. Well say you use https://docs.nginx.com/nginx/ to serve your static files generated from step 1.
  3. Next you are wanting to containerize it so you would install docker https://www.docker.com/ and then you can follow a guide like this https://blog.docker.com/2015/04/tips-for-deploying-nginx-official-image-with-docker/ to properly build your image.
  4. Now that you have created your image locally you could use a registry like docker hub or since you are looking at mesh https://learn.microsoft.com/en-us/azure/container-registry/ is the azure solution for maintaining your images. You need to give your image to a registry otherwise mesh does not have a way to access your image file.
  5. You said you have deployed a mesh application before, so all you would need to do then is configure a template that points to that image for your application and deploy that.

Upvotes: 3

Related Questions