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:
From Nomirun CLI version 1.15.0 and above, all host ports are now moved to clusters.yaml file. Previously those were JSON files stored in the host directory.
Modules without defined hosts, had ports defined in modules.yaml file. From Nomirun CLI version 1.15.0 and above, all host ports are now moved to clusters.yaml file.
If you used Nomirun before, you’ll need to manually migrate those ports to the new format.
From this:
modules:
- name: SolarInverters
csproj: SolarPlatform\src\SolarInverters\SolarInverters.csproj
hostPorts:
httpPort: 5310
httpsPort: 5311
grpcPort: 5312
grpcsPort: 5313
metricsHttpPort: 5314
metricsHttpsPort: 5315
To:
modules:
- name: SolarInverters
csproj: SolarPlatform\src\SolarInverters\SolarInverters.csproj
clusters.yaml file:
clusters:
- name: SolarInverters
hosts:
- name: SolarInverters
hostPath: \hosts\SolarInverters
hostFramework: net10.0
hostPlatform: win-x64
hostVersion: latest
hostPorts:
httpPort: 5310
httpsPort: 5311
grpcPort: 5312
grpcsPort: 5313
metricsHttpPort: 5314
metricsHttpsPort: 5315
modules:
- name: SolarInverters
version:
extensions: ...
configuration: ...
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
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:
extensions:
- name: Nomirun.Host.OpenTelemetry
version: 1.0.0
hash: D3D7CF2B592A4C233E27CAB56A5C77D065567DF2DDB9C95B7E2B66835CEAF928A2638B5E777DB7CBEFA3109CDB623381D1DF829BE8A04187F2CC7CC15B851B13
configuration:
caching:
type: Memory
redisConnectionString:
metrics:
username: user
password: pass
swagger:
username: user
password: pass
otel:
hostUrl: http://otel-collector.localhost:4317
protocol:
headers:
serilog:
using:
- Serilog.Sinks.Console
minimumLevel:
default: Debug
override:
microsoft: Debug
interceptorsHelper: Debug
rateLimiting:
policies:
- endpoint: Global
limit: 250
periodInSeconds: 5
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.
From Nomirun CLI
1.15.0and above, each host in the cluster contains extensions and configuration sections. And the example is above. This is the place where you define hosts configuration and that is then used when running you clusters.
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.
This can be done manually or through the nomi init command which will create .gitignore file and initialize git repository for you.
.gitignore file manuallyIn 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.
You also see these instructions in the
nomi initGit configuration step.
Team member can clone the repository like this:
Warning this will overwrite the existing files in the local folder from remote. If you configured .gitignore correctly, only four files mentioned above will be overwritten.
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
You also see these instructions in the
nomi initGit configuration step.
Now the whole team can have the same Nomirun configuration.
If you have a module or solution repository shared with your team, you can pull down the source code from a remote Git repository.
~/.nomirun/repos directory. This foldergit clone <repository URL> <module or solution name> command.`Authenticate to a remote Git repository if needed.
If the nuget.config is not shared, you need to regenerate it from Nomirun.config by running:
nomi config nugetconf -o c:\Users\<user>\.nomirun\repos\<module or solution name>