0

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?

BugBuddy
  • 576
  • 2
  • 5
  • 19

1 Answers1

1

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

CodeManX
  • 11,159
  • 5
  • 49
  • 70
  • Very helpful! Thanks again. Arch Linux is currently stuck on ArangoDB 3.3, which is why I was using the version 3.3 documentation. I would prefer to run ArangoDB 3.4, but I'm not sure how to upgrade from 3.3 without a newer version in the Arch repos. – BugBuddy Dec 18 '18 at 18:09
  • I completed the tutorial for getting started. However, following either ver 3.3 or 3.4 of the tutorial, I get the error: `Failed to load API definition. NetworkError when attempting to fetch resource. http://192.168.1.1:8529/_db/_system/_admin/aardvark/foxxes/docs/swagger.json?mount=/getting-started` – BugBuddy Dec 18 '18 at 19:10
  • As this is not directly related to the original question, please create a new one. I see that you did that already, so further discussions should go there: https://stackoverflow.com/questions/53840307/arangodb-getting-started-with-foxx-microservices-failed-to-load-api-definition – CodeManX Dec 19 '18 at 09:29