Can anyone having GAE Spring BOOT app deployed successful in CLOUD - javascript

The Spring boot app is not working after deployed through GAE to cloud. Is any one having success with spring boot on GAE? *google app engine(GAE)

Have you taken a look at https://github.com/GoogleCloudPlatform/getting-started-java/tree/master/helloworld-springboot ?
TL;DR
Copy pasting the read me file from the above link
Spring Boot based Hello World app
This sample shows how to run a Spring Boot application on Google
Cloud Platform. It uses the Google App Engine flexible
environment.
Before you begin
This sample assumes you have Java 8 installed.
Download Maven
These samples use the Apache Maven build system. Before getting
started, be sure to download and install it.
When you use Maven as described here, it will automatically download the needed
client libraries.
Create a Project in the Google Cloud Platform Console
If you haven't already created a project, create one now. Projects enable you to
manage all Google Cloud Platform resources for your app, including deployment,
access control, billing, and services.
Open the Cloud Platform Console.
In the drop-down menu at the top, select Create a project.
Give your project a name.
Make a note of the project ID, which might be different from the project
name. The project ID is used in commands and in configurations.
Enable billing for your project.
If you haven't already enabled billing for your project, enable
billing now. Enabling billing allows the application to
consume billable resources such as running instances and storing data.
Install the Google Cloud SDK.
If you haven't already installed the Google Cloud SDK, install and initialize
the Google Cloud SDK now. The SDK contains tools and libraries that
enable you to create and manage resources on Google Cloud Platform.
Install the Google App Engine SDK for Java
gcloud components update app-engine-java
gcloud components update
Run the application locally
Set the correct Cloud SDK project via gcloud config set project
YOUR_PROJECT to the ID of your application.
Run mvn spring-boot:run
Visit http://localhost:8080
Deploy to App Engine flexible environment
mvn gcloud:deploy
Visit http://YOUR_PROJECT.appspot.com.
Java is a registered trademark of Oracle Corporation and/or its affiliates.

Related

Is it possible to build an expo app without having an account?

I see here: https://docs.expo.dev/build-reference/local-builds/ that in order to build my expo app on my own infrastructure, I need to have expo
Company policies that restrict the use of third-party CI/CD services. With local builds, the entire process runs on your infrastructure and the only communication with EAS servers is:
to make sure project #account/slug exists
if you are using managed credentials to download them.
Debugging (more info in the next section)
Is there a way to build my apps (iOS and Android) without having to be logged in to Expo servers in any way?

IBM Bluemix Cloud: IBM SDK for Node.js - Can our apps in Bluemix keep the existing version without auto-updates?

