Skip to content

Latest commit

 

History

History
133 lines (97 loc) · 4.51 KB

File metadata and controls

133 lines (97 loc) · 4.51 KB

PREREQUISITES

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.

C4 model ☀️☁️❄️

Attendees have basic exposure to C4 model. Reading through the C4 model series prior to the course is highly recommended.

Git ☀️☁️❄️

A Github account and basic knowledge of Git

Docker ☀️☁️❄️

Enabling Software model visualization requires docker.

☀️

Docker desktop now 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:

  1. Install a WSL2 distribution (warning, it won't work with WSL1)
  2. Install docker engine on this distribution. Optionally, you can:
    1. Allow yourself to use docker without root privileges
    2. Configure the docker service to run on boot (optional, but it needs to be started when using the docker extension or the Cornifer preview). Remember, you can start docker daemon using $ 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
# ...

VS Code editor ☀️☁️❄️

An up to date installation of VS Code editor.

Cornifer ☀️☁️❄️

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.

☀️❄️

  1. Download Cornifer extension
  2. Install extension within VS Code:
    EXTENSIONS > Views and More Options > Install from VSIX

☁️

  1. Install the Remote-WSL VS Code extension
  2. Start a remote WSL2 vscode window
    • CTRL+SHIFT+P
    • Type Remote-WSL: New WSL window
  3. Download Cornifer extension
  4. Install extension in the remote wsl2 window:
    EXTENSIONS > Views and More Options > Install from VSIX

Structurizr Lite ☀️☁️❄️

Workshop has been successfully exercised with structurizr/lite:3262.

Software model visualization is powered by Structurizr Lite, deployed as docker container:

  1. Install docker (see above)
  2. Pull Structurizr Lite image
    > 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"