devcontainer: add option to start ceph nodes for tests
"go.useLanguageServer": true,
"go.goroot": "/opt/go",
"go.testEnvVars": {
- "GODEBUG": "cgocheck=2"
+ "GODEBUG": "cgocheck=2",
+ "CEPH_CONF": "/ceph_a/ceph.conf",
},
- "go.lintTool": "golangci-lint",
"go.buildTags": "ptrguard",
"go.testTags": "ptrguard",
"go.testFlags": [
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
"runArgs": [
"--cap-add=SYS_PTRACE",
- "--security-opt",
- "seccomp=unconfined"
+ "--security-opt=seccomp=unconfined",
+ "--net=test_ceph_net",
],
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
- "mounts": [ "source=test_ceph_go_cache,target=/go,type=volume" ],
+ "mounts": [
+ "source=test_ceph_go_cache,target=/go,type=volume",
+ "source=test_ceph_a_data,target=/ceph_a,type=volume",
+ "source=test_ceph_b_data,target=/ceph_b,type=volume",
+ ],
+
+ // Uncomment to enable testing ceph nodes
+ // "initializeCommand": [
+ // "bash", "-c", "eval $*", "--",
+ // "docker kill test_ceph_a test_ceph_b 2>/dev/null ;",
+ // "docker run --rm -d --name test_ceph_a --hostname test_ceph_a",
+ // " --net test_ceph_net -v test_ceph_a_data:/tmp/ceph go-ceph-ci:octopus --test-run=NONE --pause ;",
+ // "docker run --rm -d --name test_ceph_b --hostname test_ceph_b",
+ // " --net test_ceph_net -v test_ceph_b_data:/tmp/ceph go-ceph-ci:octopus --test-run=NONE --pause ;",
+ // ],
+ // "postCreateCommand": "/entrypoint.sh --wait-for=/ceph_a/.ready:/ceph_b/.ready --ceph-conf=/ceph_a/ceph.conf --mirror=/ceph_b/ceph.conf --test-pkg none"
+
// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}
