BugBuddy
BugBuddy

Reputation: 606

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:

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.

My question is very basic. On a Linux system, what are the best options for the location of this folder? And what should its permissions be?

I see existing ArangoDB directories at these locations:

/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?

Upvotes: 0

Views: 101

Answers (1)

CodeManX
CodeManX

Reputation: 11855

The Foxx chapter received a structural overhaul and new content was added with the v3.4.0 release. I recommend you use the 3.4 Foxx documentation therefore.

You can put the getting-started folder anywhere, e.g. where you also put other project folders, like in ~/projects/arangodb/ or whatever suits you.

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, e.g. /var/lib/arangodb3-apps/_db/_system/getting-started/ (where /getting-started is the mount path, not the name of the project folder).

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. 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 ...).

Upvotes: 1

Related Questions