From f7ec0bace0bf02b56ba12065c539c7318b881ec6 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Tue, 24 Jun 2025 15:17:40 +0000 Subject: [PATCH 01/29] Test update of the pep image devcontainer --- .devcontainer/devcontainer.json | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9bda5c90..40b233cf 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,4 @@ { - "image": "mcr.microsoft.com/devcontainers/javascript-node:1-18-bullseye", - "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": {} - }, - "postCreateCommand": "npm install -g @devcontainers/cli" -} + "image": "gitlabregistry.pep.cs.ru.nl/pep-public/core/ppp-acc", + "privileged": true +} \ No newline at end of file From 01cdc833deadfca73dd24963e645712f28b75146 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Wed, 25 Jun 2025 18:43:06 +0000 Subject: [PATCH 02/29] Added golang and python3 --- .devcontainer/devcontainer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 40b233cf..bb3c15cc 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,7 @@ { + "name": "PEP CLI (ACC)", "image": "gitlabregistry.pep.cs.ru.nl/pep-public/core/ppp-acc", - "privileged": true + "privileged": true, + "postCreateCommand": "apt-get update && apt-get install -y golang python3 python3-pip", + "remoteUser": "root" } \ No newline at end of file From f574603464acc1f0ec30e8c049aa84916e8ca787 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Wed, 25 Jun 2025 20:36:02 +0000 Subject: [PATCH 03/29] Added in app-network --- .devcontainer/devcontainer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index bb3c15cc..08debd93 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,5 +3,8 @@ "image": "gitlabregistry.pep.cs.ru.nl/pep-public/core/ppp-acc", "privileged": true, "postCreateCommand": "apt-get update && apt-get install -y golang python3 python3-pip", - "remoteUser": "root" + "remoteUser": "root", + "runArgs": [ + "--network=app-network", + ], } \ No newline at end of file From 4c7f05a0d3a56ca42761c329032d4bebfea65de5 Mon Sep 17 00:00:00 2001 From: applegath-verily Date: Thu, 26 Jun 2025 09:48:59 -0400 Subject: [PATCH 04/29] Update devcontainer.json --- .devcontainer/devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 08debd93..8b3eede7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,9 +2,9 @@ "name": "PEP CLI (ACC)", "image": "gitlabregistry.pep.cs.ru.nl/pep-public/core/ppp-acc", "privileged": true, - "postCreateCommand": "apt-get update && apt-get install -y golang python3 python3-pip", + "postCreateCommand": "apt-get update && apt-get install -y golang python3 python3-pip nodejs npm", "remoteUser": "root", "runArgs": [ "--network=app-network", ], -} \ No newline at end of file +} From d3b5ff6cd11b05561f06a1dced82db11d20fcd7a Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Thu, 26 Jun 2025 13:53:34 +0000 Subject: [PATCH 05/29] formatting --- .devcontainer/devcontainer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8b3eede7..8238897b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,6 +5,6 @@ "postCreateCommand": "apt-get update && apt-get install -y golang python3 python3-pip nodejs npm", "remoteUser": "root", "runArgs": [ - "--network=app-network", - ], -} + "--network=app-network" + ] +} \ No newline at end of file From ecf6a2f23725931377ada6bdf14916033e528e23 Mon Sep 17 00:00:00 2001 From: applegath-verily Date: Thu, 26 Jun 2025 10:02:51 -0400 Subject: [PATCH 06/29] Update devcontainer.json --- .devcontainer/devcontainer.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8238897b..598b2161 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,5 +6,6 @@ "remoteUser": "root", "runArgs": [ "--network=app-network" - ] -} \ No newline at end of file + ], + "initializeCommand": "docker network inspect app-network >/dev/null 2>&1 || docker network create app-network" +} From 19ad600fc058d0d4660d31ee1e7fa5092520399f Mon Sep 17 00:00:00 2001 From: applegath-verily Date: Thu, 26 Jun 2025 10:28:18 -0400 Subject: [PATCH 07/29] Update devcontainer.json --- .devcontainer/devcontainer.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 598b2161..306df224 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,10 +2,8 @@ "name": "PEP CLI (ACC)", "image": "gitlabregistry.pep.cs.ru.nl/pep-public/core/ppp-acc", "privileged": true, - "postCreateCommand": "apt-get update && apt-get install -y golang python3 python3-pip nodejs npm", "remoteUser": "root", - "runArgs": [ - "--network=app-network" - ], - "initializeCommand": "docker network inspect app-network >/dev/null 2>&1 || docker network create app-network" + "forwardPorts": [ + 3000 + ] } From 615d6a6e45743aa30b5373e89e2eb98cb32019e5 Mon Sep 17 00:00:00 2001 From: applegath-verily Date: Thu, 26 Jun 2025 10:37:48 -0400 Subject: [PATCH 08/29] Update devcontainer.json --- .devcontainer/devcontainer.json | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 306df224..a2f312e0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,22 @@ "image": "gitlabregistry.pep.cs.ru.nl/pep-public/core/ppp-acc", "privileged": true, "remoteUser": "root", + "features": { + "ghcr.io/coder/devcontainer-features/code-server:1": { + "port": 8080, + "host": "0.0.0.0" + } + }, "forwardPorts": [ - 3000 - ] + 8080 + ], + "customizations": { + "vscode": { + "extensions": [ + // Add any VS Code extensions you want to be installed in the container + "ms-python.python", + "ms-vscode.cpptools" + ] + } + } } From f14dba69fa725c42fd1c1a6a014c6a7aeab0a066 Mon Sep 17 00:00:00 2001 From: applegath-verily Date: Thu, 26 Jun 2025 10:49:57 -0400 Subject: [PATCH 09/29] Update devcontainer.json working vscode on local devcontainer --- .devcontainer/devcontainer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a2f312e0..f06fa18d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,7 +6,8 @@ "features": { "ghcr.io/coder/devcontainer-features/code-server:1": { "port": 8080, - "host": "0.0.0.0" + "host": "0.0.0.0", + "auth": "none" } }, "forwardPorts": [ From be8546bcde92ddf6478314634c2ca4bf8c7b6c7c Mon Sep 17 00:00:00 2001 From: applegath-verily Date: Thu, 26 Jun 2025 11:25:04 -0400 Subject: [PATCH 10/29] Update devcontainer.json --- .devcontainer/devcontainer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f06fa18d..e2159b7d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,6 @@ "name": "PEP CLI (ACC)", "image": "gitlabregistry.pep.cs.ru.nl/pep-public/core/ppp-acc", "privileged": true, - "remoteUser": "root", "features": { "ghcr.io/coder/devcontainer-features/code-server:1": { "port": 8080, From 00c38a575fdc1decef26d2d47a4b0e5eaa4fdc23 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Thu, 26 Jun 2025 15:29:31 +0000 Subject: [PATCH 11/29] update --- .devcontainer/.devcontainer.json | 24 ++++++++++++++++++++++++ .devcontainer/devcontainer.json | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/.devcontainer.json diff --git a/.devcontainer/.devcontainer.json b/.devcontainer/.devcontainer.json new file mode 100644 index 00000000..ce72a04b --- /dev/null +++ b/.devcontainer/.devcontainer.json @@ -0,0 +1,24 @@ +{ + "name": "PEP CLI (ACC)", + "image": "gitlabregistry.pep.cs.ru.nl/pep-public/core/ppp-acc", + "privileged": true, + "features": { + "ghcr.io/coder/devcontainer-features/code-server:1": { + "port": 8080, + "host": "0.0.0.0", + "auth": "none" + } + }, + "forwardPorts": [ + 8080 + ], + "customizations": { + "vscode": { + "extensions": [ + // Add any VS Code extensions you want to be installed in the container + "ms-python.python", + "ms-vscode.cpptools" + ] + } + } +} \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e2159b7d..415944e8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -21,4 +21,4 @@ ] } } -} +} \ No newline at end of file From cdf4459ad718078ccd2d605b09aceab5cc0a927a Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Thu, 26 Jun 2025 15:39:49 +0000 Subject: [PATCH 12/29] remove .devcontainer.json --- .devcontainer/.devcontainer.json | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 .devcontainer/.devcontainer.json diff --git a/.devcontainer/.devcontainer.json b/.devcontainer/.devcontainer.json deleted file mode 100644 index ce72a04b..00000000 --- a/.devcontainer/.devcontainer.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "PEP CLI (ACC)", - "image": "gitlabregistry.pep.cs.ru.nl/pep-public/core/ppp-acc", - "privileged": true, - "features": { - "ghcr.io/coder/devcontainer-features/code-server:1": { - "port": 8080, - "host": "0.0.0.0", - "auth": "none" - } - }, - "forwardPorts": [ - 8080 - ], - "customizations": { - "vscode": { - "extensions": [ - // Add any VS Code extensions you want to be installed in the container - "ms-python.python", - "ms-vscode.cpptools" - ] - } - } -} \ No newline at end of file From 4df38c886ca7e5b426d15ab5fa070aeb2fb32f59 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Thu, 26 Jun 2025 16:37:06 +0000 Subject: [PATCH 13/29] re add .devcontiner.json --- .devcontainer/.devcontainer.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .devcontainer/.devcontainer.json diff --git a/.devcontainer/.devcontainer.json b/.devcontainer/.devcontainer.json new file mode 100644 index 00000000..ce72a04b --- /dev/null +++ b/.devcontainer/.devcontainer.json @@ -0,0 +1,24 @@ +{ + "name": "PEP CLI (ACC)", + "image": "gitlabregistry.pep.cs.ru.nl/pep-public/core/ppp-acc", + "privileged": true, + "features": { + "ghcr.io/coder/devcontainer-features/code-server:1": { + "port": 8080, + "host": "0.0.0.0", + "auth": "none" + } + }, + "forwardPorts": [ + 8080 + ], + "customizations": { + "vscode": { + "extensions": [ + // Add any VS Code extensions you want to be installed in the container + "ms-python.python", + "ms-vscode.cpptools" + ] + } + } +} \ No newline at end of file From 306aafc108bbb4267ecb476d444405a3d84dd78e Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Thu, 26 Jun 2025 17:30:59 +0000 Subject: [PATCH 14/29] update --- .devcontainer/devcontainer.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 415944e8..a748330f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -12,6 +12,10 @@ "forwardPorts": [ 8080 ], + "runArgs": [ + "--name", + "application-server" + ], "customizations": { "vscode": { "extensions": [ From 4aaa81c207c0a42877952c675a48229777e4eb61 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Thu, 26 Jun 2025 19:10:28 +0000 Subject: [PATCH 15/29] change around order --- .devcontainer/devcontainer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a748330f..a9da7992 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,13 +9,13 @@ "auth": "none" } }, - "forwardPorts": [ - 8080 - ], "runArgs": [ "--name", "application-server" ], + "forwardPorts": [ + 8080 + ], "customizations": { "vscode": { "extensions": [ From b7396fb1160abc315513ebab4be859232d359910 Mon Sep 17 00:00:00 2001 From: Yu Hu <93544261+yuhuyoyo@users.noreply.github.com> Date: Fri, 27 Jun 2025 08:01:31 -0400 Subject: [PATCH 16/29] Update devcontainer.json --- .devcontainer/devcontainer.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a9da7992..55855831 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -11,7 +11,10 @@ }, "runArgs": [ "--name", - "application-server" + "application-server", + "--network", + "app-network", + "-p", "8080:8080" ], "forwardPorts": [ 8080 @@ -25,4 +28,4 @@ ] } } -} \ No newline at end of file +} From 9161865825b7430bdb984b72d633796bf7a6d5c5 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Fri, 27 Jun 2025 16:52:25 +0000 Subject: [PATCH 17/29] Added wb startup scripts --- .devcontainer/.devcontainer.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.devcontainer/.devcontainer.json b/.devcontainer/.devcontainer.json index ce72a04b..d263ab53 100644 --- a/.devcontainer/.devcontainer.json +++ b/.devcontainer/.devcontainer.json @@ -9,6 +9,21 @@ "auth": "none" } }, + "postStartCommand": [ + "./startupscript/remount-on-restart.sh", + "abc", + "/config", + "${templateOption:cloud}", + "${templateOption:login}" + ], + "runArgs": [ + "--name", + "application-server", + "--network", + "app-network", + "-p", + "8080:8080" + ], "forwardPorts": [ 8080 ], From 356d594e92203266b1db85c6635bb619f1a90f12 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Fri, 27 Jun 2025 16:54:40 +0000 Subject: [PATCH 18/29] update for wb change --- .devcontainer/devcontainer.json | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 55855831..a5b2d1ea 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,12 +9,20 @@ "auth": "none" } }, + "postStartCommand": [ + "./startupscript/remount-on-restart.sh", + "abc", + "/config", + "${templateOption:cloud}", + "${templateOption:login}" + ], "runArgs": [ "--name", "application-server", - "--network", + "--network", "app-network", - "-p", "8080:8080" + "-p", + "8080:8080" ], "forwardPorts": [ 8080 @@ -28,4 +36,4 @@ ] } } -} +} \ No newline at end of file From ca818609915db1851dce65134fb910f62bfbf1aa Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Fri, 27 Jun 2025 17:05:47 +0000 Subject: [PATCH 19/29] Added to src and copy of vscode --- src/pep-cli/.devcontainer.json | 59 ++++++++++++++++++++++++++ src/pep-cli/README.md | 17 ++++++++ src/pep-cli/devcontainer-template.json | 31 ++++++++++++++ src/pep-cli/docker-compose.yaml | 28 ++++++++++++ src/pep-cli/sudo-passwordless.sh | 34 +++++++++++++++ 5 files changed, 169 insertions(+) create mode 100644 src/pep-cli/.devcontainer.json create mode 100644 src/pep-cli/README.md create mode 100644 src/pep-cli/devcontainer-template.json create mode 100644 src/pep-cli/docker-compose.yaml create mode 100755 src/pep-cli/sudo-passwordless.sh diff --git a/src/pep-cli/.devcontainer.json b/src/pep-cli/.devcontainer.json new file mode 100644 index 00000000..2be95859 --- /dev/null +++ b/src/pep-cli/.devcontainer.json @@ -0,0 +1,59 @@ +{ + "name": "PEP CLI (ACC)", + "dockerComposeFile": "docker-compose.yaml", + "service": "app", + "shutdownAction": "none", + "workspaceFolder": "/workspace", + "postCreateCommand": "./startupscript/post-startup.sh root /config \"${templateOption:cloud}\" \"${templateOption:login}\"; ./sudo-passwordless.sh abc", + // re-mount bucket files on container start up + "postStartCommand": [ + "./startupscript/remount-on-restart.sh", + "root", + "/config", + "${templateOption:cloud}", + "${templateOption:login}" + ], + "features": { + "features": { + "ghcr.io/coder/devcontainer-features/code-server:1": { + "port": 8080, + "host": "0.0.0.0", + "auth": "none" + } + }, + "ghcr.io/devcontainers/features/aws-cli:1.1.1": {}, + "ghcr.io/dhoeric/features/google-cloud-cli:1.0.1": {} + }, + "remoteUser": "root", + "customizations": { + "workbench": { + "opens": { + "extensions": [ + // Source. + ".c", + ".cjs", + ".cpp", + ".go", + ".java", + ".js", + ".mjs", + ".php", + ".scala", + ".sh", + ".ts", + // Documents + ".md", + ".html", + // Data + ".csv", + ".json", + ".jsonc", + ".tsv", + ".xml", + ".yml" + ], + "fileUrlSuffix": "?payload=[[\"openFile\",\"vscode-remote:///config/{path}\"]]" + } + } + } +} \ No newline at end of file diff --git a/src/pep-cli/README.md b/src/pep-cli/README.md new file mode 100644 index 00000000..b8403896 --- /dev/null +++ b/src/pep-cli/README.md @@ -0,0 +1,17 @@ + +# Vscode (vscode) + +A Template to run vscode on workbench + +## Options + +| Options Id | Description | Type | Default Value | +|-----|-----|-----|-----| +| cloud | VM cloud environment | string | gcp | +| login | Whether to log in to workbench CLI | string | false | + + + +--- + +_Note: This file was auto-generated from the [devcontainer-template.json](https://github.com/verily-src/workbench-app-devcontainers/blob/main/src/vscode/devcontainer-template.json). Add additional notes to a `NOTES.md`._ diff --git a/src/pep-cli/devcontainer-template.json b/src/pep-cli/devcontainer-template.json new file mode 100644 index 00000000..634f8889 --- /dev/null +++ b/src/pep-cli/devcontainer-template.json @@ -0,0 +1,31 @@ +{ + "id": "pepcli", + "version": "0.0.2", + "name": "PEP CLI (ACC)", + "description": "A Template to run pepcli on workbench", + "documentationURL": "https://github.com/verily-src/workbench-app-devcontainers/tree/master/src/vscode", + "licenseURL": "https://github.com/verily-src/workbench-app-devcontainers/blob/master/LICENSE", + "options": { + "cloud": { + "type": "string", + "description": "VM cloud environment", + "proposals": [ + "gcp", + "aws" + ], + "default": "gcp" + }, + "login": { + "type": "string", + "description": "Whether to log in to workbench CLI", + "proposals": [ + "true", + "false" + ], + "default": "false" + } + }, + "platforms": [ + "Any" + ] +} \ No newline at end of file diff --git a/src/pep-cli/docker-compose.yaml b/src/pep-cli/docker-compose.yaml new file mode 100644 index 00000000..07cd627e --- /dev/null +++ b/src/pep-cli/docker-compose.yaml @@ -0,0 +1,28 @@ +version: "2.4" +services: + app: + container_name: "application-server" + image: "gitlabregistry.pep.cs.ru.nl/pep-public/core/ppp-acc" + restart: always + volumes: + - .:/workspace:cached + - work:/home/vscode:cached + ports: + - "8080:8080" + environment: + USER: "root" + DEFAULT_WORKSPACE: "/config" + SUDO_PASSWORD: "pwd" + networks: + - app-network + cap_add: + - SYS_ADMIN + devices: + - /dev/fuse + security_opt: + - apparmor:unconfined +networks: + app-network: + external: true +volumes: + work: diff --git a/src/pep-cli/sudo-passwordless.sh b/src/pep-cli/sudo-passwordless.sh new file mode 100755 index 00000000..d14bd0a1 --- /dev/null +++ b/src/pep-cli/sudo-passwordless.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# This script is used to set up passwordless sudo for the core user on the VM. +# It requires to be run with root priviledges and USER_NAME to be set in the environment. +# It is typically called from post-startup.sh. + +USER_NAME="${1}" + +if [[ -z "${USER_NAME}" ]]; then + echo "Usage: $0 " + exit 1 +fi + +sudoers_file="/etc/sudoers" +sudoers_d_file="/etc/sudoers.d/${USER_NAME}" + +# Make sure user exists +if ! id "${USER_NAME}" &>/dev/null; then + echo "User ${USER_NAME} does not exist." + exit 1 +fi + +# Check if there's an old rule in the main sudoers file that requires a password +if grep -q "^${USER_NAME} ALL=(ALL:ALL) ALL" "${sudoers_file}"; then + echo "Found password-requiring rule for ${USER_NAME} in /etc/sudoers. Commenting it out." + + # Comment out the old rule in /etc/sudoers + sed -i "s/^${USER_NAME} ALL=(ALL:ALL) ALL/# ${USER_NAME} ALL=(ALL:ALL) ALL/" "${sudoers_file}" +fi + +echo "${USER_NAME} ALL=(ALL) NOPASSWD:ALL" > "${sudoers_d_file}" +chmod 440 "${sudoers_d_file}" + +echo "User ${USER_NAME} has been given passwordless sudo access." From bc0031519852113f207bdbaa5d201e8eece27f1d Mon Sep 17 00:00:00 2001 From: Yu Hu <93544261+yuhuyoyo@users.noreply.github.com> Date: Fri, 27 Jun 2025 13:07:41 -0400 Subject: [PATCH 20/29] Update .devcontainer.json --- src/pep-cli/.devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pep-cli/.devcontainer.json b/src/pep-cli/.devcontainer.json index 2be95859..89cdbff5 100644 --- a/src/pep-cli/.devcontainer.json +++ b/src/pep-cli/.devcontainer.json @@ -4,7 +4,7 @@ "service": "app", "shutdownAction": "none", "workspaceFolder": "/workspace", - "postCreateCommand": "./startupscript/post-startup.sh root /config \"${templateOption:cloud}\" \"${templateOption:login}\"; ./sudo-passwordless.sh abc", + "postCreateCommand": "./startupscript/post-startup.sh root /config \"${templateOption:cloud}\" \"${templateOption:login}\"", // re-mount bucket files on container start up "postStartCommand": [ "./startupscript/remount-on-restart.sh", @@ -56,4 +56,4 @@ } } } -} \ No newline at end of file +} From da1ae459f6fd32327a5c1b0ae439ef3ade3cb4ea Mon Sep 17 00:00:00 2001 From: Yu Hu <93544261+yuhuyoyo@users.noreply.github.com> Date: Fri, 27 Jun 2025 13:08:34 -0400 Subject: [PATCH 21/29] Update docker-compose.yaml --- src/pep-cli/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pep-cli/docker-compose.yaml b/src/pep-cli/docker-compose.yaml index 07cd627e..0f0a32ec 100644 --- a/src/pep-cli/docker-compose.yaml +++ b/src/pep-cli/docker-compose.yaml @@ -6,7 +6,7 @@ services: restart: always volumes: - .:/workspace:cached - - work:/home/vscode:cached + - work:/home/ubuntu:cached ports: - "8080:8080" environment: From 5a2d8bd69f13ed04267d3117f5cacbf43e25c548 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Fri, 27 Jun 2025 17:12:35 +0000 Subject: [PATCH 22/29] update --- src/pep-cli/.devcontainer.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/pep-cli/.devcontainer.json b/src/pep-cli/.devcontainer.json index 89cdbff5..9f800937 100644 --- a/src/pep-cli/.devcontainer.json +++ b/src/pep-cli/.devcontainer.json @@ -14,12 +14,10 @@ "${templateOption:login}" ], "features": { - "features": { - "ghcr.io/coder/devcontainer-features/code-server:1": { - "port": 8080, - "host": "0.0.0.0", - "auth": "none" - } + "ghcr.io/coder/devcontainer-features/code-server:1": { + "port": 8080, + "host": "0.0.0.0", + "auth": "none" }, "ghcr.io/devcontainers/features/aws-cli:1.1.1": {}, "ghcr.io/dhoeric/features/google-cloud-cli:1.0.1": {} From 78249ccf4f9de893971d92ae4d7c9e4b33064c24 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Fri, 27 Jun 2025 17:27:12 +0000 Subject: [PATCH 23/29] change --- src/pep-cli/.devcontainer.json | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/pep-cli/.devcontainer.json b/src/pep-cli/.devcontainer.json index 9f800937..9e5efbf6 100644 --- a/src/pep-cli/.devcontainer.json +++ b/src/pep-cli/.devcontainer.json @@ -4,7 +4,7 @@ "service": "app", "shutdownAction": "none", "workspaceFolder": "/workspace", - "postCreateCommand": "./startupscript/post-startup.sh root /config \"${templateOption:cloud}\" \"${templateOption:login}\"", + "postCreateCommand": "./startupscript/post-startup.sh root /config \"${templateOption:cloud}\" \"${templateOption:login}\"; ./sudo-passwordless.sh abc", // re-mount bucket files on container start up "postStartCommand": [ "./startupscript/remount-on-restart.sh", @@ -14,13 +14,16 @@ "${templateOption:login}" ], "features": { + "ghcr.io/devcontainers/features/java:1.6.3": { + "version": "17" + }, + "ghcr.io/devcontainers/features/aws-cli:1.1.1": {}, + "ghcr.io/dhoeric/features/google-cloud-cli:1.0.1": {}, "ghcr.io/coder/devcontainer-features/code-server:1": { "port": 8080, "host": "0.0.0.0", "auth": "none" - }, - "ghcr.io/devcontainers/features/aws-cli:1.1.1": {}, - "ghcr.io/dhoeric/features/google-cloud-cli:1.0.1": {} + } }, "remoteUser": "root", "customizations": { @@ -54,4 +57,4 @@ } } } -} +} \ No newline at end of file From f6777150a6214f9c8aacac734dfa6d42c7d36643 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Fri, 27 Jun 2025 18:15:25 +0000 Subject: [PATCH 24/29] added golang and python --- src/pep-cli/.devcontainer.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pep-cli/.devcontainer.json b/src/pep-cli/.devcontainer.json index 9e5efbf6..8614d6f9 100644 --- a/src/pep-cli/.devcontainer.json +++ b/src/pep-cli/.devcontainer.json @@ -23,6 +23,12 @@ "port": 8080, "host": "0.0.0.0", "auth": "none" + }, + "ghcr.io/devcontainers/features/go:1": { + "version": "1.22" + }, + "ghcr.io/devcontainers/features/python:1": { + "version": "3.12" } }, "remoteUser": "root", From 11edc17ed5ea3d6a1703f779db016fb79f8f3155 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Fri, 11 Jul 2025 14:46:09 +0000 Subject: [PATCH 25/29] update to path and dir name --- src/pep-cli-acc/.devcontainer.json | 66 +++++++++++++++++++ src/{pep-cli => pep-cli-acc}/README.md | 0 .../docker-compose.yaml | 0 .../sudo-passwordless.sh | 0 src/pep-cli/.devcontainer.json | 66 ------------------- src/pep-cli/devcontainer-template.json | 31 --------- 6 files changed, 66 insertions(+), 97 deletions(-) create mode 100644 src/pep-cli-acc/.devcontainer.json rename src/{pep-cli => pep-cli-acc}/README.md (100%) rename src/{pep-cli => pep-cli-acc}/docker-compose.yaml (100%) rename src/{pep-cli => pep-cli-acc}/sudo-passwordless.sh (100%) diff --git a/src/pep-cli-acc/.devcontainer.json b/src/pep-cli-acc/.devcontainer.json new file mode 100644 index 00000000..8614d6f9 --- /dev/null +++ b/src/pep-cli-acc/.devcontainer.json @@ -0,0 +1,66 @@ +{ + "name": "PEP CLI (ACC)", + "dockerComposeFile": "docker-compose.yaml", + "service": "app", + "shutdownAction": "none", + "workspaceFolder": "/workspace", + "postCreateCommand": "./startupscript/post-startup.sh root /config \"${templateOption:cloud}\" \"${templateOption:login}\"; ./sudo-passwordless.sh abc", + // re-mount bucket files on container start up + "postStartCommand": [ + "./startupscript/remount-on-restart.sh", + "root", + "/config", + "${templateOption:cloud}", + "${templateOption:login}" + ], + "features": { + "ghcr.io/devcontainers/features/java:1.6.3": { + "version": "17" + }, + "ghcr.io/devcontainers/features/aws-cli:1.1.1": {}, + "ghcr.io/dhoeric/features/google-cloud-cli:1.0.1": {}, + "ghcr.io/coder/devcontainer-features/code-server:1": { + "port": 8080, + "host": "0.0.0.0", + "auth": "none" + }, + "ghcr.io/devcontainers/features/go:1": { + "version": "1.22" + }, + "ghcr.io/devcontainers/features/python:1": { + "version": "3.12" + } + }, + "remoteUser": "root", + "customizations": { + "workbench": { + "opens": { + "extensions": [ + // Source. + ".c", + ".cjs", + ".cpp", + ".go", + ".java", + ".js", + ".mjs", + ".php", + ".scala", + ".sh", + ".ts", + // Documents + ".md", + ".html", + // Data + ".csv", + ".json", + ".jsonc", + ".tsv", + ".xml", + ".yml" + ], + "fileUrlSuffix": "?payload=[[\"openFile\",\"vscode-remote:///config/{path}\"]]" + } + } + } +} \ No newline at end of file diff --git a/src/pep-cli/README.md b/src/pep-cli-acc/README.md similarity index 100% rename from src/pep-cli/README.md rename to src/pep-cli-acc/README.md diff --git a/src/pep-cli/docker-compose.yaml b/src/pep-cli-acc/docker-compose.yaml similarity index 100% rename from src/pep-cli/docker-compose.yaml rename to src/pep-cli-acc/docker-compose.yaml diff --git a/src/pep-cli/sudo-passwordless.sh b/src/pep-cli-acc/sudo-passwordless.sh similarity index 100% rename from src/pep-cli/sudo-passwordless.sh rename to src/pep-cli-acc/sudo-passwordless.sh diff --git a/src/pep-cli/.devcontainer.json b/src/pep-cli/.devcontainer.json index 8614d6f9..e69de29b 100644 --- a/src/pep-cli/.devcontainer.json +++ b/src/pep-cli/.devcontainer.json @@ -1,66 +0,0 @@ -{ - "name": "PEP CLI (ACC)", - "dockerComposeFile": "docker-compose.yaml", - "service": "app", - "shutdownAction": "none", - "workspaceFolder": "/workspace", - "postCreateCommand": "./startupscript/post-startup.sh root /config \"${templateOption:cloud}\" \"${templateOption:login}\"; ./sudo-passwordless.sh abc", - // re-mount bucket files on container start up - "postStartCommand": [ - "./startupscript/remount-on-restart.sh", - "root", - "/config", - "${templateOption:cloud}", - "${templateOption:login}" - ], - "features": { - "ghcr.io/devcontainers/features/java:1.6.3": { - "version": "17" - }, - "ghcr.io/devcontainers/features/aws-cli:1.1.1": {}, - "ghcr.io/dhoeric/features/google-cloud-cli:1.0.1": {}, - "ghcr.io/coder/devcontainer-features/code-server:1": { - "port": 8080, - "host": "0.0.0.0", - "auth": "none" - }, - "ghcr.io/devcontainers/features/go:1": { - "version": "1.22" - }, - "ghcr.io/devcontainers/features/python:1": { - "version": "3.12" - } - }, - "remoteUser": "root", - "customizations": { - "workbench": { - "opens": { - "extensions": [ - // Source. - ".c", - ".cjs", - ".cpp", - ".go", - ".java", - ".js", - ".mjs", - ".php", - ".scala", - ".sh", - ".ts", - // Documents - ".md", - ".html", - // Data - ".csv", - ".json", - ".jsonc", - ".tsv", - ".xml", - ".yml" - ], - "fileUrlSuffix": "?payload=[[\"openFile\",\"vscode-remote:///config/{path}\"]]" - } - } - } -} \ No newline at end of file diff --git a/src/pep-cli/devcontainer-template.json b/src/pep-cli/devcontainer-template.json index 634f8889..e69de29b 100644 --- a/src/pep-cli/devcontainer-template.json +++ b/src/pep-cli/devcontainer-template.json @@ -1,31 +0,0 @@ -{ - "id": "pepcli", - "version": "0.0.2", - "name": "PEP CLI (ACC)", - "description": "A Template to run pepcli on workbench", - "documentationURL": "https://github.com/verily-src/workbench-app-devcontainers/tree/master/src/vscode", - "licenseURL": "https://github.com/verily-src/workbench-app-devcontainers/blob/master/LICENSE", - "options": { - "cloud": { - "type": "string", - "description": "VM cloud environment", - "proposals": [ - "gcp", - "aws" - ], - "default": "gcp" - }, - "login": { - "type": "string", - "description": "Whether to log in to workbench CLI", - "proposals": [ - "true", - "false" - ], - "default": "false" - } - }, - "platforms": [ - "Any" - ] -} \ No newline at end of file From db1236596d312b743b47cd1b921a2acd695a36d0 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Fri, 11 Jul 2025 14:56:18 +0000 Subject: [PATCH 26/29] added copilot --- src/pep-cli-acc/.devcontainer.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pep-cli-acc/.devcontainer.json b/src/pep-cli-acc/.devcontainer.json index 8614d6f9..99a66906 100644 --- a/src/pep-cli-acc/.devcontainer.json +++ b/src/pep-cli-acc/.devcontainer.json @@ -33,6 +33,11 @@ }, "remoteUser": "root", "customizations": { + "vscode": { + "extensions": [ + "GitHub.copilot" + ] + }, "workbench": { "opens": { "extensions": [ From c24d67cc0f3f9a5bcd717126da0b809172ff478a Mon Sep 17 00:00:00 2001 From: applegath-verily Date: Tue, 22 Jul 2025 13:06:16 -0400 Subject: [PATCH 27/29] Update .devcontainer.json --- src/pep-cli-acc/.devcontainer.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/pep-cli-acc/.devcontainer.json b/src/pep-cli-acc/.devcontainer.json index 99a66906..b5af2946 100644 --- a/src/pep-cli-acc/.devcontainer.json +++ b/src/pep-cli-acc/.devcontainer.json @@ -33,11 +33,6 @@ }, "remoteUser": "root", "customizations": { - "vscode": { - "extensions": [ - "GitHub.copilot" - ] - }, "workbench": { "opens": { "extensions": [ @@ -68,4 +63,4 @@ } } } -} \ No newline at end of file +} From b3e1c3eec035cfb6bb2cd9d8a30a2be20a5d0929 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Tue, 29 Jul 2025 17:26:12 +0000 Subject: [PATCH 28/29] cleanup --- src/pep-cli-acc/README.md | 4 ++-- src/pep-cli/.devcontainer.json | 0 src/pep-cli/devcontainer-template.json | 0 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 src/pep-cli/.devcontainer.json delete mode 100644 src/pep-cli/devcontainer-template.json diff --git a/src/pep-cli-acc/README.md b/src/pep-cli-acc/README.md index b8403896..c8b2827e 100644 --- a/src/pep-cli-acc/README.md +++ b/src/pep-cli-acc/README.md @@ -1,7 +1,7 @@ -# Vscode (vscode) +# PEP Acceptance Image with VScode Server -A Template to run vscode on workbench +A Template to run a vscode server on workbench. ## Options diff --git a/src/pep-cli/.devcontainer.json b/src/pep-cli/.devcontainer.json deleted file mode 100644 index e69de29b..00000000 diff --git a/src/pep-cli/devcontainer-template.json b/src/pep-cli/devcontainer-template.json deleted file mode 100644 index e69de29b..00000000 From d335b1686ceb9ee6c8c1f0bfe2db7b90305634f1 Mon Sep 17 00:00:00 2001 From: Drew Applegath Date: Tue, 29 Jul 2025 17:28:40 +0000 Subject: [PATCH 29/29] Fixed devcontainer.json --- .devcontainer/.devcontainer.json | 39 -------------------------------- .devcontainer/devcontainer.json | 38 +++---------------------------- 2 files changed, 3 insertions(+), 74 deletions(-) delete mode 100644 .devcontainer/.devcontainer.json diff --git a/.devcontainer/.devcontainer.json b/.devcontainer/.devcontainer.json deleted file mode 100644 index d263ab53..00000000 --- a/.devcontainer/.devcontainer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "PEP CLI (ACC)", - "image": "gitlabregistry.pep.cs.ru.nl/pep-public/core/ppp-acc", - "privileged": true, - "features": { - "ghcr.io/coder/devcontainer-features/code-server:1": { - "port": 8080, - "host": "0.0.0.0", - "auth": "none" - } - }, - "postStartCommand": [ - "./startupscript/remount-on-restart.sh", - "abc", - "/config", - "${templateOption:cloud}", - "${templateOption:login}" - ], - "runArgs": [ - "--name", - "application-server", - "--network", - "app-network", - "-p", - "8080:8080" - ], - "forwardPorts": [ - 8080 - ], - "customizations": { - "vscode": { - "extensions": [ - // Add any VS Code extensions you want to be installed in the container - "ms-python.python", - "ms-vscode.cpptools" - ] - } - } -} \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a5b2d1ea..d4df03a9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,39 +1,7 @@ { - "name": "PEP CLI (ACC)", - "image": "gitlabregistry.pep.cs.ru.nl/pep-public/core/ppp-acc", - "privileged": true, + "image": "mcr.microsoft.com/devcontainers/javascript-node:1-18-bullseye", "features": { - "ghcr.io/coder/devcontainer-features/code-server:1": { - "port": 8080, - "host": "0.0.0.0", - "auth": "none" - } + "ghcr.io/devcontainers/features/docker-in-docker:2": {} }, - "postStartCommand": [ - "./startupscript/remount-on-restart.sh", - "abc", - "/config", - "${templateOption:cloud}", - "${templateOption:login}" - ], - "runArgs": [ - "--name", - "application-server", - "--network", - "app-network", - "-p", - "8080:8080" - ], - "forwardPorts": [ - 8080 - ], - "customizations": { - "vscode": { - "extensions": [ - // Add any VS Code extensions you want to be installed in the container - "ms-python.python", - "ms-vscode.cpptools" - ] - } - } + "postCreateCommand": "npm install -g @devcontainers/cli" } \ No newline at end of file