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:
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
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
--outputswitch fromnomi 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.csprojdirectory.
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.csprojdirectory.
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
hostPaththat is in the<user home>\.nomirun\hosts\AccountServicedirectory.
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.
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.
.gitignore fileIn 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
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.
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.
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.