Remove mise from WSL and tidy devcontainer tooling

- Drop mise installation, COPR repository, pinned tool checks and
  dotfiles from the Fedora WSL profile; keep the Maven pin for the
  devcontainers as workstation_maven_version.
- Remove the Claude Code and Cline VS Code extensions from the
  devcontainer definitions; the CLIs and their mounts remain.
- Add the cdp and ecaas devcontainer definitions and their docs.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Fabio Scotto di Santolo
2026-11-10 16:26:06 +01:00
parent 0bd0a4589b
commit d26dddd822
18 changed files with 429 additions and 153 deletions

View File

@@ -91,6 +91,20 @@
loop_control:
label: "{{ item.dest }}"
- name: Ensure AI coding-agent dotfile parent directories exist
tags: [dotfiles, dotfiles:common, ai_agents]
ansible.builtin.file:
path: "{{ (effective_user_home ~ '/' ~ item.dest) | dirname }}"
state: directory
owner: "{{ effective_username }}"
group: "{{ effective_user_group }}"
mode: "0755"
loop: "{{ ai_agents_dotfiles | default([]) }}"
loop_control:
label: "{{ item.dest }}"
when:
- (item.agents | intersect(ai_agents_deploy_enabled_names)) | length > 0
- name: Deploy AI coding-agent dotfiles
tags: [dotfiles, dotfiles:common, ai_agents]
ansible.builtin.copy:

View File

@@ -25,20 +25,6 @@
- "'workstation_dev_fedora' in group_names"
- fedora_manage_docker_repo | default(false)
- name: Install COPR support on Fedora WSL
tags: [packages, mise]
ansible.builtin.dnf:
name: dnf-plugins-core
state: present
when: "'workstation_dev_wsl' in group_names"
- name: Configure Mise COPR repository on Fedora WSL
tags: [packages, mise]
community.general.copr:
name: jdxcode/mise
state: enabled
when: "'workstation_dev_wsl' in group_names"
- name: Install distribution signing keys for Fedora desktop codecs
tags: [packages, heic]
ansible.builtin.dnf:

View File

