简体   繁体   English

在 GCP 中部署非 web 应用程序

[英]Deploying non web applications in GCP

Is there a way I can make my java application (non web) running in google cloud platform.有没有办法让我的 java 应用程序(非 Web)在谷歌云平台上运行。 I can see that Cloud run, App engine and Cloud functions works for Web applications.我可以看到云运行、应用引擎和云功能适用于 Web 应用程序。 My application is a Java application that runs a report using Google Ad manager API.我的应用程序是 Java 应用程序,它使用 Google 广告管理器 API 运行报告。 Can I run this app in any of the GCP tools?我可以在任何 GCP 工具中运行此应用吗?

Cloud Run is predominantly used for stateless operations (similar to Firebase Functions or AWS Lambda). Cloud Run 主要用于无状态操作(类似于 Firebase 函数或 AWS Lambda)。 Ie. IE。 a request is sent to the instance, which spins up resources, completes the task then shuts down.向实例发送一个请求,该实例启动资源,完成任务然后关闭。 It is great for API endpoints that don't store anything in memory.它非常适合在 memory 中不存储任何内容的 API 端点。

Another thing to note is that both app engine and cloud run are designed to work with dockerized applications.需要注意的另一件事是,应用程序引擎和云运行都旨在与dockerized应用程序一起使用。

From your description, it sounds like you should be using a Compute Engine Instance (A virtual computer).根据您的描述,听起来您应该使用Compute Engine 实例(虚拟计算机)。 You can clone your git repository into the VM and run it manually.您可以将 git 存储库克隆到 VM 中并手动运行它。 There are also GCP tools that will allow you to run the java executable on a timer.还有一些 GCP 工具可让您在计时器上运行 java 可执行文件。 Compute Engine Instances give you the most flexibility to configure the service you're building to your needs. Compute Engine 实例为您提供最大的灵活性来配置您正在构建的服务以满足您的需求。

See docs for Compute Engine Here在此处查看 Compute Engine 文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM