Table of Contents

Creating a cluster and a module

Creating a cluster

The first step to create a cluster is to create its folder. In this example you will call it "Northwind".

Then run the following command in the folder:

neos init
Warning

The folder name is important, as it is used by default as the cluster name. To follow the quick start procedure, you need to call it exactly "Northwind".

For more information on this command, go to this article. This command creates four configuration files, two of which will be of particular interest to us:

  • northwind.yml
  • northwind.connectionstring.yml

The last step is to update the content of those files by setting the properties of your cluster.

northwind.yml:

# The root namespace for the generated application
RootNamespace: Northwind
# The cluster name
ClusterName: Northwind
# The cluster version
ClusterVersion: 0.0.1
# The cluster title
ClusterTitle: Northwind
# The company name
Company: Groupe Isagri Services

In the following example, the configuration is set to persist data as YAML files. If you want to persist data using an SQL Server database, you can check this article to learn how to do so.

northwind.connectionstring.yml:

# Persistence type
# YamlFile | SqlServer | PostgreSQL | Oracle
PersistenceType: YamlFile
# The path for the YAML data directory
YamlDataPath: ../NorthwindData
Warning

"YamlDataPath" can be any directory but avoid storing data in the cluster (i.e. YamlDataPath: ../Northwind).

Note

You can use a single YAML configuration file or split its properties between as many YAML files as you want. You just need to make sure that those files are located at the root of the cluster. If you want to ignore a configuration file, you can prefix its name with "_".

Running Neos Studio

Neos Studio can then be started by using the following command in the cluster folder:

neos run

It will automatically open in your web browser at the following address : https://localhost/neos/Northwind/manage/

Neos Manager will allow you to consult the status of the servers. The back and front servers of the Northwind cluster are not started since the application does not yet exist. On the other hand, you can see that the Neos Studio servers have started and that you will be able to start designing your application. To do this, simply click on the Design in Neos Studio button or open the following address: https://localhost/neos/Northwind/designer

Adding a module

Once the cluster is created, it is time to create a module. To do so, click on the Create module button. In the next screen, set the name and the caption of the module. Here you will create a new module named Catalog.

Name = Catalog
Caption = My catalog
Warning

Don't forget to click on the save button.

When saving, a new folder named after the module is created in the modules folder of the cluster. In this folder, you can find a metadata folder in which will be stored as YAML files each element that you will create for this module. The metadata folder is divided in folders representing each component type.
For the moment, you should only see a modules/Catalog/metadata/Modules folder containing a Catalog.yaml file. This file defines our new module in the form of an entity. After opening it, you should find the following content:

Catalog.yml:

Caption: My catalog
MetadataFormatVersion: XX
Note

As you can see, the Name property is absent. This is because when creating a module, its key property (in this case the Name property) is the name of the YAML file which stores the module.

MetadataFormatVersion contains a numerical value indicating the version of the module's metadata format. Some Neos updates cause metadata storage to evolve, making it necessary to migrate them. This property is used to find out the version of the metadata in the module to determine whether migration is necessary. You should never have to modify this property manually.