You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ya...@apache.org on 2025/04/23 17:32:00 UTC
(airavata) 03/24: create devcontainer.json and integrate with docker-compose file. fix bugs.
This is an automated email from the ASF dual-hosted git repository.
yasith pushed a commit to branch cybershuttle-dev
in repository https://gitbox.apache.org/repos/asf/airavata.git
commit 33402f2a6c67b040c342de80f553946d8779d13f
Author: yasith <ya...@gatech.edu>
AuthorDate: Fri Mar 14 12:43:51 2025 +0000
create devcontainer.json and integrate with docker-compose file. fix bugs.
---
.devcontainer/devcontainer.json | 53 ++++++++++++++++++++++
.gitignore | 1 +
.../{src/main/containers => }/.gitignore | 0
modules/ide-integration/README.md | 2 +-
modules/ide-integration/pom.xml | 2 +-
.../src/main/containers/docker-compose.yml | 33 ++++++++++++--
6 files changed, 86 insertions(+), 5 deletions(-)
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 0000000000..809b5b89db
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,53 @@
+// For format details, see https://aka.ms/devcontainer.json. For config options, see the
+// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
+{
+ "name": "Ubuntu",
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
+ "dockerComposeFile": "../modules/ide-integration/src/main/containers/docker-compose.yml",
+ "service": "devcontainer",
+ "workspaceFolder": "/workspace",
+ // Features to add to the dev container. More info: https://containers.dev/features.
+ "features": {
+ "ghcr.io/roul/devcontainer-features/mise": {},
+ "ghcr.io/roul/devcontainer-features/mise-java": {
+ "version": "openjdk-17"
+ },
+ "ghcr.io/roul/devcontainer-features/mise-python": {
+ "version": "3.10"
+ },
+ "ghcr.io/roul/devcontainer-features/mise-golang": {
+ "version": "1.23"
+ }
+ },
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
+ "forwardPorts": [
+ 18080,
+ 8443,
+ 13306,
+ 5672,
+ 15672,
+ 12181,
+ 9092,
+ 22222
+ ],
+ // Use 'postCreateCommand' to run commands after the container is created.
+ "postCreateCommand": "mise install -y maven@3.9.9 && mise use -g maven@3.9.9 && echo 'export PATH=$PATH:~/.local/share/mise/installs/maven/3.9.9/bin' >> ~/.bashrc",
+ // Configure tool-specific properties.
+ "customizations": {
+ "vscode": {
+ "extensions": [
+ "golang.go",
+ "lkrms.inifmt",
+ "ms-python.python",
+ "ms-python.autopep8",
+ "ms-python.isort",
+ "ms-toolsai.jupyter",
+ "njpwerner.autodocstring",
+ "vscjava.vscode-java-pack",
+ ]
+ }
+ }
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
+ // "remoteUser": "root"
+
+}
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 6e7f390882..577f89a330 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,6 +32,7 @@ com_crashlytics_export_strings.xml
.DS_Store
.project
.vscode
+!.vscode/launch.json
.settings
.classpath
.factorypath
diff --git a/modules/ide-integration/src/main/containers/.gitignore b/modules/ide-integration/.gitignore
similarity index 100%
rename from modules/ide-integration/src/main/containers/.gitignore
rename to modules/ide-integration/.gitignore
diff --git a/modules/ide-integration/README.md b/modules/ide-integration/README.md
index a28383beb6..e31cd62d2f 100644
--- a/modules/ide-integration/README.md
+++ b/modules/ide-integration/README.md
@@ -189,7 +189,7 @@ https://myaccount.google.com/security
### NOTE: (Optional) Creating certificates if expired
* This is required only when the self signed certificate for keycloak is expired
- * Go to airavata/keystores
+ * Go to <PROJECT_ROOT>/keystores
* Provide password as airavata for all key stores
```sh
diff --git a/modules/ide-integration/pom.xml b/modules/ide-integration/pom.xml
index f92e0a479e..0903119c56 100644
--- a/modules/ide-integration/pom.xml
+++ b/modules/ide-integration/pom.xml
@@ -84,7 +84,7 @@
</excludes>
</resource>
<resource>
- <directory>../../keystore</directory>
+ <directory>../../keystores</directory>
<includes>
<include>*.jks</include>
<include>*.p12</include>
diff --git a/modules/ide-integration/src/main/containers/docker-compose.yml b/modules/ide-integration/src/main/containers/docker-compose.yml
index 7d92fd32c3..0fee0f7199 100644
--- a/modules/ide-integration/src/main/containers/docker-compose.yml
+++ b/modules/ide-integration/src/main/containers/docker-compose.yml
@@ -1,6 +1,19 @@
+networks:
+ airavata-network:
+ driver: bridge
+ name: airavata.host
+
services:
+ devcontainer:
+ image: mcr.microsoft.com/devcontainers/base:debian
+ volumes:
+ - ./../../../../..:/workspace:cached
+ command: sleep infinity
+ networks:
+ - airavata-network
keycloak:
image: keycloak/keycloak:24.0
+ restart: always
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
@@ -9,13 +22,16 @@ services:
- "8443:8443"
volumes:
- ./keycloak/realm-default.json:/opt/keycloak/data/import/realm-default.json
- - ../resources/keystores/airavata.jks:/opt/keycloak/conf/keystores/airavata.jks
- ./keycloak/keycloak.conf:/opt/keycloak/conf/keycloak.conf
- command: ["start-dev", "--import-realm"]
+ - ../../../../../keystores/airavata.jks:/opt/keycloak/conf/keystores/airavata.jks
+ command: [ "start-dev", "--import-realm" ]
depends_on:
- db
+ networks:
+ - airavata-network
db:
image: mariadb:10.4.13
+ restart: always
environment:
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_USER=airavata
@@ -26,8 +42,11 @@ services:
ports:
- "13306:3306"
command: [ 'mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci', '--sql_mode=' ]
+ networks:
+ - airavata-network
rabbitmq:
image: rabbitmq:3.12-management
+ restart: always
environment:
- RABBITMQ_DEFAULT_VHOST=develop
ports:
@@ -35,14 +54,19 @@ services:
- "15672:15672"
depends_on:
- db
+ networks:
+ - airavata-network
zookeeper:
image: zookeeper
restart: always
hostname: zk
ports:
- "12181:2181"
+ networks:
+ - airavata-network
kafka:
image: wurstmeister/kafka:latest
+ restart: always
hostname: kafka
ports:
- "9092:9092"
@@ -51,8 +75,11 @@ services:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
depends_on:
- zookeeper
+ networks:
+ - airavata-network
sshd:
image: dimuthuupe/sshd:1.0
+ restart: always
volumes:
- /tmp:/tmp
ports:
@@ -60,4 +87,4 @@ services:
volumes:
database_data:
- driver: local
\ No newline at end of file
+ driver: local