Documentation

Team development support

From version Nomirun CLI 1.11.0, we enhanced the support for team development. That means your team can work on the same Nomirun modules and projects in a better way.

A list of changes:

1. Changes in port management

Host ports are now moved to modules.yaml and clusters.yaml files. Previously those were JSON files stored in the host directory.

If you used Nomirun before, you’ll need to manually migrate those ports to the new format. This is a new format:

modules:
- name: SolarInverters
  csproj: SolarPlatform\src\SolarInverters\SolarInverters.csproj
  hostPorts:
    httpPort: 5310
    httpsPort: 5311
    grpcPort: 5312
    grpcsPort: 5313
    metricsHttpPort: 5314
    metricsHttpsPort: 5315

2. Changes in module and solution source code location

Standardized location for modules, libraries and solutions source code location, which is now <user home>/.nomirun/repos. Every time you create a new module, library or solution, it will be created to this location.

This also means the csproj parameter in can now be relative instead of absolute.

We removed the support for --output switch from nomi module new, nomi library new, nomi solution new.

An example of modules.yaml:

modules:
- name: SolarInverters
  csproj: SolarPlatform\src\SolarInverters\SolarInverters.csproj
  hostPorts:
    httpPort: 5310
    httpsPort: 5311
    grpcPort: 5312
    grpcsPort: 5313
    metricsHttpPort: 5314
    metricsHttpsPort: 5315

For the example above, the module csproj and source code location is in the <user home>\.nomirun\repos\SolarPlatform\src\SolarInverters\SolarInverters.csproj directory.

An example of libraries.yaml:

libraries:
- name: SolarPlatformCommon
  csproj: SolarPlatform\src\SolarPlatformCommon\SolarPlatformCommon.csproj

For the example above, the library csproj and source code location is in the <user home>\.nomirun\repos\SolarPlatform\src\SolarPlatformCommon\SolarPlatformCommon.csproj directory.

An example of clusters.yaml:

clusters:
- name: SolarPlatform
  hosts:
  - name: AccountService
    hostPath: hosts\AccountService
    hostFramework: net10.0
    hostPlatform: win-x64
    hostVersion: latest
    hostPorts: 
      httpPort: 5340
      httpsPort: 5341
      grpcPort: 5342
      grpcsPort: 5343
      metricsHttpPort: 5344
      metricsHttpsPort: 5345
    modules:
    - name: Accounts
      version: 

The hostPath in clusters.yaml is now relative to the <user home>/.nomirun/hosts directory.

For the example above, the host binaries are not stored in the hostPath that is in the <user home>\.nomirun\hosts\AccountService directory.

3. Module and solution .gitignore changes

Modules and Solution Git repositories now ignore launchSettings.json and nuget.config files in .gitignore to support for team development. Those two files are influenced by a computer and user where the module is developed.

So remove them from the existing modules from Git.

4. Share Nomirun configuration with team members

Folder <user home>/.nomirun contains four files that you need to share with your team members:

  • modules.yaml - YAML file that contains all the modules’ configuration.
  • clusters.yaml - YAML file that contains all the clusters’ configuration.
  • libraries.yaml - YAML file that contains all the libraries’ configuration.
  • Nomirun.config - Encrypted Nomirun configuration file. It’s encrypted because it contains sensitive information like NuGet repository passwords and can be shared between developers. The file is created by nomi init process.

To share the configuration in the team, we can put them under the Git.

4.1. Create a .gitignore file

In the folder <user home>/.nomirun, create a .gitignore file and add the following line:

# Ignore everything
*

# Un-ignore Nomirun configuration files
!clusters.yaml
!modules.yaml
!libraries.yaml
!Nomirun.config

4.2. Initialize, configure and push a Git repository

git init
git config user.name "<NAME>"
git config user.email "<EMAIL>"
git remote add origin <PATH_TO_GIT_REPOSITORY>
git add .
git commit -m "Initial commit"
git push -u origin master

Remote repository should be empty.

4.3. Share the above files with your team members

Team member can clone the repository like this:

Warning this will overwrite the existing files in the local folder from remote.

git init
git config user.name "<NAME>"
git config user.email "<EMAIL>"
git remote add origin <PATH_TO_GIT_REPOSITORY>
git fetch
git reset origin/master
git reset --hard HEAD
git pull origin master

Now the whole team can have the same Nomirun configuration.

5. Regenerate nuget.config file

If you need to regenerate the nuget.config file, run nomi config nugetconf -o c:\MySolution command. It takes NuGet repositories that are defined in the Nomirun.config file and generates the nuget.config file that is shared in the Git repository.