We tried to test IBM Bluemix Cloud and Watson Cloud by running
several Watson Cloud demo node.js apps inside our accounts, we
noticed the following situation:
After we installed the demo apps inside our account, it runs without problem; Because I have not opened this app in Bluemix DevOps tool. So, when this app
runs each time, this app does the following based on staging_task.log file:
"" Installing IBM SDK for Node.js (4.5.0)from cache""""
The above app frontend js code is written to work with this SDK and Node.js version.
# Later, I made another copy of the above demo app in our account. It runs without problem.
Then, I just opened the above app code in Bluemix DevOps tool and saved
the file without touching any code. Then, this version app does
not run.
Our investigation shows the following:
This staging_task.log file shows this fact: This version app after the above step does this now:
""" Installing IBM SDK for Node.js (4.6.2) from cache """
That means Bluemix Cloud automatically use the newer version of Node.js and SDK after the above step.
Another situation we found during our experiments may also be related to this problem:
*We deployed the following Watson demo app around Aug/2016, and we have not resaved any file in this app, so we guess that this demo
app still runs in the cached Run Environment (IBM SDK for Node.js
Verson 4 ??) in our account in Bluemix. So this demo app runs fast
and correctly in our account.
https://github.com/watson-developer-cloud/conversation-simple
*After the above deployment, there are several upgrading in Bluemix Cloud and Watson Cloud. The Run Environment many contains IBM SDK
for Node.js Verson 6 ??
*In last month, we deployed the above same demo app in our account. We found that this same app runs much slower than the above Aug/2016 deployment. Our guesses are that this demo app code is engineered based on IBM SDK for Node.js Verson 4.
The following Q supports our point: The auto-upgraded IBM SDK for Node.js in Bluemix Cloud or Watson Cloud may
have caused the problem in this Q. Now the IBM SDK for Node.js in Bluemix Cloud may be Version 6, this application may be engineered based on IBM SDK for Node.js Verson 4 (this version is not Node.js version in Package.json, but
IBM SDK version)
IBM Bluemix node.js native promise support
Our Q:
-Why is the above SDK and Node.js auto-upgraded ?
-How can we force this demo app to use the same version of IBM SDK and Node.js before we decide to upgrade them in
Bluemix Cloud? Thus to ensure that our existing apps run as normal.
Any thoughts and suggestions will be appreciated.
You can define node and npm versions in your package.json
{
"name":"iot-html5-phone",
"version":"0.0.1",
"scripts":{
"start":"node app.js"
},
"dependencies":{
},
"engines":{
"node":"0.10.26"
}
}
Use:
"engines":{
"node":"4.5.0"
}
( no carets or tildes )

How to deploy a React + NodeJS Express application to AWS?

I have a React + Webpack/Babel + Node/Express application and I want to deploy it on AWS.
Would I have to deploy React and Node/Express separately? Or could they be deployed together at once?
1. If you have two distinct projects
e.g. a React single-page app and a Node/Express API.
a. You can deploy both separately
the frontend (the React app) on S3 and CloudFront (tutorial)
the backend (the Node API) on Elastic Beanstalk (recommended) or EC2
Another option is to deploy both parts together at once on Elastic Beanstalk or EC2. However, you'll miss out on the benefits of hosting on S3 and CloudFront, i.e. faster delivery for your users and cheaper costs. In my opinion, it's also more convenient and less prone to unexpected errors to update and deploy separately the client-side and the server-side of a web application.
Another benefit of deploying separately: For organizations with different teams for the frontend and backend, it's easier for each team to be able to deploy their side of the application on their own without depending on the other team.
b. Why S3 + CloudFront instead of S3 alone?
all the benefits of using a CDN
your own domain name and a free SSL certificate in 1-click
redirection on 4xx errors (necessary if your app uses a HTML5 History-based router)
the caching system
http2 and http to https redirection
c. How to handle CORS?
You can use different subdomains, e.g.
api.domain.com for the Node/Express API
app.domain.com for the React app
Then enable CORS in the API:
app.get('/api', cors({ origin: 'https://app.domain.com' }), ...)
2. If you have a single project
e.g. a Node app including some React views.
You have to deploy the whole app on Elastic Beanstalk or EC2.
Note: If you have a single project including two sub-projects (i.e. a folder for the React app and another one for the Node API), and if both sub-projects still work when they are separated, then you can deploy the sub-projects separately (see first part of the answer).
3. In both cases
Run your Webpack build before deploying the React part. You can do it manually (before deploying on AWS) or automatically (in your CI/CD system). If you bootstrapped your app with create-react-app (CRA), just run yarn build or npm run build at the root of the project and upload the content of the "build" folder to your S3 bucket.
4. Tools
Official AWS S3 CLI - Manage S3 buckets and objects using high-level aws s3 commands.
Official AWS Elastic Beanstalk CLI - Manage and deploy your backend using eb commands.
S3-deploy - CLI utility for deploying files to S3.
5. If not restricted to AWS
I answered a related question not restricted to AWS.
Basic Concepts
To deploy your app hassle free, you need to learn about three concepts: Microservices, containers, and process managers. I will discuss them with a bit more details and few links to get you started:
Microservices
Microservices is an architecture that allows you to divide your app into smaller services. This has multiple benefits:
1- The services are easily testable.
2- The services are replaceable.
3- The services can scale separately.
Containerization
Almost every useful app has at least dozens of dependencies. You can install dependencies on the target machines, but most certainly you'll face few challenges. Programs like Docker allow you to create a container for your app and deploy that container on the cloud. (Regardless of the cloud provider) Learn more...
Process Managers
Process managers ensure that your app is running smoothly and all parts are healthy. If your app crashes, it can easily restart the app.
1. Deploying a serverless NodeJS / React Application
Note: This approach does not work if you are doing server-rendering with ReactJS. Go to the next option.
You can simply build your app and deploy it to a static S3 website. This option works if you use microservices architecture to separate your API from your react app.
Creating a static website in S3 is really simple:
Create a bucket in S3 with the exact name of the website. Example: blog.stackoverflow.com.
Enable static hosting
Create an A record in Route 53 and connect it to the bucket you created.
For more information check AWS handy documentation.
2. Deploying a NodeJS application into EC2
You can launch different EC2 instances for every microservice. (API, React app, etc.) You need to use a process manager such as PM2 to ensure your app is running smoothly.
Continuous Delivery (Automating deployment)
To create an automatic deployment, I prefer to use Terraform in combination with Ansible. Terraform is very declarative. You describe how the cloud infrastructure should look like and Terraform build it for you.
Ansible, on the other hand, is very procedural and is perfect for provisioning a new server.
Error handling and reporting: Sentry
Ideally, you should have unit tests to prevent shipping buggy code to the production. (Use Jest with supertest, Enzyme for shallow rendering). But the world is imperfect, and it is good to receive any potential bugs that happen on the client. Enter Sentry
Both react and node code can be combined and deployed at once
you can more information here:
How to deploy reactjs and node typescript on elastic beanstalk using eb cli

Build SAPUI5 App with Grunt/Gulp and deploy form Eclipse with ABAP Team Provider

I am trying to optimize an existing UI5 application which resides in SAP BW as BSP Application and runs from SAP Portal (You press on the link and the UI5 application opens in a new Tab).
My main concern is with the amount of calls between Client and Back-end system. Especially calling all the library.css/library-preload.js/etc files AND custem controller.js and view.js files.
I found possible solutions involving grunt/gulp or deploying from SAP WebIDE. I trying building and deploying the App with SAP WebIDE, but after opening the App, Network still shows a lot of traffic + there is no Component-preload.js call. I'm guessing it has something to do with where the app is launched or I still have some configuring to do on the back-end?
I would like to build my App with either grunt/gulp since I can involve other plugins like lints, compression (for js, html, css), test, and many more. The problem is that the App resides not in OS, but somewhere in DB.
So I want to build my App with all those Grunt/Gulp tasks and deploy to ABAP AS (in BW as BSP application) using ABAP Team Provider and ensure that when I call the app from Portal, the files will be compressed/minified and, what is more important, that all the relevant .js files will be loaded as a single request.
Is what I imagine even possible? And if yes, then what are the steps required to accomplish this?
NOTE: I checked SCN and unfortunately I can't use your typical npm grunt or grunt-openui5 etc since the App resides somewhere in the DB :/
If you have a build configuration inside your WebIDE project, WebIDE will reate a DIST folder containing the distribution package.
Inside DIST there is an autogenerated Component-preload.js

Deploy a solution with HTML5/Javascript project and separate ASP.NET Web API project on IIS

I am working on a website with AngularJS client part an a ASP.NET Web API backend. The website is separated in two "projects", a regular Visual Studio project for the backend, and, with no HTML projects template in Visual Studio, another ASP.NET project for the HTML part. This part is managed and build with Grunt to a dist/ subfolder.
I would like to deploy this website on Amazon EC2, in a Windows Server 2012 with IIS. I however haven't found how to package the app, modify the solution or configure IIS to make that work. Ideally, IIS should serve the static files with any request except requests on http://website/api, which should be redirected to the Web API backend.
I am using Visual Studio 2015.
Any help will be greatly appreciated.
If AWS supports WebDeploy, you could use the Publish feature, then create a new WebDeploy package for the web application project. If AWS supports WebDeploy, you could then use this created package to publish to AWS.

Categories

Resources