diff --git a/Makefile b/Makefile index fe55f00b..9760d98b 100644 --- a/Makefile +++ b/Makefile @@ -23,12 +23,43 @@ thrift_py: ## Builds python code from thrift file dev-build: ## Build and Start the docker-compose.dev.yml docker-compose -f docker-compose.dev.yml up --build +dev-d: ## Build and Start the docker-compose.dev.yml + docker-compose -f docker-compose.dev.yml up -d + +dev-build-d: ## Build and Start the docker-compose.dev.yml + docker-compose -f docker-compose.dev.yml up --build -d + dev: ## Build and Start the docker-compose.dev.yml - docker-compose -f docker-compose.dev.yml up + docker-compose -f docker-compose.dev.yml up + +dev-build-bibigrid: ## Build and Start the docker-compose.dev.yml with bibigrid + docker-compose -f docker-compose.dev.bibigrid.yml up --build + +dev-bibigrid: ## Build and Start the docker-compose.dev.yml with bibigrid + docker-compose -f docker-compose.dev.bibigrid.yml up + +dev-build-bibigrid-d: ## Build and Start the docker-compose.dev.yml with bibigrid + docker-compose -f docker-compose.dev.bibigrid.yml up --build -d + +dev-bibigrid-d: ## Build and Start the docker-compose.dev.yml with bibigrid + docker-compose -f docker-compose.dev.bibigrid.yml up -d production: ## Build Release from .env docker-compose -f docker-compose.yml up --build -d +production-bibigrid: ## Build Release from .env and with bibigrid + docker-compose -f docker-compose.bibigrid.yml up --build -d + +client_logs: ## Logs from Client + docker logs client_portal-client_1 + +bibigrid_logs: ## Logs from Bibigrid + docker logs client_bibigrid_1 + +enter_client_container: ## Enter Client container + docker exec -it client_portal-client_1 bash + + .PHONY: help lint docs thrift_py diff --git a/VirtualMachineService/config/config.yml b/VirtualMachineService/config/config.yml index af639637..68d7afe6 100644 --- a/VirtualMachineService/config/config.yml +++ b/VirtualMachineService/config/config.yml @@ -30,7 +30,7 @@ openstack_connection: bibigrid: # Url for Bibigrid API - bibigrid_url: https://172.21.0.1:8443/bibigrid/ + bibigrid_url: http://bibigrid:8080/bibigrid/ sub_network: portalexternalsubnetwork bibigrid_modes: - slurm diff --git a/docker-compose.bibigrid.yml b/docker-compose.bibigrid.yml new file mode 100644 index 00000000..d5d035e1 --- /dev/null +++ b/docker-compose.bibigrid.yml @@ -0,0 +1,74 @@ +version: '3.5' +services: + portal-client: + image: denbicloud/cloud-portal-client:${CLOUD_CLIENT_TAG} + ports: + - "9090:9090" + + env_file: + - .env + + environment: + - OS_AUTH_URL + - OS_PROJECT_ID + - OS_PROJECT_NAME + - OS_USERNAME + - OS_PASSWORD + - OS_USER_DOMAIN_NAME + - OS_PROJECT_DOMAIN_ID + - FORC_API_KEY + + volumes: + - ${client_PERSISTENT_PATH}/config.yml:/code/VirtualMachineService/config.yml + - ${client_PERSISTENT_PATH}/server.pem:/code/VirtualMachineService/keys/server.pem + - ./logs/client:/code/VirtualMachineService/log:rw + command: python3 VirtualMachineServer.py /code/VirtualMachineService/config.yml + networks: + - portal + + redis: + image: redis:5.0.5 + expose: + - "6379" + networks: + - portal + + bibigrid: + image: bibiserv/bibigrid:bibigrid_rest_http_enabled + environment: + - OS_AUTH_URL + - OS_PROJECT_ID + - OS_PROJECT_NAME + - OS_USERNAME + - OS_PASSWORD + - OS_USER_DOMAIN_NAME + - OS_PROJECT_DOMAIN_ID + expose: + - "8080" + networks: + - portal + + # filebeat + filebeat: + image: docker.elastic.co/beats/filebeat:${FILEBEAT_TAG} + environment: + - ELASTIC_USER + - ELASTIC_PASSWORD + volumes: + - ./filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml + - ./logs:/usr/share/filebeat/log:ro + - ./filebeat/data:/usr/share/filebeat/data:rw + command: [sh, -c, "chmod go-w /usr/share/filebeat/filebeat.yml && filebeat run -e"] + networks: + - portal + +networks: + portal: + name: portal_default + driver: bridge + driver_opts: + com.docker.network.driver.mtu: 1440 + default: + driver: bridge + driver_opts: + com.docker.network.driver.mtu: 1440 diff --git a/docker-compose.dev.bibigrid.yml b/docker-compose.dev.bibigrid.yml new file mode 100644 index 00000000..38e5df22 --- /dev/null +++ b/docker-compose.dev.bibigrid.yml @@ -0,0 +1,63 @@ +version: '3.5' +services: + portal-client: + build: + context: . + dockerfile: Dockerfile + ports: + - "9090:9090" + + env_file: + - .env + + environment: + - OS_AUTH_URL + - OS_PROJECT_ID + - OS_PROJECT_NAME + - OS_USERNAME + - OS_PASSWORD + - OS_USER_DOMAIN_NAME + - OS_PROJECT_DOMAIN_ID + - FORC_API_KEY + + volumes: + - ./VirtualMachineService/config/config.yml:/code/VirtualMachineService/config.yml + - ./VirtualMachineService/keys/localhost/server.pem:/code/VirtualMachineService/keys/server.pem + command: python3 VirtualMachineServer.py /code/VirtualMachineService/config.yml + networks: + - portal + + redis: + image: redis:5.0.5 + expose: + - "6379" + networks: + - portal + + bibigrid: + image: bibiserv/bibigrid:bibigrid_rest_http_enabled + environment: + - OS_AUTH_URL + - OS_PROJECT_ID + - OS_PROJECT_NAME + - OS_USERNAME + - OS_PASSWORD + - OS_USER_DOMAIN_NAME + - OS_PROJECT_DOMAIN_ID + expose: + - "8080" + networks: + - portal + + + +networks: + portal: + name: portal_default + driver: bridge + driver_opts: + com.docker.network.driver.mtu: 1440 + default: + driver: bridge + driver_opts: + com.docker.network.driver.mtu: 1440 diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 6dd4660d..f3bc2e42 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -34,6 +34,7 @@ services: networks: - portal + networks: portal: name: portal_default