You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a local machine, **the easiest way to start is to create noesis-workspace next to your directory with the git repositories** (*obviously your git repository can be named differently than `git-repos`*). However, if you want to share only selected repos with Noesis, you may as well create a separate directory and put the scanned repos there. It is also a good practice if you want to scan different versions of git-repos than the ones which you currently modify.
39
+
:::
36
40
37
-
At the beginning you will need :
41
+
`noesis-config` is a new .NET library with Noesis DSL which you will create as a part of this tutorial. We recommend that thhis config eventualy becomes one of your git repositories, so it's a good idea to put it inside `git-repos` as well.
42
+
43
+
Please note that for the first quick check you will need only:
38
44
39
45
```
40
46
your-workspace/
@@ -43,9 +49,10 @@ your-workspace/
43
49
│ └── license.jwt # License file obtained from Noesis team
44
50
```
45
51
52
+
46
53
## Step 2: Docker Authentication
47
54
48
-
Start Docker or make sure that it's up. Before running Noesis, you need to authenticate with the Noesis Docker registry:
55
+
Start Docker or make sure that it's up and running. You need to authenticate with the Noesis Docker registry using `noesis-packages` as a username:
49
56
50
57
```bash
51
58
docker login ghcr.io -u noesis-packages
@@ -77,10 +84,23 @@ Open your browser and navigate to `http://localhost:8088`. You should see the No
77
84
78
85
## Step 4: Basic Configuration - Domain Modules
79
86
80
-
Now we'll configure Noesis to analyze your repository. Let's start by creating a basic configuration that will create domain modules from namespace hierarchy.
87
+
Now we'll configure Noesis to analyze your repository. Let's start by creating a basic configuration that will detect domain modules according to namespace hierarchy.
88
+
In order to acheive that you are going to configure two new volumes in the container:
89
+
-`externalSources` - it is a root directory of all the code repositories you want to scan
90
+
-`externalConfig` - is a path to .NET project where in Noesis DSL you will specify your scanning rules and architecture conventions
91
+
92
+
### 4.0: Make sure the code for analysis is in `git-repos`
93
+
94
+
Clone the .NET repo to the `git-repos` directory or make sure that it is available there. In the tutorial we will assume that your repo name is `my-system-repo`no
81
95
82
96
### 4.1: Create Configuration Project
83
97
98
+
Now we will create a new configuration project `noesis-config` which we recommend to keep in git-repos as well. Make sure you are in the `git-repos` directory
99
+
```bash
100
+
cd git-repos
101
+
```
102
+
103
+
Create a .NET library project named `noesis-config`:
84
104
```bash
85
105
# Create configuration project next to noesis-workspace
.System("My System") // System name in documentation
102
122
.Repositories(repositories => repositories
103
-
.UseLocal("Main", "../my-system-repo")) // Path to your repository
123
+
.UseLocal("Main", "../my-system-repo")) // Path to your repository relative to the externalSources dir
104
124
.Conventions(conventions => conventions
105
125
.ForDomainModules(convention => convention
106
126
.UseNamespaceHierarchy())) // Creates modules from namespaces
@@ -109,13 +129,17 @@ namespace NoesisConfig
109
129
```
110
130
111
131
### 4.3: Run with Module Configuration
112
-
132
+
Navigate back to noesis-workspace
113
133
```bash
114
134
cd noesis-workspace
135
+
```
136
+
137
+
Run the docker command with the 2 new volumes added. **Please note that for `externalSources` you need to use root `git-repos` directory, not the full link to your repo!**
0 commit comments