Skip to content

Commit 4662e41

Browse files
author
szjanikowski
committed
Quick start further updates
1 parent a51dcef commit 4662e41

1 file changed

Lines changed: 37 additions & 13 deletions

File tree

docs/quick-start.md

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,19 @@ We recommend using the following directory structure:
2828
```
2929
your-workspace/
3030
├── noesis-workspace/
31-
│ ├── data/ # Noesis data (cache, results) - empty folder
32-
│ └── license.jwt # License file obtained from Noesis team
33-
├── my-system-repo/ # Your .NET repository to analyze
34-
└── noesis-config/ # Noesis DSL configuration project
31+
│ ├── data/ # Noesis data (cache, results) - empty folder
32+
│ └── license.jwt # License file obtained from Noesis team
33+
├── git-repos/ # Root directory with .NET git repositories to analyze
34+
├── git-repos/my-system-repo/ # Reposiotry which you want to analyze
35+
└── git-repos/noesis-config/ # Noesis DSL configuration project
3536
```
37+
:::info TIP for organizing your repos
38+
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+
:::
3640

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:
3844

3945
```
4046
your-workspace/
@@ -43,9 +49,10 @@ your-workspace/
4349
│ └── license.jwt # License file obtained from Noesis team
4450
```
4551

52+
4653
## Step 2: Docker Authentication
4754

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:
4956

5057
```bash
5158
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
7784

7885
## Step 4: Basic Configuration - Domain Modules
7986

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
8195

8296
### 4.1: Create Configuration Project
8397

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`:
84104
```bash
85105
# Create configuration project next to noesis-workspace
86106
dotnet new classlib -n noesis-config
@@ -100,7 +120,7 @@ namespace NoesisConfig
100120
public static FullAnalysisConfig Create() => FullAnalysisConfigBuilder
101121
.System("My System") // System name in documentation
102122
.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
104124
.Conventions(conventions => conventions
105125
.ForDomainModules(convention => convention
106126
.UseNamespaceHierarchy())) // Creates modules from namespaces
@@ -109,13 +129,17 @@ namespace NoesisConfig
109129
```
110130

111131
### 4.3: Run with Module Configuration
112-
132+
Navigate back to noesis-workspace
113133
```bash
114134
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!**
115138

139+
```bash
116140
docker run \
117-
-v ../noesis-config:/externalConfig:ro \
118-
-v ../my-system-repo:/externalSources:ro \
141+
-v ../git-repos/noesis-config:/externalConfig:ro \
142+
-v ../git-repos:/externalSources:ro \
119143
-v ./data:/data \
120144
-v ./license.jwt:/license.jwt:ro \
121145
-p 8088:8080 \
@@ -126,7 +150,7 @@ docker run \
126150
### 4.4: Verify Modules
127151

128152
1. Open `http://localhost:8088`
129-
2. Run a scan of your repository
153+
2. Run a scan of your repository - the scanning may take a while - check logs for details and potential errors.
130154
3. Go to the scan results and click **Modules** section - you should see modules created from your project's namespaces in the tree on the left.
131155

132156
🎉 **Second Success!** Noesis recognized your system structure and created domain modules.
@@ -169,7 +193,7 @@ For more options on how to configure entry point detection please refer to the [
169193

170194
### 5.2: Run with Entry Points Configuration
171195

172-
Run the container again with updated configuration:
196+
Run the container again with updated configuration.
173197

174198
```bash
175199
docker run \

0 commit comments

Comments
 (0)