Creating miscroservice tar image for iOS EdgeEngine - edgeengine

I'm looking to deploy my microservice on my iOS app using the following func
public func deployMicroservice(edgeEngineAccessToken: String, config: MIMIKEdgeMobileClient.MIMIKMicroserviceDeploymentConfig, imageTarPath: String, completion: #escaping (MIMIKEdgeMobileClient.MIMIKMicroservice?) -> Void)
What steps should I take in creating this microservice tar image for imageTarPath?

All of the existing microservices that you can deploy on iOS reside at the link below.
https://github.com/edgeMicroservice
Most of the microservices already come packaged as .tar files so all you need to do is deploy and start them.
For "starter-microservice" you build & package it via npm. How you build your own microservices is completely up to you

Related

Publish Angular App Alongside Web API to Azure

The bounty expires in 4 days. Answers to this question are eligible for a +400 reputation bounty.
muttley91 wants to draw more attention to this question:
Kind of stuck with this one, looking to get more eyes on it
I created an ASP.NET Core app with Angular as instructed via this guide. I'm publishing it to Azure using the GitHub Action support, which was generated by Azure and then I modified to get it to work. I've got it working for my app but only the API seems to publish, and at the designated endpoint URLs. This makes sense since I had to modify the workflow to indicate the API project directly. How can I publish the Angular app (in the UI project) to Azure as well with this same workflow?
Here is the repo for reference: https://github.com/rarDevelopment/rardk-web-dotnet
The workflow: https://github.com/rarDevelopment/rardk-web-dotnet/blob/main/.github/workflows/main_rardkweb.yml
and the API sample endpoint can be seen running here: https://rardkweb.azurewebsites.net/WeatherForecast
the Angular app will get published via npm run build , it says so also in the guide you linked, here
The publish process takes more time than it does for just an ASP.NET Core project, since the npm run build command gets invoked when publishing.
In dotnet static files are stored within the project's web root directory.
Your angular project should be configured to publish the result of npm run build in the web root directory (www) of your dotnet project.
When the built Angular app is in the www directory, then you build/publish the dotnet project, which needs to be configured (see the guide examplecode) to serve static files.

CI/CD PHP app with Webpack on Azure Web App

I'm trying to deploy a Laravel + Vue app over an Azure App Service - Web App. It is however very unclear and I cannot find any proper solution inside Microsoft's documentation to get it into working.
'Traditional' deployment workflow
What I typically do to deploy my code (outside CI/CD):
sync Git repository
run composer install
run npm run prod (which is a shorthand for compiling webpack in my case)
Done
There is a really easy approach with a Docker container, where in my Dockerfile I just configure php-apache image with additionally installed Nodejs (w. NPM).
However I would like to find a solution to use Azure's built-in features to configure this deployment. Is it possible?
I can use Windows or Linux Web Apps. No difference for me.
I recommend that you use continuous deployment. For specific operations, you can check the official documentation.
Recommended reason:
As long as it runs successfully locally and continuously deploys through git, the project can be released, and later updates only need to submit code through git.
You can easily view the deployment log in Action in git.
Simple operation and convenient update
Steps:
First, ensure that the project is running normally locally, and create web app services on the portal. (Linux is recommended for the nodejs program, which can avoid many problems caused by dependencies)
According to the official document, in the Deployment Center, select github for release
Check the release information of Action on the official github website and wait for the release to be completed
Note:
If it is a nodejs program or other language program, if the Linux operating system is used, the Startup Command may need to be configured in the Configuration. If the program cannot be accessed normally after release, then try to set npx serve -s (nodejs program, other Language program), and then proceed to restart the webapp.

How should I deploy Angular + NodeJS project on a server?

I have an Angular project with NodeJS backend. I am confused about how to deploy my project on a remote server? I decided to use webpack because of it's simplicity, so I ran the following command:
ng build --prod
And it made a folder called dist for me. I think I must copy the content of this folder into the public folder of my NodeJS backedn server, but I am not really sure if I do the right thing?
Should I change other configuration of my frontend or backend codes too? Or just copying dist folder into the server's public folder should solve everything?
You have a very good documentation guide by Angular: https://angular.io/guide/deployment
And yes, you should copy dist/yourproyect (Angular compiled to HTML+CSS+JavaScript+Assets) to any web server you want to deploy it.
For isolation purposes (and maybe configuration), I'd recommend to put front and back in different folders. But you can deploy it within NodeJS.
In short: A web server Apache/Nginx/IIS/GitHubPages/Firebase/etc for Angular and PM2 ( https://pm2.keymetrics.io/ ) to launch your NodeJS. But depending on your expected load, you may want to choose one server type or another.
Anyway, if you specifically want to serve Angular through NodeJS, I'd recommend this tutorial (2016, maybe bit outdated, but it will help): https://scotch.io/tutorials/mean-app-with-angular-2-and-the-angular-cli

Integrating Angular2 with Nodejs

I'm building a Nodejs + Angular2 project for the first time and stuck with architecture design issue.
There are following possibilities:
Develop Angular2 project separately, build and copy the files into Nodejs project
Develop Angular2 project from within Nodejs project (say from public folder)
Run two servers for Angular2 as frontend and Nodejs as backend (how to do this in shared hosting then? AWS is fine)
Using yeoman for creating projects for both Angular2 and Nodejs.
Which is the best option?
Any other idea?
2 is basically the solution. The work flow goes like this:
Start Angular Development Server.
Start NodeJS server.
Once you are ready to go live:
- Compile Angular and build out into a public folder using ng build. This folder will be accessible to the public and holds html files, javascript files, etc.
- Then, you use Nodejs to direct clients to those html files. When you use NodeJS or any other backend, this is typically how you will serve the Angular 2 files. It is also possible to develop Angular 2 SERVER SIDE instead, however, this is a bit harder and I wouldn't recommend it unless working with another framework entirely. Here is a really great tutorial that walks you through it:
https://scotch.io/tutorials/mean-app-with-angular-2-and-the-angular-cli

How to connect angular 2 app with .net core

As a beginner, I have installed angular cli, npm etc all the stuff and I am able to add some components to it. But It is incomplete until we use some backend. I am in .net background. Till now, I was using MVC but now I am migrating to .net core.
Well, Angular2 and .net core are two different apps. Now I have angular-2 app. How can I add this app in a .net core web application?
And usually we use CLI commands to add components and other things. So, when I will add angular app in .net core app, how can i be able to add components automatically?
Feels like I need to add my 2c here.
Angular2+ & Asp.Net Core 2+ is a perfect match for developing long lasting applications.
Saying that, don't get fooled that Microsoft would be your friend here. Don't try to use VS build in Angular template or Microsoft.AspNetCore.SpaTemplates package, as it will lead to you into rabbit hole of whole bunch of issues(just look at all questions about it on this site).
From my own experience of trying different approaches, create empty Asp.Net Web API project and create Angular app in it with Angular-CLI tool. From this point you can use angular-cli & dotnet cli for very enjoyable and productive experience.
Follow all steps in this blog from Levi Fuller and you'll get up and running in no time.
You should build an API and then communicate with it from your Angular application.
Take a look at this tutorial, it covers the basics concepts:
https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-web-api
Or in case that you want to integrate your application as a new project inside your solution, take a look at this one:
https://www.pluralsight.com/guides/microsoft-net/using-angular-2-with-asp-net-core
If you are using Asp Core, your best bet is to use its spa templates here
You can install it using
dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
To start a new project with angular
dotnet new angular
Now the problem here is you want to integrate the angular cli with the asp core. I'm assuming that you want to use the angular cli commands to quickly generate a component. From a fresh angular project, look for angular-cli.json and copy paste it to the root of your asp project. Then update your package.json and add #angular/cli in the devDepencies like this
"devDependencies": {
"#angular/cli": "^1.0.0",
"webpack": "^2.6.0"
}
You can now run this command
ng g c my-component
Make sure that you run the npm install again and rerun the dotnet run / dotnet watch run if it didn't work.
Create the ASP.Net core application, Create the Angular project using cli. Build and copy the angular project to www folder. You can add the components using the command prompt. Create the api in .Net core application and call it from angular

Resources