archsight 0.3.3 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -1
- data/docs/archimate.md +21 -1
- data/docs/configuration.md +1 -0
- data/docs/diagram.md +15 -3
- data/docs/docker.md +4 -1
- data/docs/icons.md +8 -2
- data/docs/import.md +178 -55
- data/docs/index.md.erb +24 -18
- data/docs/modeling.md +645 -34
- data/docs/pages.md +46 -15
- data/docs/search.md +21 -1
- data/docs/togaf.md +2 -1
- data/lib/archsight/analysis/result.rb +8 -2
- data/lib/archsight/analysis/sandbox.rb +8 -0
- data/lib/archsight/analysis/typst_renderer.rb +245 -0
- data/lib/archsight/analysis.rb +1 -0
- data/lib/archsight/annotations/annotation.rb +30 -3
- data/lib/archsight/annotations/architecture_annotations.rb +47 -0
- data/lib/archsight/annotations/link_annotations.rb +15 -0
- data/lib/archsight/annotations/resource_reference.rb +12 -0
- data/lib/archsight/cli.rb +124 -23
- data/lib/archsight/database.rb +40 -0
- data/lib/archsight/diagram/cli.rb +50 -2
- data/lib/archsight/diagram/formatter.rb +112 -0
- data/lib/archsight/diagram/routing/edge_router/orthogonal_path.rb +38 -10
- data/lib/archsight/diagram/routing/edge_router.rb +29 -4
- data/lib/archsight/diagram/routing/edge_routing.rb +61 -5
- data/lib/archsight/diagram/style/theme.rb +7 -2
- data/lib/archsight/documentation.rb +4 -4
- data/lib/archsight/editor/page_source.rb +13 -1
- data/lib/archsight/export/confluence/analysis_output.rb +100 -0
- data/lib/archsight/export/confluence/client.rb +13 -0
- data/lib/archsight/export/confluence/diagram_links.rb +1 -1
- data/lib/archsight/export/confluence/exporter.rb +43 -14
- data/lib/archsight/export/confluence/labels.rb +25 -0
- data/lib/archsight/export/confluence/page_properties.rb +6 -9
- data/lib/archsight/export/confluence/storage.rb +63 -14
- data/lib/archsight/export/confluence/tables.rb +2 -3
- data/lib/archsight/git_source.rb +81 -0
- data/lib/archsight/helpers/asset_images.rb +3 -4
- data/lib/archsight/helpers/embeds.rb +18 -7
- data/lib/archsight/helpers/resource_resolver.rb +25 -0
- data/lib/archsight/import/executor.rb +140 -16
- data/lib/archsight/import/handler.rb +55 -6
- data/lib/archsight/import/handler_loader.rb +64 -0
- data/lib/archsight/import/handlers/cache_pruner.rb +30 -7
- data/lib/archsight/import/handlers/command.rb +120 -0
- data/lib/archsight/import/handlers/github.rb +4 -1
- data/lib/archsight/import/handlers/gitlab.rb +4 -1
- data/lib/archsight/import/handlers/go_dep_resolver.rb +10 -2
- data/lib/archsight/import/handlers/go_grapher.rb +102 -5
- data/lib/archsight/import/handlers/go_module_parser.rb +88 -0
- data/lib/archsight/import/handlers/grapher.rb +40 -1
- data/lib/archsight/import/handlers/repository.rb +3 -0
- data/lib/archsight/import/handlers/rest_api_index.rb +3 -0
- data/lib/archsight/import/registry.rb +22 -1
- data/lib/archsight/import.rb +89 -1
- data/lib/archsight/linter/structure.rb +239 -0
- data/lib/archsight/linter.rb +123 -16
- data/lib/archsight/markdown.rb +48 -0
- data/lib/archsight/openapi.rb +169 -0
- data/lib/archsight/page_loader.rb +12 -1
- data/lib/archsight/page_tree.rb +2 -3
- data/lib/archsight/query/evaluator.rb +13 -6
- data/lib/archsight/query/parser.rb +73 -6
- data/lib/archsight/query.rb +1 -1
- data/lib/archsight/references.rb +3 -3
- data/lib/archsight/renderer.rb +80 -23
- data/lib/archsight/resources/analysis.rb +3 -2
- data/lib/archsight/resources/application_component.rb +75 -7
- data/lib/archsight/resources/application_interface.rb +12 -0
- data/lib/archsight/resources/application_service.rb +12 -1
- data/lib/archsight/resources/base.rb +58 -5
- data/lib/archsight/resources/business_actor.rb +5 -0
- data/lib/archsight/resources/business_contract.rb +72 -0
- data/lib/archsight/resources/business_product.rb +12 -0
- data/lib/archsight/resources/business_role.rb +1 -0
- data/lib/archsight/resources/implementation_deliverable.rb +1 -0
- data/lib/archsight/resources/implementation_plateau.rb +8 -2
- data/lib/archsight/resources/implementation_work_package.rb +2 -1
- data/lib/archsight/resources/import.rb +37 -11
- data/lib/archsight/resources/location.rb +56 -0
- data/lib/archsight/resources/motivation_requirement.rb +6 -0
- data/lib/archsight/resources/motivation_stakeholder.rb +14 -0
- data/lib/archsight/resources/page.rb +4 -7
- data/lib/archsight/resources/strategy_capability.rb +9 -0
- data/lib/archsight/resources/technology_artifact.rb +11 -4
- data/lib/archsight/resources/technology_communication_network.rb +91 -0
- data/lib/archsight/resources/technology_device.rb +88 -0
- data/lib/archsight/resources/technology_equipment.rb +75 -0
- data/lib/archsight/resources/technology_facility.rb +70 -0
- data/lib/archsight/resources/technology_node.rb +50 -0
- data/lib/archsight/resources/technology_service.rb +33 -0
- data/lib/archsight/resources/technology_system_software.rb +28 -0
- data/lib/archsight/resources.rb +12 -0
- data/lib/archsight/version.rb +1 -1
- data/lib/archsight/web/api/analysis_helpers.rb +55 -0
- data/lib/archsight/web/api/docs.rb +2 -1
- data/lib/archsight/web/api/json_helpers.rb +3 -37
- data/lib/archsight/web/api/openapi/spec.yaml +146 -35
- data/lib/archsight/web/api/page_helpers.rb +1 -8
- data/lib/archsight/web/api/routes.rb +9 -4
- data/lib/archsight/web/application.rb +40 -4
- data/lib/archsight/web/editor/routes.rb +2 -1
- data/lib/archsight/web/public/vendor/redoc/LICENSE +22 -0
- data/lib/archsight/web/public/vendor/redoc/VERSION +1 -0
- data/lib/archsight/web/public/vendor/redoc/api.html +27 -0
- data/lib/archsight/web/public/vendor/redoc/api.js +19 -0
- data/lib/archsight/web/public/vendor/redoc/redoc.standalone.js +1851 -0
- data/lib/archsight/web/public/vendor/redoc/redoc.standalone.js.LICENSE.txt +102 -0
- data/lib/archsight/web/public/vue/DocPage-C2ubTXH7.js +1 -0
- data/lib/archsight/web/public/vue/EditorPage-Dso6PLMn.js +35 -0
- data/lib/archsight/web/public/vue/ErrorPage-DnZ6YJLi.js +2 -0
- data/lib/archsight/web/public/vue/GraphView-CTl03Yre.js +1 -0
- data/lib/archsight/web/public/vue/HomePage-C339nihQ.js +2 -0
- data/lib/archsight/web/public/vue/InstanceRouter-DFW7tOrD.js +1 -0
- data/lib/archsight/web/public/vue/InstanceRouter-ZaCcjlIX.css +1 -0
- data/lib/archsight/web/public/vue/KindList-C0oaM3CF.js +1 -0
- data/lib/archsight/web/public/vue/KindList-yYcRT2BV.css +1 -0
- data/lib/archsight/web/public/vue/PageView-B93woeN3.css +1 -0
- data/lib/archsight/web/public/vue/PageView-OZB6G9Wu.js +1 -0
- data/lib/archsight/web/public/vue/QueryError-C2xLkCEm.js +1 -0
- data/lib/archsight/web/public/vue/ResourceList-D75O87zG.css +1 -0
- data/lib/archsight/web/public/vue/ResourceList-DooWFwQP.js +2 -0
- data/lib/archsight/web/public/vue/SearchResults-BK-HjFnv.js +1 -0
- data/lib/archsight/web/public/vue/{SearchResults-BewvsfOc.css → SearchResults-BV6UHriJ.css} +1 -1
- data/lib/archsight/web/public/vue/WikiPage-B2FYmeHL.js +3 -0
- data/lib/archsight/web/public/vue/WikiPage-TpmM1VAF.css +1 -0
- data/lib/archsight/web/public/vue/architecture-WOLXFQ4H-BGN-TV5r.js +1 -0
- data/lib/archsight/web/public/vue/cynefin-EF2NZ3EQ-CZd6g_tq.js +1 -0
- data/lib/archsight/web/public/vue/eventmodeling-K75KTNOO-CYnbEx8O.js +1 -0
- data/lib/archsight/web/public/vue/gitGraph-VSP46ZUC-DialfQSk.js +1 -0
- data/lib/archsight/web/public/vue/graphviz-1lWBhpEX.js +3 -0
- data/lib/archsight/web/public/vue/index-BLSE5DSv.css +1 -0
- data/lib/archsight/web/public/vue/index-CLuLTE5I.js +3 -0
- data/lib/archsight/web/public/vue/info-OHQRW6UA-BuhOW7ss.js +1 -0
- data/lib/archsight/web/public/vue/katex-B_JcIwqj.js +257 -0
- data/lib/archsight/web/public/vue/mermaid-C3bOamfn.js +3999 -0
- data/lib/archsight/web/public/vue/packet-JDAUHWVQ-CUeRz7w4.js +1 -0
- data/lib/archsight/web/public/vue/pie-XZMESJXO-DnuewJI6.js +1 -0
- data/lib/archsight/web/public/vue/radar-ABXABTNO-Bi9l8bcv.js +1 -0
- data/lib/archsight/web/public/vue/railroad-I3PHUGI6-DSlxFbxk.js +1 -0
- data/lib/archsight/web/public/vue/railroad-abnf-LNEFI6M7-D6Kqu8wu.js +1 -0
- data/lib/archsight/web/public/vue/railroad-ebnf-DWYD2UWJ-MR7uCYT0.js +1 -0
- data/lib/archsight/web/public/vue/railroad-peg-JR7BVNR7-BL7aKIc-.js +1 -0
- data/lib/archsight/web/public/vue/rolldown-runtime-COiEfhsA.js +1 -0
- data/lib/archsight/web/public/vue/treeView-D4JQ5SDB-CamtB04D.js +1 -0
- data/lib/archsight/web/public/vue/treemap-SAJKECNS-DeQxu_HM.js +1 -0
- data/lib/archsight/web/public/vue/{useGraphviz-DlSnFeCL.js → useGraphviz-Dnm2pkon.js} +2 -2
- data/lib/archsight/web/public/vue/useHighlight-BH32C7yt.js +10 -0
- data/lib/archsight/web/public/vue/usePanZoom-HxgEsqq2.js +12 -0
- data/lib/archsight/web/public/vue/wardley-7MLQ67FV-BvKIB6Tv.js +1 -0
- data/lib/archsight/web/public/vue.html +5 -5
- metadata +68 -41
- data/lib/archsight/web/public/vue/ApiDocsPage-BgqnQgwa.js +0 -1
- data/lib/archsight/web/public/vue/ApiDocsPage-DZ0fa5-h.css +0 -1
- data/lib/archsight/web/public/vue/DocPage-CNO71nBH.js +0 -1
- data/lib/archsight/web/public/vue/EditorPage-DR0FCNTz.js +0 -35
- data/lib/archsight/web/public/vue/ErrorPage-BfYArv6s.js +0 -2
- data/lib/archsight/web/public/vue/GraphView-BVTW30Ak.js +0 -1
- data/lib/archsight/web/public/vue/HomePage-Wk9P4Pma.js +0 -2
- data/lib/archsight/web/public/vue/InstanceRouter-BV8ycydz.js +0 -1
- data/lib/archsight/web/public/vue/InstanceRouter-jeavM6PW.css +0 -1
- data/lib/archsight/web/public/vue/KindList-C8yMsN5J.js +0 -1
- data/lib/archsight/web/public/vue/PageView-BaN6TyJB.js +0 -1
- data/lib/archsight/web/public/vue/QueryError-D790wH-a.js +0 -1
- data/lib/archsight/web/public/vue/ResourceList-B0FLaFR3.css +0 -1
- data/lib/archsight/web/public/vue/ResourceList-D-66nas2.js +0 -2
- data/lib/archsight/web/public/vue/SearchResults-CHyqIerQ.js +0 -1
- data/lib/archsight/web/public/vue/WikiPage-D2svpk6B.js +0 -13
- data/lib/archsight/web/public/vue/WikiPage-DoFJ0dbW.css +0 -1
- data/lib/archsight/web/public/vue/architecture-7GRP2DOG-BfA1TPxQ.js +0 -1
- data/lib/archsight/web/public/vue/cynefin-OW5HDTMX-BmgdUKVD.js +0 -1
- data/lib/archsight/web/public/vue/eventmodeling-NTZA5JFV-DbXDvAWF.js +0 -1
- data/lib/archsight/web/public/vue/gitGraph-4MIJSDKK-BkVhrKS1.js +0 -1
- data/lib/archsight/web/public/vue/graphviz-SXWTgZH5.js +0 -3
- data/lib/archsight/web/public/vue/index-BXXkUK1V.js +0 -3
- data/lib/archsight/web/public/vue/index-Cov1SnzY.css +0 -1
- data/lib/archsight/web/public/vue/info-A6RAGUB7-BIlCVuUY.js +0 -1
- data/lib/archsight/web/public/vue/katex-CXMH3UgJ.js +0 -257
- data/lib/archsight/web/public/vue/mermaid-BjEi5URd.js +0 -3334
- data/lib/archsight/web/public/vue/packet-AYTQ26CC-eoQTjY3j.js +0 -1
- data/lib/archsight/web/public/vue/pie-WAS4IAKB-DEOotGhh.js +0 -1
- data/lib/archsight/web/public/vue/radar-RG4KPBEZ-C2yucuUN.js +0 -1
- data/lib/archsight/web/public/vue/railroad-74A4TZTK-CzONK5VY.js +0 -1
- data/lib/archsight/web/public/vue/railroad-abnf-HS5TGJTU-9zRPsDsx.js +0 -1
- data/lib/archsight/web/public/vue/railroad-ebnf-LZEXJU2U-BJ4dkz9l.js +0 -1
- data/lib/archsight/web/public/vue/railroad-peg-WCYAUIDC-DFy_rqAj.js +0 -1
- data/lib/archsight/web/public/vue/treeView-Q6P3EWNA-2cq5CyD2.js +0 -1
- data/lib/archsight/web/public/vue/treemap-WGGIJYW6-DK-e9Ez4.js +0 -1
- data/lib/archsight/web/public/vue/useHighlight-D5Gf8DLl.js +0 -10
- data/lib/archsight/web/public/vue/wardley-WFR3VGLG-BQwqUqfB.js +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0312d7e0c0790b8b2a117ad6277e49bfb18c61545134b27510fa3209e951697d
|
|
4
|
+
data.tar.gz: 94915564bbbab8c59e139422c1a99317ec7fd5a87370e9905b16ed330cd56951
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b15fc5fb4130fe0783efe8e20cf7aa2ce3962e6566d54ae5c1c85834692e5363cc3a9667eb2f7cfbf17832badc0461cbf684c1d5a5c04711e5e529d1fb11bb2
|
|
7
|
+
data.tar.gz: 36e154fb3fefd3dd0de59ced6d6f404e4238242ec182d78f5ced051fec01002a3af8dbe11c8eced3ff16fc978791301627fe3f06641e0ea859e9a529326ea814
|
data/README.md
CHANGED
|
@@ -48,13 +48,19 @@ Also available as [Docker](docs/docker.md) image and [Helm chart](docs/kubernete
|
|
|
48
48
|
archsight web [OPTIONS] # Start web server
|
|
49
49
|
archsight lint # Validate YAML and relations
|
|
50
50
|
archsight import # Execute pending imports
|
|
51
|
-
archsight analyze # Execute analysis scripts
|
|
51
|
+
archsight analyze # Execute analysis scripts (--format typst -o out.typ for Typst source)
|
|
52
52
|
archsight template KIND # Generate YAML template for a resource type
|
|
53
53
|
archsight diagram FILE.asd # Render a diagram DSL file to SVG
|
|
54
54
|
archsight console # Interactive Ruby console
|
|
55
55
|
archsight version # Show version
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
### Analysis as Typst
|
|
59
|
+
|
|
60
|
+
`archsight analyze --format typst [-o report.typ] [-f REGEX] [-v]` writes the results of all (or the filtered) analyses as one [Typst](https://typst.app) document instead of the terminal rendering: a summary, a section per analysis with its tables, lists, text and messages, and `asd` code sections as inline SVG diagrams. Without `-o` the source goes to stdout; paste it into typst.app or run `typst compile report.typ`. `-v` keeps all rows (otherwise tables and lists are cut after 10) and the error backtraces.
|
|
61
|
+
|
|
62
|
+
`--template layout.typ` replaces the built-in layout with your own. The document then imports the template and calls two functions it must define: `archsight-report` as a show rule (`count`, `passed`, `failed`, `findings`), and `analysis-result(name:, description:, state:, duration:, data:)[body]` once per analysis, where `body` is the rendered sections and `data` is a dictionary of what the script passed to `data(key, value)`. `data` sections appear only here (not in the web UI or terminal), so a script can hand structured values (for example a matrix) to a template while keeping its tables for the web. With a template, tables and lists are never cut.
|
|
63
|
+
|
|
58
64
|
### Web Server Options
|
|
59
65
|
|
|
60
66
|
```bash
|
data/docs/archimate.md
CHANGED
|
@@ -39,6 +39,15 @@ ArchiMate is an open and independent enterprise architecture modeling language d
|
|
|
39
39
|
|--------------|-------------|
|
|
40
40
|
| **Specialization** | Represents that an element is a particular kind of another element. |
|
|
41
41
|
|
|
42
|
+
### Support in archsight
|
|
43
|
+
|
|
44
|
+
| Relationship | Supported as |
|
|
45
|
+
|--------------|--------------|
|
|
46
|
+
| **Specialization** | `specializes` between technology elements of one kind (node, system software, service), see "Concept and Implementation" in the modeling guide |
|
|
47
|
+
| **Composition** | `composedOf` between nodes and between system software |
|
|
48
|
+
| **Aggregation** | `aggregates` between technology artifacts (an image contains packages), see "Deployment" in the modeling guide |
|
|
49
|
+
| **Assignment** | `assignedTo` from a node or system software to the technology artifacts deployed on it |
|
|
50
|
+
|
|
42
51
|
### Relationship Connectors
|
|
43
52
|
|
|
44
53
|
| Connector | Description |
|
|
@@ -100,6 +109,9 @@ ArchiMate is an open and independent enterprise architecture modeling language d
|
|
|
100
109
|
| **Representation** | A perceptible form of the information carried by a business object. |
|
|
101
110
|
| **Product** | A coherent collection of services and/or passive structure elements, accompanied by a contract, offered to customers. |
|
|
102
111
|
|
|
112
|
+
Archsight models Contract as `BusinessContract` (aggregated by a `BusinessProduct`, `agreedBy` its parties, `composedOf` its
|
|
113
|
+
call-offs, SLAs and amendments) and Product as `BusinessProduct`. Business Object and Representation are not modelled.
|
|
114
|
+
|
|
103
115
|
## Application Layer Elements
|
|
104
116
|
|
|
105
117
|
### Active Structure Elements
|
|
@@ -140,6 +152,8 @@ ArchiMate is an open and independent enterprise architecture modeling language d
|
|
|
140
152
|
| **Path** | A link between two or more technology internal active structure elements, through which these elements can exchange data, energy, or material. |
|
|
141
153
|
| **Communication Network** | A set of structures and behaviors that connects devices or system software for transmission, routing, and reception of data. |
|
|
142
154
|
|
|
155
|
+
**Supported in archsight:** Device (`TechnologyDevice`) and Communication Network (`TechnologyCommunicationNetwork`) are modelled in the Technology layer. A device is one physical machine; the cable between two devices is the ArchiMate association `connectedTo`, a network is `realizedBy` its switches and routers and `connects` the devices attached to it. Path is not modelled: a link between facilities is `TechnologyEquipment`. See [Logical Networks](/doc/modeling) and, for which kind to pick, [Choosing the Kind: Infrastructure](modeling.md#choosing-the-kind-infrastructure).
|
|
156
|
+
|
|
143
157
|
### Behavior Elements
|
|
144
158
|
|
|
145
159
|
| Element | Definition |
|
|
@@ -165,6 +179,8 @@ ArchiMate is an open and independent enterprise architecture modeling language d
|
|
|
165
179
|
| **Distribution Network** | A physical network used to transport materials or energy. |
|
|
166
180
|
| **Material** | Tangible physical matter or energy. |
|
|
167
181
|
|
|
182
|
+
**Supported in archsight:** Equipment (`TechnologyEquipment`) and Facility (`TechnologyFacility`) are modelled, as kinds of the Technology layer (ArchiMate defines the physical elements as an extension of it). Distribution Network and Material are not. See [Where Technology Runs](/doc/modeling) and, for which kind to pick, [Choosing the Kind: Infrastructure](modeling.md#choosing-the-kind-infrastructure).
|
|
183
|
+
|
|
168
184
|
## Implementation and Migration Layer Elements
|
|
169
185
|
|
|
170
186
|
| Element | Definition |
|
|
@@ -182,6 +198,8 @@ ArchiMate is an open and independent enterprise architecture modeling language d
|
|
|
182
198
|
| **Grouping** | Aggregates or composes concepts that belong together based on some common characteristic. |
|
|
183
199
|
| **Location** | A conceptual or physical place or position where concepts are located (structure elements) or performed (behavior elements). |
|
|
184
200
|
|
|
201
|
+
**Supported in archsight:** Location (`Location`) is modelled and shown under Other. Grouping is not.
|
|
202
|
+
|
|
185
203
|
## ArchiMate Layers
|
|
186
204
|
|
|
187
205
|
ArchiMate organizes elements into distinct layers:
|
|
@@ -191,9 +209,11 @@ ArchiMate organizes elements into distinct layers:
|
|
|
191
209
|
3. **Business Layer** - What: business processes, actors, services, objects
|
|
192
210
|
4. **Application Layer** - How: application components, services, data objects
|
|
193
211
|
5. **Technology Layer** - How: infrastructure, nodes, devices, networks
|
|
194
|
-
6. **Physical Layer** - Where: facilities, equipment, materials, distribution networks
|
|
212
|
+
6. **Physical Layer** - Where: facilities, equipment, materials, distribution networks (archsight: `TechnologyFacility` and `TechnologyEquipment` in the Technology layer, `Location` under Other)
|
|
195
213
|
7. **Implementation & Migration Layer** - When: work packages, plateaus, gaps
|
|
196
214
|
|
|
215
|
+
Capability, Product, Application Service and Application Component are easily mixed up in practice; [Choosing the Kind](modeling.md#choosing-the-kind) gives the question, test and naming for each; [Choosing the Kind: Infrastructure](modeling.md#choosing-the-kind-infrastructure) does the same for locations, facilities, equipment, networks and compute.
|
|
216
|
+
|
|
197
217
|
## Key Concepts
|
|
198
218
|
|
|
199
219
|
### Active vs Passive Structure
|
data/docs/configuration.md
CHANGED
|
@@ -37,6 +37,7 @@ that is set but empty counts as not set.
|
|
|
37
37
|
| `jira.server` | `ARCHSIGHT_JIRA_SERVER` | Name of the Jira server as Confluence knows it (the `server` parameter of its Jira macro). Needed by the Confluence export when Confluence has more than one Jira server: without it the exported `{jira:KEY}` macros have no server and Confluence shows an error |
|
|
38
38
|
| `jira.server_id` | `ARCHSIGHT_JIRA_SERVER_ID` | Id of that server (the `serverId` parameter). Copy both from the storage format of a Jira macro that already works in Confluence (page "Edit in storage format") |
|
|
39
39
|
| `jira.token` | `ARCHSIGHT_JIRA_TOKEN` | Reserved, nothing uses it yet |
|
|
40
|
+
| `import.cache_root` | `ARCHSIGHT_IMPORT_CACHE_ROOT` | Where the GitHub, GitLab and repository imports clone repositories, and what importers of the resources repository get as `cache_root` / `ARCHSIGHT_CACHE_DIR`. Default `~/.cache/archsight/git`; an import's own `import/config/cacheRoot` wins, see [Importers of the Resources Repository](/doc/import#importers-of-the-resources-repository). Every import makes sure the clones are not indexed by Spotlight (macOS): an empty `.metadata_never_index` in `~/.cache/archsight`, or in the cache root when it is elsewhere |
|
|
40
41
|
|
|
41
42
|
## Command line
|
|
42
43
|
|
data/docs/diagram.md
CHANGED
|
@@ -40,11 +40,20 @@ Ready-made sources live in `examples/diagrams/` (`archsight.asd` models archsigh
|
|
|
40
40
|
archsight diagram examples/diagrams/aws_vpc.asd -o diagram.svg
|
|
41
41
|
archsight diagram aws_vpc.asd --watch # re-renders on every save
|
|
42
42
|
archsight diagram three_tier.asd --relation=all # also show control/data-flow edges
|
|
43
|
-
archsight diagram overview.asd --theme=compact # denser spacing + smaller fonts (or cozy)
|
|
43
|
+
archsight diagram overview.asd --theme=compact # denser spacing + smaller fonts (or cozy, tight)
|
|
44
44
|
archsight diagram overview.asd --legend=bottom # legend below (or right/left/top/none; default auto)
|
|
45
45
|
archsight diagram *.asd # render every file to its own .svg
|
|
46
|
+
archsight diagram --format *.asd # re-indent the sources in place
|
|
47
|
+
archsight diagram --format --check *.asd # list unformatted sources, exit 1 if any (CI)
|
|
46
48
|
```
|
|
47
49
|
|
|
50
|
+
`--format` tidies the sources instead of rendering them: every line is
|
|
51
|
+
indented by its brace depth (two spaces per level), trailing whitespace
|
|
52
|
+
and runs of blank lines go, the file ends in one newline. Comments, line
|
|
53
|
+
breaks and one-line blocks stay as written. A file that does not parse is
|
|
54
|
+
reported and left alone, and the result is checked to parse to the same
|
|
55
|
+
diagram before it is written. With `-o` a single input is written there.
|
|
56
|
+
|
|
48
57
|
`-o`/`--output` only makes sense with a single input file; with multiple
|
|
49
58
|
inputs (including a shell glob like `*.asd`) each one is rendered next to
|
|
50
59
|
itself with a `.svg` extension. `--watch` works with multiple inputs too,
|
|
@@ -177,7 +186,7 @@ level, where `OP` is:
|
|
|
177
186
|
- `<->` — bidirectional (arrowheads on both ends).
|
|
178
187
|
- `--` — undirected (no arrowheads).
|
|
179
188
|
|
|
180
|
-
Edges between boxes that sit one above the other (or side by side) and overlap on the other axis are drawn as a single straight axis-aligned line when nothing is in the way, e.g. many components dropping straight down onto one wide database. An explicit `style "orthogonal"`
|
|
189
|
+
Edges between boxes that sit one above the other (or side by side) and overlap on the other axis are drawn as a single straight axis-aligned line when nothing is in the way, e.g. many components dropping straight down onto one wide database. An explicit `style "orthogonal"` takes that straight line too (it has no bend at all), and is never drawn diagonally.
|
|
181
190
|
|
|
182
191
|
Edge attributes:
|
|
183
192
|
- `label "..."` — text drawn along the edge.
|
|
@@ -231,10 +240,13 @@ From roomiest to densest:
|
|
|
231
240
|
| `default` | small diagrams; used when there's no `theme` statement | 13px |
|
|
232
241
|
| `cozy` | mid-sized diagrams: roughly halfway between the two | 12px |
|
|
233
242
|
| `compact` | large diagrams that would otherwise sprawl | 11px |
|
|
243
|
+
| `tight` | very large diagrams: `compact` with boxes that hug their labels | 11px |
|
|
234
244
|
|
|
235
245
|
`cozy` and `compact` shrink container padding, sibling gaps and node
|
|
236
246
|
sizes along with the fonts, and size each node from its label's real
|
|
237
|
-
Helvetica glyph widths so boxes hug their text.
|
|
247
|
+
Helvetica glyph widths so boxes hug their text. `tight` is `compact` with
|
|
248
|
+
less than half the space above and below a component's label and half the
|
|
249
|
+
space beside it. `--theme=NAME` on the CLI (or `theme:` in
|
|
238
250
|
`Archsight::Diagram.render`) overrides the file's own choice. The legend
|
|
239
251
|
isn't affected.
|
|
240
252
|
|
data/docs/docker.md
CHANGED
|
@@ -32,7 +32,10 @@ Access web interface at: <http://localhost:4567>
|
|
|
32
32
|
|
|
33
33
|
- Volume mount `-v "/path/to/resources:/resources"` mounts your resources directory
|
|
34
34
|
- Default command starts the web server on port 4567
|
|
35
|
-
- Pass subcommands directly (lint, version, console, template)
|
|
35
|
+
- Pass subcommands directly (lint, version, console, template, import)
|
|
36
|
+
- `import` runs the imports of the mounted repository, including its own handlers (`import/handlerPath` must point
|
|
37
|
+
inside `/resources`). The image has no git, go or python, so imports that clone repositories or run such programs
|
|
38
|
+
need a derived image
|
|
36
39
|
|
|
37
40
|
## Environment Variables
|
|
38
41
|
|
data/docs/icons.md
CHANGED
|
@@ -12,6 +12,7 @@ Current icon assignments for each resource type:
|
|
|
12
12
|
| ApplicationService | `cube` | <i class="iconoir-cube"></i> |
|
|
13
13
|
| BusinessActor | `community` | <i class="iconoir-community"></i> |
|
|
14
14
|
| ApplicationEvent | `bell-notification` | <i class="iconoir-bell-notification"></i> |
|
|
15
|
+
| BusinessContract | `journal-page` | <i class="iconoir-journal-page"></i> |
|
|
15
16
|
| BusinessControl | `shield-search` | <i class="iconoir-shield-search"></i> |
|
|
16
17
|
| BusinessEvent | `flash` | <i class="iconoir-flash"></i> |
|
|
17
18
|
| BusinessRole | `user-badge-check` | <i class="iconoir-user-badge-check"></i> |
|
|
@@ -34,6 +35,11 @@ Current icon assignments for each resource type:
|
|
|
34
35
|
| MotivationRequirement | `task-list` | <i class="iconoir-task-list"></i> |
|
|
35
36
|
| MotivationConstraint | `prohibition` | <i class="iconoir-prohibition"></i> |
|
|
36
37
|
| MotivationStakeholder | `user-crown` | <i class="iconoir-user-crown"></i> |
|
|
38
|
+
| TechnologyCommunicationNetwork | `network` | <i class="iconoir-network"></i> |
|
|
39
|
+
| TechnologyEquipment | `cpu` | <i class="iconoir-cpu"></i> |
|
|
40
|
+
| TechnologyDevice | `server` | <i class="iconoir-server"></i> |
|
|
41
|
+
| TechnologyFacility | `building` | <i class="iconoir-building"></i> |
|
|
42
|
+
| Location | `map-pin` | <i class="iconoir-map-pin"></i> |
|
|
37
43
|
| TechnologyNode | `server-connection` | <i class="iconoir-server-connection"></i> |
|
|
38
44
|
| StrategyCapability | `strategy` | <i class="iconoir-strategy"></i> |
|
|
39
45
|
| TechnologyArtifact | `puzzle` | <i class="iconoir-puzzle"></i> |
|
|
@@ -48,12 +54,12 @@ Icons and graph nodes take the colour of their layer.
|
|
|
48
54
|
|
|
49
55
|
| Layer | Colour | Graph (light) | Icon |
|
|
50
56
|
|-------|--------|---------------|------|
|
|
51
|
-
| Strategy | orange | `#F4A261` | `#D4824A` |
|
|
52
57
|
| Motivation | purple | `#CE93D8` | `#AB47BC` |
|
|
58
|
+
| Strategy | orange | `#F4A261` | `#D4824A` |
|
|
59
|
+
| Implementation & Migration | rose | `#F48FB1` | `#E0527F` |
|
|
53
60
|
| Business | yellow | `#F9DC5C` | `#D4B83C` |
|
|
54
61
|
| Application | blue | `#6CBEED` | `#4A9ECD` |
|
|
55
62
|
| Technology | green | `#8AC926` | `#7AB316` |
|
|
56
|
-
| Implementation & Migration | rose | `#F48FB1` | `#E0527F` |
|
|
57
63
|
| Other | gray | `#CCCCCC` | `#999999` |
|
|
58
64
|
|
|
59
65
|
## Icon Categories
|
data/docs/import.md
CHANGED
|
@@ -10,7 +10,9 @@ Imports are defined as YAML resources with kind `Import`. Each import specifies:
|
|
|
10
10
|
- **Configuration** specific to that handler
|
|
11
11
|
- Optional **caching** to avoid re-running unchanged imports
|
|
12
12
|
|
|
13
|
-
Dependencies between imports are automatically derived from the `generates` relation. When a parent import generates child imports, those children depend on the parent and will run after it completes.
|
|
13
|
+
Dependencies between imports are automatically derived from the `generates` relation. When a parent import generates child imports, those children depend on the parent and will run after it completes. An import can also declare further dependencies with `import/dependsOn` (see [Dependencies](#dependencies)).
|
|
14
|
+
|
|
15
|
+
Besides the built-in handlers, a resources repository can bring its own (see [Importers of the Resources Repository](#importers-of-the-resources-repository)).
|
|
14
16
|
|
|
15
17
|
The import executor runs imports concurrently in dependency order, with a visual progress display showing completion percentage and ETA.
|
|
16
18
|
|
|
@@ -28,8 +30,21 @@ archsight import --dry-run
|
|
|
28
30
|
|
|
29
31
|
# Force re-run all imports (ignore cache)
|
|
30
32
|
archsight import --force
|
|
33
|
+
|
|
34
|
+
# Run one import and the imports it depends on
|
|
35
|
+
archsight import -f Import:Deployments
|
|
36
|
+
|
|
37
|
+
# Run only that import, not its dependencies (with --force to ignore its cache)
|
|
38
|
+
archsight import -f Import:Deployments --no-deps --force
|
|
39
|
+
|
|
40
|
+
# Validate the resources after the run (like archsight lint)
|
|
41
|
+
archsight import --lint
|
|
31
42
|
```
|
|
32
43
|
|
|
44
|
+
With `--lint`, an error in a resource that an import wrote names that import (`(generated by Import:X)`): the import
|
|
45
|
+
in the resource's `generated/script`, else the import whose output file holds it. So a dangling reference between
|
|
46
|
+
generated files shows up with the import that caused it.
|
|
47
|
+
|
|
33
48
|
### Progress Display
|
|
34
49
|
|
|
35
50
|
In TTY mode, imports show a live progress display:
|
|
@@ -62,12 +77,22 @@ spec: {}
|
|
|
62
77
|
|
|
63
78
|
| Annotation | Description |
|
|
64
79
|
|------------|-------------|
|
|
65
|
-
| `import/handler` | Handler to execute (required) |
|
|
80
|
+
| `import/handler` | Handler to execute (required): a built-in one or one registered by `import/handlerPath` |
|
|
81
|
+
| `import/handlerPath` | Ruby file of a handler of the resources repository, relative to the resources directory |
|
|
82
|
+
| `import/dependsOn` | Imports that must run first: names or glob patterns, comma separated |
|
|
66
83
|
| `import/enabled` | Set to "false" to disable |
|
|
67
84
|
| `import/priority` | Execution order (lower runs first, default: 0) |
|
|
68
|
-
| `import/cacheTime` | Cache duration: "30m", "1h", "24h", "7d", or "never" |
|
|
85
|
+
| `import/cacheTime` | Cache duration: "30s", "30m", "1h", "24h", "7d", or "never" |
|
|
69
86
|
| `import/outputPath` | Output file path relative to resources directory |
|
|
70
87
|
|
|
88
|
+
Settings every handler understands:
|
|
89
|
+
|
|
90
|
+
| Annotation | Description |
|
|
91
|
+
|------------|-------------|
|
|
92
|
+
| `import/config/inputs` | Files the import reads (glob patterns relative to the resources directory, comma separated); a change invalidates the cache |
|
|
93
|
+
| `import/config/requiredEnv` | Environment variables the import needs, comma separated; a missing one fails the import |
|
|
94
|
+
| `import/config/optional` | `"true"`: skip the import with a warning when a required variable is missing (it stays stale; its dependents run) |
|
|
95
|
+
|
|
71
96
|
### Caching
|
|
72
97
|
|
|
73
98
|
Imports can be cached to avoid re-running when data hasn't changed:
|
|
@@ -77,6 +102,7 @@ import/cacheTime: "24h" # Re-run after 24 hours
|
|
|
77
102
|
```
|
|
78
103
|
|
|
79
104
|
Supported duration formats:
|
|
105
|
+
- `30s` - 30 seconds
|
|
80
106
|
- `30m` - 30 minutes
|
|
81
107
|
- `1h` - 1 hour
|
|
82
108
|
- `24h` - 24 hours
|
|
@@ -85,6 +111,32 @@ Supported duration formats:
|
|
|
85
111
|
|
|
86
112
|
The cache uses the `generated/at` annotation written by handlers. When an import completes, it writes a marker with the current timestamp. On subsequent runs, the executor checks if `generated/at + cacheTime > now` to skip cached imports.
|
|
87
113
|
|
|
114
|
+
The cache is also invalid, and the import runs again, when:
|
|
115
|
+
- its output file (`import/outputPath`) or a file it recorded as its own (`generated/outputs`) is missing
|
|
116
|
+
- its handler or `import/config/*` settings changed (`generated/configHash`)
|
|
117
|
+
- a file matched by `import/config/inputs` changed (`generated/inputsHash`: paths, sizes, modification times)
|
|
118
|
+
- an import it declares in `import/dependsOn` executed in the same run (one served from the cache does not count).
|
|
119
|
+
Child imports are not affected when their parent runs; they keep their own cache time.
|
|
120
|
+
|
|
121
|
+
### Dependencies
|
|
122
|
+
|
|
123
|
+
An import runs after the import that generated it. `import/dependsOn` adds more: import names or glob patterns,
|
|
124
|
+
comma separated.
|
|
125
|
+
|
|
126
|
+
```yaml
|
|
127
|
+
import/dependsOn: "Import:GitHub:acme, Import:Repo:*"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
A pattern also covers imports that do not exist yet: the import waits for every import whose last run generated a
|
|
131
|
+
match, and on a first run for every import whose handler generates imports. So `Import:Repo:*` waits for the GitHub
|
|
132
|
+
import and then for the repository imports it creates. Declared dependencies are part of the execution plan (`-n`,
|
|
133
|
+
which also lists patterns without a match), of `-f` (a filtered import brings its dependencies along) and of the
|
|
134
|
+
cycle check. `archsight lint` reports a name that matches no import.
|
|
135
|
+
|
|
136
|
+
`--no-deps` runs only the imports `-f` matches: their dependencies neither run nor are waited for, so the import works
|
|
137
|
+
on the model as it is (re-importing thousands of repositories is not needed to try a change to one importer). The
|
|
138
|
+
cache still applies; add `--force` to run it anyway.
|
|
139
|
+
|
|
88
140
|
### Configuration Pattern
|
|
89
141
|
|
|
90
142
|
Handler-specific configuration uses `import/config/*` annotations:
|
|
@@ -394,73 +446,144 @@ If an import isn't re-running when expected:
|
|
|
394
446
|
3. Use `archsight import --force` to bypass cache for all imports
|
|
395
447
|
4. Alternatively, use `import/cacheTime: never` to always re-run a specific import
|
|
396
448
|
|
|
397
|
-
**Note:** The cache is automatically invalidated when
|
|
398
|
-
|
|
399
|
-
|
|
449
|
+
**Note:** The cache is automatically invalidated when the output file is missing, the configuration or the inputs
|
|
450
|
+
changed, or a declared dependency executed (see [Caching](#caching)). Editing the Import definition invalidates it
|
|
451
|
+
only through its handler and `import/config/*` settings.
|
|
400
452
|
|
|
401
|
-
##
|
|
453
|
+
## Importers of the Resources Repository
|
|
402
454
|
|
|
403
|
-
|
|
455
|
+
A resources repository often needs importers that only make sense for it: deployments read from the repositories
|
|
456
|
+
archsight already cloned, a wiki space, team membership from a directory service. They live in the repository and
|
|
457
|
+
run with `archsight import` like the built-in handlers: scheduled with their dependencies, cached, filtered with
|
|
458
|
+
`-f`, shown by `-n` and checked by `archsight lint`.
|
|
404
459
|
|
|
405
|
-
|
|
406
|
-
2. Inherit from `Archsight::Import::Handler`
|
|
407
|
-
3. Implement the `execute` method
|
|
408
|
-
4. Register with `Registry.register("name", YourHandler)`
|
|
460
|
+
### A Ruby handler
|
|
409
461
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
class Archsight::Import::Handlers::Custom < Archsight::Import::Handler
|
|
413
|
-
def execute
|
|
414
|
-
# Read configuration
|
|
415
|
-
url = config("url")
|
|
416
|
-
|
|
417
|
-
# Update progress
|
|
418
|
-
progress.update("Fetching data")
|
|
462
|
+
The Import names the handler and the file that registers it (`import/handlerPath`, relative to the resources
|
|
463
|
+
directory, like `import/outputPath`):
|
|
419
464
|
|
|
420
|
-
|
|
421
|
-
|
|
465
|
+
```yaml
|
|
466
|
+
# imports/deployments.yaml
|
|
467
|
+
apiVersion: architecture/v1alpha1
|
|
468
|
+
kind: Import
|
|
469
|
+
metadata:
|
|
470
|
+
name: Import:Deployments
|
|
471
|
+
annotations:
|
|
472
|
+
import/handler: deployments
|
|
473
|
+
import/handlerPath: importers/deployments.rb
|
|
474
|
+
import/dependsOn: "Import:Repo:*"
|
|
475
|
+
import/outputPath: generated/deployments.yaml
|
|
476
|
+
import/cacheTime: "24h"
|
|
477
|
+
import/config/inputs: "deployments/*.yaml"
|
|
478
|
+
spec: {}
|
|
479
|
+
```
|
|
422
480
|
|
|
423
|
-
|
|
424
|
-
|
|
481
|
+
```ruby
|
|
482
|
+
# importers/deployments.rb
|
|
483
|
+
require_relative "lib/charts" # helpers next to the handler
|
|
425
484
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
485
|
+
class DeploymentsImporter < Archsight::Import::Handler
|
|
486
|
+
def execute
|
|
487
|
+
progress.update("Reading charts")
|
|
488
|
+
# the model as loaded after the dependencies ran
|
|
489
|
+
components = database.instances_by_kind("ApplicationComponent")
|
|
490
|
+
# the clones of the repository imports
|
|
491
|
+
charts = Charts.find(File.join(cache_root, "github"))
|
|
492
|
+
|
|
493
|
+
resources = charts.filter_map do |chart|
|
|
494
|
+
next unless components.key?(chart.component)
|
|
495
|
+
|
|
496
|
+
resource_yaml(kind: "TechnologyArtifact", name: "Chart:#{chart.name}",
|
|
497
|
+
annotations: { "artifact/type" => "chart" })
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
write_file("pages/deployments.md", Charts.page(charts)) # a page next to the generated YAML
|
|
501
|
+
write_yaml(resources_to_yaml(resources) + YAML.dump(self_marker))
|
|
502
|
+
write_generates_meta
|
|
429
503
|
end
|
|
504
|
+
end
|
|
430
505
|
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
{
|
|
434
|
-
"apiVersion" => "architecture/v1alpha1",
|
|
435
|
-
"kind" => "Import",
|
|
436
|
-
"metadata" => {
|
|
437
|
-
"name" => import_resource.name,
|
|
438
|
-
"annotations" => { "generated/at" => Time.now.utc.iso8601 }
|
|
439
|
-
},
|
|
440
|
-
"spec" => {}
|
|
441
|
-
}
|
|
442
|
-
end
|
|
506
|
+
Archsight::Import::Registry.register("deployments", DeploymentsImporter)
|
|
507
|
+
```
|
|
443
508
|
|
|
444
|
-
|
|
509
|
+
- `import`, `lint` and `web` load the handler files the Imports declare. The resources repository is trusted like the
|
|
510
|
+
gem: its handler code runs in all three commands.
|
|
511
|
+
- A name registered twice, a file that does not load or does not register the name in `import/handler`, and an
|
|
512
|
+
unknown handler name are lint errors.
|
|
513
|
+
- Only the Ruby standard library and the gems archsight ships are available to a handler.
|
|
514
|
+
- Run it with what it depends on: `archsight import -f Import:Deployments`, or alone with `--no-deps`; see the plan
|
|
515
|
+
with `-n`.
|
|
516
|
+
- A web server loads a handler file once; restart it after changing the file.
|
|
445
517
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
name: item["name"],
|
|
450
|
-
annotations: { "custom/field" => item["value"] }
|
|
451
|
-
)
|
|
452
|
-
end
|
|
453
|
-
end
|
|
518
|
+
### A command in any language
|
|
519
|
+
|
|
520
|
+
`import/handler: command` runs a program instead:
|
|
454
521
|
|
|
455
|
-
|
|
522
|
+
```yaml
|
|
523
|
+
apiVersion: architecture/v1alpha1
|
|
524
|
+
kind: Import
|
|
525
|
+
metadata:
|
|
526
|
+
name: Import:Wiki
|
|
527
|
+
annotations:
|
|
528
|
+
import/handler: command
|
|
529
|
+
import/config/command: "python3 importers/wiki.py"
|
|
530
|
+
import/config/env: CONFLUENCE_TOKEN
|
|
531
|
+
import/config/requiredEnv: CONFLUENCE_TOKEN
|
|
532
|
+
import/config/optional: "true"
|
|
533
|
+
import/config/outputs: "pages/wiki/*.md"
|
|
534
|
+
import/outputPath: generated/wiki.yaml
|
|
535
|
+
import/cacheTime: "7d"
|
|
536
|
+
spec: {}
|
|
456
537
|
```
|
|
457
538
|
|
|
539
|
+
- The command line is split like a shell does, but runs without a shell (`sh -c '...'` for pipes). It runs in the
|
|
540
|
+
root of the git repository that holds the resources directory (`import/config/workdir` relative to the resources
|
|
541
|
+
directory overrides it).
|
|
542
|
+
- The environment is clean: `PATH`, `HOME`, `LANG`, `LC_ALL`, `TMPDIR`, the variables named in `import/config/env`, and
|
|
543
|
+
- `ARCHSIGHT_RESOURCES_DIR` - the resources directory
|
|
544
|
+
- `ARCHSIGHT_CACHE_DIR` - where the git-based imports clone repositories
|
|
545
|
+
- `ARCHSIGHT_IMPORT_NAME` - the name of the Import
|
|
546
|
+
- `ARCHSIGHT_OUTPUT_PATH` - a file for the YAML resources the program generates
|
|
547
|
+
- archsight writes what the program put in `ARCHSIGHT_OUTPUT_PATH` unchanged to `import/outputPath` and adds the self
|
|
548
|
+
marker, so caching and dependencies work. The documents are not marked as generated: a document that only adds
|
|
549
|
+
relations to a hand-written resource must not look generated, and many kinds (Location, TechnologyNode, ...) do not
|
|
550
|
+
accept the `generated/*` annotations. A program that wants a resource marked sets `generated/script: <import name>`
|
|
551
|
+
itself. Files matched by `import/config/outputs` are recorded as the import's own (see below).
|
|
552
|
+
- The output file belongs to the import: it is replaced on every run and removed when `import/outputPath` changes.
|
|
553
|
+
`archsight lint` reports another import that writes to the same file.
|
|
554
|
+
- A non-zero exit fails the import with the last lines of the error output.
|
|
555
|
+
|
|
556
|
+
### Shared state and outputs
|
|
557
|
+
|
|
558
|
+
- `cache_root` (Ruby) and `ARCHSIGHT_CACHE_DIR` (command) are the directory the GitHub, GitLab and repository
|
|
559
|
+
imports clone into: `import/config/cacheRoot`, else `import.cache_root` in the
|
|
560
|
+
[configuration](configuration.md) (`ARCHSIGHT_IMPORT_CACHE_ROOT`), else `~/.cache/archsight/git`.
|
|
561
|
+
- `database` holds the model as loaded after the dependencies ran (the import command loads the kinds the importers
|
|
562
|
+
use: Import, BusinessActor, ApplicationComponent, ApplicationInterface).
|
|
563
|
+
- `write_yaml` may be called several times with `filename:` for more YAML files next to the output path.
|
|
564
|
+
`write_file(path, content)` writes a whole file of the import's own, such as a page. Its files are recorded in the
|
|
565
|
+
self marker (`generated/outputs`): the cache is invalid while one is missing, and a file of an earlier run that is
|
|
566
|
+
not written again is deleted. Call `self_marker` after writing them.
|
|
567
|
+
|
|
568
|
+
### Docker
|
|
569
|
+
|
|
570
|
+
The image runs `archsight import` with the repository mounted (`-v /path/to/repository:/resources`). Handler files
|
|
571
|
+
must be inside the mounted resources directory. The image has no git, go or python; a command import can only run
|
|
572
|
+
programs available in the image.
|
|
573
|
+
|
|
458
574
|
### Handler Helper Methods
|
|
459
575
|
|
|
460
576
|
| Method | Description |
|
|
461
577
|
|--------|-------------|
|
|
462
|
-
| `config(key, default:)` | Get configuration value |
|
|
463
|
-
| `
|
|
464
|
-
| `
|
|
465
|
-
| `
|
|
466
|
-
| `
|
|
578
|
+
| `config(key, default:)` | Get a configuration value (`import/config/<key>`) |
|
|
579
|
+
| `config_path(key)` | Get a path setting with `~` expanded |
|
|
580
|
+
| `cache_root` | Directory of the cloned repositories |
|
|
581
|
+
| `database` | The model loaded before this batch of imports |
|
|
582
|
+
| `progress.update(msg)` / `progress.warn(msg)` | Update the progress display |
|
|
583
|
+
| `resource_yaml(kind:, name:, ...)` | Build a resource hash marked as generated by this import |
|
|
584
|
+
| `import_yaml(name:, handler:, ...)` | Build a child import hash (override `self.generates_imports?` to return true) |
|
|
585
|
+
| `resources_to_yaml(resources)` | Join resource hashes into YAML documents |
|
|
586
|
+
| `write_yaml(content, filename:, sort_key:)` | Write YAML to the output path (or a file next to it) |
|
|
587
|
+
| `write_file(path, content)` | Write a file of the import's own below the resources directory |
|
|
588
|
+
| `self_marker` | Marker with `generated/at` and the cache hashes; write it last |
|
|
589
|
+
| `write_generates_meta` | Record what the import generated (`spec.generates`) |
|
data/docs/index.md.erb
CHANGED
|
@@ -35,23 +35,34 @@ Resources representing stakeholders, goals, outcomes, requirements, and constrai
|
|
|
35
35
|
- [MotivationAssessment](/doc/resources/motivation_assessment) - Risks, vulnerabilities and findings
|
|
36
36
|
- [MotivationPrinciple](/doc/resources/motivation_principle) - Policies and principles
|
|
37
37
|
|
|
38
|
+
### Strategy Layer
|
|
39
|
+
|
|
40
|
+
Resources representing strategic capabilities and planning.
|
|
41
|
+
|
|
42
|
+
- [StrategyCapability](/doc/resources/strategy_capability) - Strategic abilities and functions
|
|
43
|
+
|
|
44
|
+
### Implementation & Migration Layer
|
|
45
|
+
|
|
46
|
+
Resources representing change: work, results, milestones and the states of the architecture between them.
|
|
47
|
+
|
|
48
|
+
- [ImplementationWorkPackage](/doc/resources/implementation_work_package) - Projects, measures and remediation
|
|
49
|
+
- [ImplementationDeliverable](/doc/resources/implementation_deliverable) - Results of work packages
|
|
50
|
+
- [ImplementationEvent](/doc/resources/implementation_event) - Milestones, go-lives and deadlines
|
|
51
|
+
- [ImplementationPlateau](/doc/resources/implementation_plateau) - Baseline, transition and target states
|
|
52
|
+
- [ImplementationGap](/doc/resources/implementation_gap) - Differences between plateaus
|
|
53
|
+
|
|
38
54
|
### Business Layer
|
|
39
55
|
|
|
40
|
-
Resources representing business processes, actors, products, and the controls that guide processes.
|
|
56
|
+
Resources representing business processes, actors, products, contracts, and the controls that guide processes.
|
|
41
57
|
|
|
42
58
|
- [BusinessActor](/doc/resources/business_actor) - Teams and organizations
|
|
43
59
|
- [BusinessRole](/doc/resources/business_role) - Responsibilities that actors take on
|
|
44
60
|
- [BusinessProcess](/doc/resources/business_process) - Structured business workflows
|
|
45
61
|
- [BusinessProduct](/doc/resources/business_product) - Products offered to customers
|
|
62
|
+
- [BusinessContract](/doc/resources/business_contract) - Agreements with customers: frameworks, call-offs, SLAs
|
|
46
63
|
- [BusinessControl](/doc/resources/business_control) - Controls that guide business processes
|
|
47
64
|
- [BusinessEvent](/doc/resources/business_event) - Threat events, loss events and triggers
|
|
48
65
|
|
|
49
|
-
### Strategy Layer
|
|
50
|
-
|
|
51
|
-
Resources representing strategic capabilities and planning.
|
|
52
|
-
|
|
53
|
-
- [StrategyCapability](/doc/resources/strategy_capability) - Strategic abilities and functions
|
|
54
|
-
|
|
55
66
|
### Application Layer
|
|
56
67
|
|
|
57
68
|
Resources representing application services, components, and interfaces.
|
|
@@ -71,21 +82,16 @@ Resources representing technology infrastructure and artifacts.
|
|
|
71
82
|
- [TechnologyInterface](/doc/resources/technology_interface) - Technical interfaces
|
|
72
83
|
- [TechnologyEvent](/doc/resources/technology_event) - Infrastructure events, scan findings and outages
|
|
73
84
|
- [TechnologySystemSoftware](/doc/resources/technology_system_software) - Logical infrastructure components
|
|
74
|
-
- [TechnologyNode](/doc/resources/technology_node) -
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
- [ImplementationWorkPackage](/doc/resources/implementation_work_package) - Projects, measures and remediation
|
|
81
|
-
- [ImplementationDeliverable](/doc/resources/implementation_deliverable) - Results of work packages
|
|
82
|
-
- [ImplementationEvent](/doc/resources/implementation_event) - Milestones, go-lives and deadlines
|
|
83
|
-
- [ImplementationPlateau](/doc/resources/implementation_plateau) - Baseline, transition and target states
|
|
84
|
-
- [ImplementationGap](/doc/resources/implementation_gap) - Differences between plateaus
|
|
85
|
+
- [TechnologyNode](/doc/resources/technology_node) - Hosts, VMs and host roles
|
|
86
|
+
- [TechnologyDevice](/doc/resources/technology_device) - Physical machines: servers, switches, routers, firewalls and appliances
|
|
87
|
+
- [TechnologyFacility](/doc/resources/technology_facility) - Data centers, colocation sites, offices and edge sites
|
|
88
|
+
- [TechnologyEquipment](/doc/resources/technology_equipment) - Racks, fabrics, links and physical clusters
|
|
89
|
+
- [TechnologyCommunicationNetwork](/doc/resources/technology_communication_network) - Logical networks: underlay, overlay, management, public, VPN
|
|
85
90
|
|
|
86
91
|
### Other
|
|
87
92
|
|
|
88
93
|
- [ComplianceEvidence](/doc/resources/compliance_evidence) - Evidence for compliance requirements
|
|
94
|
+
- [Location](/doc/resources/location) - Countries, metros, regions and other places
|
|
89
95
|
- [View](/doc/resources/view) - Saved queries and custom views
|
|
90
96
|
|
|
91
97
|
## References
|