Dear reader, you are:
- A windows user with a valid docker license. Follow the ☀️.
- A windows user without docker license. Follow the ☁️.
- A linux user. Follow the ❄️.
This recipe has been tested with:
- ☀️ Windows 10
- ☁️ Windows 10, Ubuntu 20.04.4 LTS installed on WSL2
This course expects the following.
Attendees have basic exposure to C4 model. Reading through the C4 model series prior to the course is highly recommended.
A Github account and basic knowledge of Git
Enabling Software model visualization requires docker.
Docker desktopnow requires a valid license.
Install Docker Desktop.
After that, you should be able to successfully run:
# Powershell prompt
> docker version
# Client:
# ...
# Server: Docker Desktop
# ...With the recent changes in Docker desktop pricing, one could leverage WSL2 to power docker instead:
- Install a
WSL2distribution (warning, it won't work withWSL1) - Install docker engine on this distribution. Optionally, you can:
- Allow yourself to use docker without root privileges
- Configure the docker service to run on boot (optional, but it needs to be started when using the
dockerextension or theCorniferpreview). Remember, you can startdocker daemonusing$ sudo service docker start.
After that, you should be able to successfully run:
# Powershell prompt
> wsl -l -v
# NAME STATE VERSION
# * Ubuntu Running 2# WSL prompt
$ lsb_release -a
# Distributor ID: Ubuntu
# Description: Ubuntu 20.04.4 LTS
# Release: 20.04
# Codename: focal
$ docker version
# Client: Docker Engine - Community
# ...
# Server: Docker Engine - Community
# ...Install docker engine on your Linux distribution
After that, you should be able to successfully run:
$ lsb_release -a
# Distributor ID: Ubuntu
# Description: Ubuntu 20.04.4 LTS
# Release: 20.04
# Codename: focal
$ docker version
# Client: Docker Engine - Community
# ...
# Server: Docker Engine - Community
# ...An up to date installation of VS Code editor.
Authoring file benefits from dedicated tooling. Main objective of such tooling is to support user with edition & validation. We all are used to leverage dedicated IDE when crafting software. Sadly, C4 DSL does not come with first class citizen tooling. To fill this gap, and enforce consistency along the whole workflow, a dedicated VS Code extension has been shaped, aka Cornifer. While you could certainly achieve great results by other means, VS Code + Cornifer is the recommended stack to draw on.
- Download Cornifer extension
- Install extension within VS Code:
EXTENSIONS > Views and More Options > Install from VSIX
- Install the Remote-WSL VS Code extension
- Start a
remote WSL2 vscode windowCTRL+SHIFT+P- Type
Remote-WSL: New WSL window
- Download Cornifer extension
- Install extension in the
remote wsl2 window:
EXTENSIONS > Views and More Options > Install from VSIX
Workshop has been successfully exercised with
structurizr/lite:3262.
Software model visualization is powered by Structurizr Lite, deployed as docker container:
- Install docker (see above)
- Pull
Structurizr Liteimage> docker pull structurizr/lite:3262
Remember you can pick the structurizr/lite version you want to be used by Cornifer through settings:
# Fallback to latest if not specified
"cornifer.structurizrLiteTag": "3262"