@@ -0,0 +1,66 @@
ARG MAVEN_VERSION=3.9.16
ARG NODE_VERSION=20.18.3
FROM docker.io/library/maven:${MAVEN_VERSION}-eclipse-temurin-25 AS maven
FROM docker.io/library/node:${NODE_VERSION}-bookworm-slim AS node
# Java 25 runs both the application and the language servers.
FROM mcr.microsoft.com/devcontainers/java:25-bookworm
USER root
COPY --from=maven /usr/share/maven/ /usr/share/maven/
COPY --from=node /usr/local/bin/node /usr/local/bin/node
COPY --from=node /usr/local/lib/node_modules/npm/ /usr/local/lib/node_modules/npm/
RUN ln -s /usr/share/maven/bin/mvn /usr/local/bin/mvn \
&& ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
&& ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx \
&& java -version \
&& mvn -v \
&& node --version \
&& npm install --global --no-audit --no-fund @anthropic-ai/claude-code@2.1.312 cline@3.0.74 \
&& npm cache clean --force
RUN apt-get update \
&& apt-get install -y --no-install-recommends bash-completion ca-certificates curl fzf git git-lfs gnupg openssh-client zoxide \
&& arch="$(dpkg --print-architecture)" \
&& case "$arch" in \
amd64) sha256=ea4f0222950ee750a3d38dd80d03bce4cee07a3f63928fc47548383bcaf23093 ;; \
arm64) sha256=0edc36cf514f1bd84becac3e94ee8ae9f8818c6a1f99f7b2ee67b362afa253d3 ;; \
*) echo "Unsupported architecture for delta: $arch" >&2; exit 1 ;; \
esac \
&& curl -fsSL --retry 3 "https://github.com/dandavison/delta/releases/download/0.19.2/git-delta_0.19.2_${arch}.deb" -o /tmp/git-delta.deb \
&& echo "$sha256 /tmp/git-delta.deb" | sha256sum -c - \
&& apt-get install -y --no-install-recommends /tmp/git-delta.deb \
&& rm -rf /var/lib/apt/lists/* /tmp/git-delta.deb
ARG KUBECTL_VERSION=1.37.1
ARG HELM_VERSION=4.2.2
RUN arch="$(dpkg --print-architecture)" \
&& case "$arch" in \
amd64) kubectl_sha=65691ff77eb6fa44c908b77a1082c9f092c3b9733b5cefabec0d1104890e21a8; helm_sha=9adafecab4d406853bba163a70e9f104f47dbbf65ce24b7653bae7e36150bcb6 ;; \
arm64) kubectl_sha=ff749f4b78d9c4f1ec87307df9b50119ed819e2094aa9810cb9acffc3286c8c7; helm_sha=78803142087a0069fa4b50d3f32a84d3ef25c14d1ee8a40fbccf86a6216d2f36 ;; \
*) echo "Unsupported architecture for kubectl/helm: $arch" >&2; exit 1 ;; \
esac \
&& curl -fsSL --retry 3 "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${arch}/kubectl" -o /tmp/kubectl \
&& echo "$kubectl_sha /tmp/kubectl" | sha256sum -c - \
&& install -m 0755 /tmp/kubectl /usr/local/bin/kubectl \
&& curl -fsSL --retry 3 "https://get.helm.sh/helm-v${HELM_VERSION}-linux-${arch}.tar.gz" -o /tmp/helm.tgz \
&& echo "$helm_sha /tmp/helm.tgz" | sha256sum -c - \
&& tar -xzf /tmp/helm.tgz -C /tmp "linux-${arch}/helm" \
&& install -m 0755 "/tmp/linux-${arch}/helm" /usr/local/bin/helm \
&& rm -rf /tmp/kubectl /tmp/helm.tgz "/tmp/linux-${arch}" \
&& kubectl version --client \
&& helm version --short
ARG GLAB_VERSION=1.114.0
RUN arch="$(dpkg --print-architecture)" \
&& case "$arch" in \
amd64) sha256=6df680f88a2a45700d1dd6a08a44a74838473ef3dcc5cb1ad243f4d1fd704ad0 ;; \
arm64) sha256=c2bcb44cc10d849cccb879e687f3b9e102a3415c3d02f0cecfd9ce1442519350 ;; \
*) echo "Unsupported architecture for glab: $arch" >&2; exit 1 ;; \
esac \
&& curl -fsSL --retry 3 "https://gitlab.com/gitlab-org/cli/-/releases/v${GLAB_VERSION}/downloads/glab_${GLAB_VERSION}_linux_${arch}.deb" -o /tmp/glab.deb \
&& echo "$sha256 /tmp/glab.deb" | sha256sum -c - \
&& apt-get update \
&& apt-get install -y --no-install-recommends /tmp/glab.deb \
&& rm -rf /var/lib/apt/lists/* /tmp/glab.deb \
&& glab --version
COPY --chown=vscode:vscode bashrc /home/vscode/.bashrc
COPY --chown=vscode:vscode bashrc.aliases /home/vscode/.bashrc.aliases
USER vscode
# Keep this file writable so VS Code can register its Git credential helper.
RUN git config --file /home/vscode/.gitconfig include.path /run/ecaas-git/gitconfig

View File

@@ -29,7 +29,21 @@ RUN apt-get update \
&& echo "$sha256 /tmp/git-delta.deb" | sha256sum -c - \
&& apt-get install -y --no-install-recommends /tmp/git-delta.deb \
&& rm -rf /var/lib/apt/lists/* /tmp/git-delta.deb
ARG GLAB_VERSION=1.114.0
RUN arch="$(dpkg --print-architecture)" \
&& case "$arch" in \
amd64) sha256=6df680f88a2a45700d1dd6a08a44a74838473ef3dcc5cb1ad243f4d1fd704ad0 ;; \
arm64) sha256=c2bcb44cc10d849cccb879e687f3b9e102a3415c3d02f0cecfd9ce1442519350 ;; \
*) echo "Unsupported architecture for glab: $arch" >&2; exit 1 ;; \
esac \
&& curl -fsSL --retry 3 "https://gitlab.com/gitlab-org/cli/-/releases/v${GLAB_VERSION}/downloads/glab_${GLAB_VERSION}_linux_${arch}.deb" -o /tmp/glab.deb \
&& echo "$sha256 /tmp/glab.deb" | sha256sum -c - \
&& apt-get update \
&& apt-get install -y --no-install-recommends /tmp/glab.deb \
&& rm -rf /var/lib/apt/lists/* /tmp/glab.deb \
&& glab --version
COPY --chown=vscode:vscode bashrc /home/vscode/.bashrc
COPY --chown=vscode:vscode bashrc.aliases /home/vscode/.bashrc.aliases
USER vscode
# Keep this file writable so VS Code can register its Git credential helper.
RUN git config --file /home/vscode/.gitconfig include.path /run/ecaas-git/gitconfig

View File

@@ -0,0 +1,98 @@
---
- name: Refuse to deploy the cdp workspace outside WSL
ansible.builtin.assert:
that:
- "'wsl2' in (ansible_facts.kernel | default('') | lower)"
- ansible_facts.distribution | default('') == 'Fedora'
fail_msg: Run this deployment from the Fedora WSL 2 distribution on deadalus.
- name: Prepare the cdp workspace and private configuration
vars:
ecaas_agent_state: "{{ user_home }}/.local/state/ecaas-devcontainer"
ecaas_git_available_cas: >-
{{ ecaas_git_ca_probe.results | selectattr('stat.isreg', 'defined') |
selectattr('stat.isreg') | map(attribute='item') | list }}
block:
- name: Prepare the shared Git configuration
ansible.builtin.import_tasks: ecaas_git.yml
- name: Ensure the cdp dev container directory exists
ansible.builtin.file:
path: "{{ workstation_cdp_workspace }}/.devcontainer"
state: directory
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0755"
- name: Ensure the local Maven directory mounted into the container exists
ansible.builtin.file:
path: "{{ user_home }}/.m2"
state: directory
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0755"
- name: Ensure the local Kubernetes directory mounted into the container exists
ansible.builtin.file:
path: "{{ user_home }}/.kube"
state: directory
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0700"
- name: Ensure the private ecaas Git state directory exists
ansible.builtin.file:
path: "{{ ecaas_agent_state }}"
state: directory
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0700"
- name: Ensure the local agent configuration directories mounted into the container exist
ansible.builtin.file:
path: "{{ user_home }}/{{ item.path }}"
state: directory
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "{{ item.mode }}"
loop:
- { path: .claude, mode: "0700" }
- { path: .cline, mode: "0700" }
- { path: .config/ai, mode: "0755" }
- { path: .config/glab-cli, mode: "0700" }
- name: Deploy the cdp dev container configuration
ansible.builtin.template:
src: cdp-devcontainer.json.j2
dest: "{{ workstation_cdp_workspace }}/.devcontainer/devcontainer.json"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0644"
backup: true
- name: Deploy the cdp dev container build files
ansible.builtin.copy:
src: "{{ item.src }}"
dest: "{{ workstation_cdp_workspace }}/.devcontainer/{{ item.dest }}"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0644"
backup: true
loop:
- src: cdp-devcontainer.Dockerfile
dest: Dockerfile
- src: "{{ playbook_dir }}/../dotfiles/common/.bashrc"
dest: bashrc
loop_control:
label: "{{ item.dest }}"
- name: Deploy the shared Bash aliases without the production tunnel
ansible.builtin.copy:
content: >-
{{ lookup('ansible.builtin.file', playbook_dir ~ '/../dotfiles/common/.bashrc.aliases')
| regex_replace('(?m)^(#[^\n]*Nginx Proxy Manager[^\n]*\n)?alias npm-tunnel=[^\n]*\n?', '') }}
dest: "{{ workstation_cdp_workspace }}/.devcontainer/bashrc.aliases"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0644"
backup: true

View File

@@ -12,25 +12,6 @@
ecaas_git_available_cas: >-
{{ ecaas_git_ca_probe.results | selectattr('stat.isreg', 'defined') |
selectattr('stat.isreg') | map(attribute='item') | list }}
ecaas_agent_config:
- src: .claude/settings.json
dest: claude/settings.json
- src: .claude/CLAUDE.md
dest: claude/CLAUDE.md
- src: .claude/rules
dest: claude/rules
- src: .claude/skills
dest: claude/skills
- src: .config/ai/bootstrap.md
dest: ai/bootstrap.md
- src: .cline/data/globalState.json
dest: cline/data/globalState.json
- src: .cline/data/settings/global-settings.json
dest: cline/data/settings/global-settings.json
- src: .cline/rules
dest: cline/rules
- src: .cline/skills
dest: cline/skills
block:
- name: Prepare the ecaas Git configuration
ansible.builtin.import_tasks: ecaas_git.yml
@@ -43,43 +24,63 @@
group: "{{ user_group }}"
mode: "0755"
- name: Ensure private ecaas agent state directories exist
- name: Ensure the local Maven directory mounted into the container exists
ansible.builtin.file:
path: "{{ ecaas_agent_state }}{{ item }}"
path: "{{ user_home }}/.m2"
state: directory
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0755"
- name: Ensure the private ecaas Git state directory exists
ansible.builtin.file:
path: "{{ ecaas_agent_state }}"
state: directory
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0700"
- name: Ensure the local agent configuration directories mounted into the container exist
ansible.builtin.file:
path: "{{ user_home }}/{{ item.path }}"
state: directory
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "{{ item.mode }}"
loop:
- ""
- /ai
- /claude
- /cline
- /cline/data
- /cline/data/settings
- { path: .claude, mode: "0700" }
- { path: .cline, mode: "0700" }
- { path: .config/ai, mode: "0755" }
- { path: .config/glab-cli, mode: "0700" }
- name: Locate supported WSL agent configuration
ansible.builtin.stat:
path: "{{ user_home }}/{{ item.src }}"
follow: false
get_checksum: false
get_mime: false
loop: "{{ ecaas_agent_config }}"
register: ecaas_agent_config_sources
- name: Read the WSL Claude account state
ansible.builtin.slurp:
src: "{{ user_home }}/.claude.json"
register: ecaas_claude_account_state
failed_when: false
no_log: true
- name: Seed missing private agent settings without importing credential stores
- name: Read the Claude state used when CLAUDE_CONFIG_DIR is set
ansible.builtin.slurp:
src: "{{ user_home }}/.claude/.claude.json"
register: ecaas_claude_dir_state
failed_when: false
no_log: true
- name: Seed missing Claude account and onboarding state for the container
ansible.builtin.copy:
src: "{{ user_home }}/{{ item.item.src }}{{ '/' if item.stat.isdir | default(false) else '' }}"
dest: "{{ ecaas_agent_state }}/{{ item.item.dest }}"
remote_src: true
mode: preserve
force: false
local_follow: false
become_user: "{{ username }}"
when:
- item.stat.isreg | default(false) or item.stat.isdir | default(false)
- not ansible_check_mode
loop: "{{ ecaas_agent_config_sources.results }}"
content: >-
{{ (ecaas_claude_account_state.content | b64decode | from_json
| dict2items
| selectattr('key', 'in', ['oauthAccount', 'hasCompletedOnboarding', 'userID'])
| items2dict)
| combine(ecaas_claude_dir_state.content | default('e30=' | b64encode) | b64decode | from_json)
| to_nice_json }}
dest: "{{ user_home }}/.claude/.claude.json"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0600"
when: ecaas_claude_account_state.content is defined
no_log: true
diff: false
@@ -107,3 +108,14 @@
dest: bashrc
loop_control:
label: "{{ item.dest }}"
- name: Deploy the shared Bash aliases without the production tunnel
ansible.builtin.copy:
content: >-
{{ lookup('ansible.builtin.file', playbook_dir ~ '/../dotfiles/common/.bashrc.aliases')
| regex_replace('(?m)^(#[^\n]*Nginx Proxy Manager[^\n]*\n)?alias npm-tunnel=[^\n]*\n?', '') }}
dest: "{{ workstation_ecaas_workspace }}/.devcontainer/bashrc.aliases"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0644"
backup: true

View File

@@ -4,6 +4,11 @@
when: workstation_ecaas_workspace is defined
tags: [ecaas_devcontainer]
- name: Deploy the cdp Java 25 dev container
ansible.builtin.import_tasks: cdp_devcontainer.yml
when: workstation_cdp_workspace is defined
tags: [cdp_devcontainer]
- name: Ensure Windows Emacs authoring directories exist
tags: [dotfiles, dotfiles:workstation, emacs, wsl]
ansible.builtin.file:
@@ -60,51 +65,6 @@
loop_control:
label: "{{ item.dest }}"
- name: Check whether the pinned Java version is installed with Mise
tags: [packages, mise, java, wsl]
ansible.builtin.command:
cmd: "mise where java@{{ workstation_mise_java_version }}"
become_user: "{{ username }}"
environment:
HOME: "{{ user_home }}"
register: workstation_mise_java_where
changed_when: false
failed_when: false
- name: Check whether the pinned Java 25 version is installed with Mise
tags: [packages, mise, java, wsl]
ansible.builtin.command:
cmd: "mise where java@{{ workstation_mise_java_25_version }}"
become_user: "{{ username }}"
environment:
HOME: "{{ user_home }}"
register: workstation_mise_java_25_where
changed_when: false
failed_when: false
- name: Check whether the pinned Maven version is installed with Mise
tags: [packages, mise, maven, wsl]
ansible.builtin.command:
cmd: "mise where maven@{{ workstation_mise_maven_version }}"
become_user: "{{ username }}"
environment:
HOME: "{{ user_home }}"
register: workstation_mise_maven_where
changed_when: false
failed_when: false
- name: Install the pinned Mise tools
tags: [packages, mise, java, maven, wsl]
ansible.builtin.command:
cmd: mise install
become_user: "{{ username }}"
environment:
HOME: "{{ user_home }}"
when: >-
workstation_mise_java_where.rc != 0 or
workstation_mise_java_25_where.rc != 0 or
workstation_mise_maven_where.rc != 0
- name: Ensure WSL boot configuration file exists
tags: [packages, services]
ansible.builtin.file:

View File

@@ -0,0 +1,60 @@
{
"name": "cdp — Java 25 / Node 20",
"build": {
"dockerfile": "Dockerfile",
"args": {
"MAVEN_VERSION": {{ workstation_maven_version | to_json }},
"NODE_VERSION": {{ workstation_cdp_node_version | to_json }}
}
},
"remoteUser": "vscode",
"updateRemoteUserUID": true,
"containerEnv": {
"CLAUDE_CONFIG_DIR": "/home/vscode/.claude"
},
"remoteEnv": {
"ANTHROPIC_AUTH_TOKEN": "${localEnv:ANTHROPIC_AUTH_TOKEN}"
},
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": false
}
},
"mounts": [
{{ ('type=bind,source=' ~ ecaas_agent_state ~ '/git,target=/run/ecaas-git,readonly') | to_json }},
{% for ca in ecaas_git_available_cas %}
{{ ('type=bind,source=' ~ user_home ~ '/.local/share/certs/' ~ ca.certificate ~ ',target=/run/ecaas-git-ca/' ~ ca.certificate ~ ',readonly') | to_json }},
{% endfor %}
{{ ('type=bind,source=' ~ user_home ~ '/.config/ai,target=/home/vscode/.config/ai,readonly') | to_json }},
{{ ('type=bind,source=' ~ user_home ~ '/.claude,target=/home/vscode/.claude') | to_json }},
{{ ('type=bind,source=' ~ user_home ~ '/.cline,target=/home/vscode/.cline') | to_json }},
{{ ('type=bind,source=' ~ user_home ~ '/.m2,target=/home/vscode/.m2') | to_json }},
{{ ('type=bind,source=' ~ user_home ~ '/.config/glab-cli,target=/home/vscode/.config/glab-cli') | to_json }},
{{ ('type=bind,source=' ~ user_home ~ '/.kube,target=/home/vscode/.kube') | to_json }}
],
"forwardPorts": [4200, 4201, 4202, 4210, 8083, 8084],
"customizations": {
"vscode": {
"extensions": [
"vscjava.vscode-java-pack",
"vmware.vscode-boot-dev-pack",
"redhat.vscode-xml",
"redhat.vscode-yaml",
"ms-kubernetes-tools.vscode-kubernetes-tools",
"angular.ng-template",
"dbaeumer.vscode-eslint",
"emmanuelbeziat.vscode-great-icons"
],
"settings": {
"workbench.iconTheme": "vscode-great-icons",
"java.configuration.runtimes": [
{
"name": "JavaSE-25",
"path": "/usr/lib/jvm/msopenjdk-current",
"default": true
}
]
}
}
}
}

View File

@@ -3,7 +3,7 @@
"build": {
"dockerfile": "Dockerfile",
"args": {
"MAVEN_VERSION": {{ workstation_mise_maven_version | to_json }}
"MAVEN_VERSION": {{ workstation_maven_version | to_json }}
}
},
"remoteUser": "vscode",
@@ -11,14 +11,24 @@
"containerEnv": {
"CLAUDE_CONFIG_DIR": "/home/vscode/.claude"
},
"remoteEnv": {
"ANTHROPIC_AUTH_TOKEN": "${localEnv:ANTHROPIC_AUTH_TOKEN}"
},
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": false
}
},
"mounts": [
{{ ('type=bind,source=' ~ ecaas_agent_state ~ '/git,target=/run/ecaas-git,readonly') | to_json }},
{% for ca in ecaas_git_available_cas %}
{{ ('type=bind,source=' ~ user_home ~ '/.local/share/certs/' ~ ca.certificate ~ ',target=/run/ecaas-git-ca/' ~ ca.certificate ~ ',readonly') | to_json }},
{% endfor %}
{{ ('type=bind,source=' ~ ecaas_agent_state ~ '/ai,target=/home/vscode/.config/ai,readonly') | to_json }},
{{ ('type=bind,source=' ~ ecaas_agent_state ~ '/claude,target=/home/vscode/.claude') | to_json }},
{{ ('type=bind,source=' ~ ecaas_agent_state ~ '/cline,target=/home/vscode/.cline') | to_json }}
{{ ('type=bind,source=' ~ user_home ~ '/.config/ai,target=/home/vscode/.config/ai,readonly') | to_json }},
{{ ('type=bind,source=' ~ user_home ~ '/.claude,target=/home/vscode/.claude') | to_json }},
{{ ('type=bind,source=' ~ user_home ~ '/.cline,target=/home/vscode/.cline') | to_json }},
{{ ('type=bind,source=' ~ user_home ~ '/.m2,target=/home/vscode/.m2') | to_json }},
{{ ('type=bind,source=' ~ user_home ~ '/.config/glab-cli,target=/home/vscode/.config/glab-cli') | to_json }}
],
"forwardPorts": [8080],
"customizations": {
@@ -28,10 +38,10 @@
"vmware.vscode-boot-dev-pack",
"redhat.vscode-xml",
"redhat.vscode-yaml",
"anthropic.claude-code",
"saoudrizwan.claude-dev"
"emmanuelbeziat.vscode-great-icons"
],
"settings": {
"workbench.iconTheme": "vscode-great-icons",
"java.jdt.ls.java.home": "/opt/jdk-21",
"spring-boot.ls.java.home": "/opt/jdk-21",
"java.configuration.runtimes": [