Skip to main content

Developer PowerShell

Developer PowerShell is a PowerShell profile that is optimized for development. It is a collection of scripts and configurations that are used to set up a development environment. The profile is designed to be used with the OctoMesh development environment.

Definitions and Concepts

  • Main Repositories: All repositories that are the "core" of OctoMesh, currently all except Plugs and Sockets. They are connecting directly or indirectly to MongoDB directly.
  • Main Services: The services of the main repositories

Here is a list of users that are needed for main services to connect to mongodb.

UserDefault Password in dev environmentComment
octo-system-adminOctoAdmin1User for creating tenants and configuration tenant independent
octo-system-ds-user-0OctoUser1User for the databases, 0 is the name of the database in MongoDB.

PowerShell Commands

Repository Management

CommandDescription
Invoke-CloneMainReposClones all main repositories to your root directory.
Sync-AllGitReposPulls all repositories starting with octo-*.
Sync-GitRepoPulls a repository from GitHub using the current directory by default or defining a parameter repositoryPath.
Push-GitRepoPushes a repository to GitHub using the current directory by default or defining a parameter repositoryPath.
Push-AllGitReposPushes all repositories starting with octo-*.
Get-AllGitRepStatusGets the status of all repositories starting with octo-* and mm-*
Invoke-CleanAllGitReposCleans all repositories starting with octo-* and mm-*. The force parameter is set to false by default.

Submodule Management

CommandDescription
Sync-AllSubmodulesPulls all submodules of all repositories starting with octo-*.
Sync-SubmodulePulls all submodules of a repository from GitHub using the current directory by default or defining a parameter repositoryPath.

Build Management

CommandDescription
Invoke-BuildBuilds a repository for .NET using the current directory by default or defining a parameter repositoryPath.
Invoke-BuildAllBuilds all repositories starting with octo-* and a solution file (*.sln).
Invoke-PublishPublishes the current directory by default or defining a parameter repositoryPath. Uses the configuration Release by default.
Invoke-BuildFrontendBuilds the octo-frontend-admin-panel repository and reinstalls Node modules
Invoke-BuildAndStartOctoBuilds all repositories and starts the main services.
Remove-BinAndObjFoldersRecursively deletes bin and obj folders within the specified path. Default path is .!

Service Management

CommandDescription
Start-OctoStarts the main services.

Infrastructure Management

For further information on the infrastructure management and requirements please refer to the infrastructure documentation

CommandDescription
Install-OctoInfrastructureUses the Docker Compose file located at infrastructure to compose the infrastructure dependencies.
Uninstall-OctoInfrastructureUninstalls the infrastructure dependencies by using the Docker Compose file at infrastructure.
Start-OctoInfrastructureStarts the infrastructure dependencies by using the Docker Compose file at infrastructure.
Stop-OctoInfrastructureStops the infrastructure dependencies by using the Docker Compose file at infrastructure.
Get-OctoInfrastructureStatusGets the status of containers by using the Docker Compose file at infrastructure.
Invoke-KillDotnetWindows only. Kills all dotnet processes. This is necessary to avoid file locks during build process.

NuGet Package Management

CommandDescription
Copy-NuGetPackagesFinds NuGet packages for version 999.0.0 and copies them to $NUGETPATH using the current directory by default or defining a parameter directory.
Copy-AllNugetPackagesScans all octo-* and mm-* directories for NuGet packages for version 999.0.0 and copies them to $NUGETPATH.
Remove-GlobalNugetPackagesRemoves in the global NuGet package folder ($GLOBALNUGETPACKAGESPATH) all MeshMaker NuGet packages in version 999.0.0.
Sync-NugetPackagesCopies, removes globally, and restores NuGet packages.

CLI Management

CommandDescription
Invoke-OctoCliLoginLocalLocal login into the CLI. Default tenantId is meshtest.
Invoke-OctoCliReconfigureLogLevelAllows for reconfiguring of Log levels of Identity, AssetRepository, Bot, CommunicationController and AdminPanel. Required Paramters: loggerName, minLogLevel and maxLogLevel
Invoke-SetDebugConfigurationSets the configuration for the admin panel to debug. Ensure that you have logged in to identity services Invoke-OctoCliLoginLocal

Kubernetes Management

CommandDescription
Join-KubeConfigsMerges external Kubernetes configuration with existing ~/.kube/config file. externalKubeConfig parameter can be configured.
Remove-KubeConfigRemoves Kubernetes configuration with required name parameter.