简体   繁体   English

ArangoDB:非常基本的第一步-如何开始使用Foxx Microservices

[英]ArangoDB: very basic first step — how to get started with Foxx Microservices

ArangoDB documentation for the Getting Started section of Foxx Microservices, begins with this paragraph: Foxx Microservices入门部分的ArangoDB文档以以下段落开头:

We're going to start with an empty folder. 我们将从一个空文件夹开始。 This will be the root folder of our services. 这将是我们服务的根文件夹。 You can name it something clever but for the course of this guide we'll assume it's called the name of your service: getting-started . 您可以给它起一个聪明的名字,但是在本指南的过程中,我们将其称为服务的名称: getting-started

My question is very basic. 我的问题很基本。 On a Linux system, what are the best options for the location of this folder? 在Linux系统上,此文件夹位置的最佳选择是什么? And what should its permissions be? 它的权限应该是什么?

I see existing ArangoDB directories at these locations: 我在以下位置看到现有的ArangoDB目录:

/var/lib/arangodb3/
/var/lib/arangodb3-apps/
/usr/share/arangodb3/

Should I place the getting-started directory under one of those locations or somewhere else? 我应该将getting-started目录放在这些位置之一还是其​​他位置?

The Foxx chapter received a structural overhaul and new content was added with the v3.4.0 release. Foxx章节进行了结构上的改革,v3.4.0发行版中添加了新内容。 I recommend you use the 3.4 Foxx documentation therefore. 因此,我建议您使用3.4 Foxx文档

You can put the getting-started folder anywhere, eg where you also put other project folders, like in ~/projects/arangodb/ or whatever suits you. 您可以将getting-started文件夹放在任何位置,例如,您还可以在其他项目文件夹中放置它,例如~/projects/arangodb/或任何适合您的文件夹。

Read on in the Getting Started guide . 阅读《 入门指南》 Under the headline Try it out you find the steps how to deploy the service. 在标题下进行尝试,您将找到如何部署服务的步骤。 ArangoDB will then place the files in the right folder, eg /var/lib/arangodb3-apps/_db/_system/getting-started/ (where /getting-started is the mount path, not the name of the project folder). 然后,ArangoDB将文件放置在正确的文件夹中,例如/var/lib/arangodb3-apps/_db/_system/getting-started/ (其中/getting-started是安装路径,而不是项目文件夹的名称)。

Also check out the guide about the Development Mode for faster iterations. 另请查看有关开发模式的指南,以加快迭代速度。 You may use rsync to watch for file changes in your actual project folder and let it copy the changes over to ArangoDB's volatile Foxx app folder. 您可以使用rsync监视实际项目文件夹中的文件更改,然后将更改复制到ArangoDB的易失性Foxx应用程序文件夹中。 This is much safer than to work in the deployed folder directly (if you remove the service you would also lose your changes, and in a cluster the files may get overwritten because the service changed on another coordinator). 这比直接在已部署的文件夹中工作要安全得多(如果删除该服务,您也将丢失所做的更改,并且在群集中,由于该服务在另一个协调器上进行了更改,文件可能会被覆盖)。

An overview of Deployment options is also available, including Foxx CLI which can be used to bundle the files from your project folder and deploy them as service ( foxx upgrade ... ). 还提供了部署选项的概述,包括Foxx CLI ,可用于捆绑项目文件夹中的文件并将其作为服务部署( foxx upgrade ... )。

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

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