From 58470bfb01e76056435ae527e0947ab2d43b4723 Mon Sep 17 00:00:00 2001 From: Sandeep Nishad Date: Mon, 5 Aug 2024 16:22:47 +0530 Subject: [PATCH] chore: upgrade docker compose to v2 Signed-off-by: Sandeep Nishad --- core/drivers/corda-driver/README.md | 2 +- core/drivers/corda-driver/makefile | 4 ++-- core/drivers/fabric-driver/makefile | 4 ++-- core/drivers/fabric-driver/readme.md | 6 +++--- core/identity-management/iin-agent/makefile | 4 ++-- core/relay/Makefile | 8 ++++---- core/relay/relay-docker.md | 8 ++++---- .../enabling-weaver-network/corda.md | 6 +++--- .../enabling-weaver-network/fabric.md | 12 ++++++------ .../test-network/setup-local-docker.md | 2 +- .../test-network/setup-local.md | 2 +- .../test-network/setup-packages-docker.md | 2 +- .../test-network/setup-packages.md | 2 +- samples/fabric/fabric-cli/readme.md | 2 +- tests/network-setups/corda/README.md | 2 +- tests/network-setups/corda/makefile | 4 ++-- .../corda/scripts/clean-restart.sh | 2 +- .../corda/scripts/start-nodes.sh | 2 +- tests/network-setups/fabric/dev/network.sh | 18 +++++++++--------- .../indy/docker/start_testiin.sh | 2 +- .../network-setups/indy/docker/stop_testiin.sh | 2 +- 21 files changed, 48 insertions(+), 48 deletions(-) diff --git a/core/drivers/corda-driver/README.md b/core/drivers/corda-driver/README.md index 37a9ead00..ab2d1beb2 100644 --- a/core/drivers/corda-driver/README.md +++ b/core/drivers/corda-driver/README.md @@ -133,7 +133,7 @@ To push image to github container registry: * Create a Personal Access Token with read packages access in github. Refer [Creating a Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) for help. * Run `docker login ghcr.io` and use your github username and personal access token as password. * Run: `make deploy`. -* To stop, run: `docker-compose down` +* To stop, run: `docker compose down` ## Documentation diff --git a/core/drivers/corda-driver/makefile b/core/drivers/corda-driver/makefile index 8206d870c..c995bf561 100644 --- a/core/drivers/corda-driver/makefile +++ b/core/drivers/corda-driver/makefile @@ -52,11 +52,11 @@ run: .PHONY: deploy deploy: - docker-compose $(COMPOSE_ARG) up -d + docker compose $(COMPOSE_ARG) up -d .PHONY: stop stop: - docker-compose $(COMPOSE_ARG) down + docker compose $(COMPOSE_ARG) down .PHONY: clean clean: diff --git a/core/drivers/fabric-driver/makefile b/core/drivers/fabric-driver/makefile index adb6e8a66..142fd2773 100644 --- a/core/drivers/fabric-driver/makefile +++ b/core/drivers/fabric-driver/makefile @@ -61,10 +61,10 @@ push-image-latest: deploy: mkdir -p wallet-$(NETWORK_NAME) && chmod 777 wallet-$(NETWORK_NAME) - docker-compose $(COMPOSE_ARG) up -d + docker compose $(COMPOSE_ARG) up -d stop: - docker-compose $(COMPOSE_ARG) down + docker compose $(COMPOSE_ARG) down re-deploy: stop deploy diff --git a/core/drivers/fabric-driver/readme.md b/core/drivers/fabric-driver/readme.md index a2b29d9bf..c09462897 100644 --- a/core/drivers/fabric-driver/readme.md +++ b/core/drivers/fabric-driver/readme.md @@ -55,7 +55,7 @@ Note: Can also be run in mocked mode by setting environment variable `MOCK=true` Make sure the env and config file have the expected values. -Update the docker-compose with the correct external network and ports exposed +Update the docker compose with the correct external network and ports exposed To do a full build run `make build-image`. This update/clones protos, generates js protos and compiles typescript. @@ -67,8 +67,8 @@ To deploy, run `make deploy` * Run `docker login ghcr.io` and use your github username and personal access token as password. * Copy `.env.docker.template` to `.env` and make changes appropriately (like correcting the base path of repo, changing network name if required etc, check image details here: [weaver-fabric-driver](https://github.com/hyperledger-labs/weaver-dlt-interoperability/pkgs/container/weaver-fabric-driver)). * Make sure connection profile used for docker, containers correct hostnames instead of localhost in urls. -* If deploying more than one driver on same host, make sure to change service name in docker-compose to avoid conflicts. -* Finally run `docker-compose up -d` to deploy the fabric driver. +* If deploying more than one driver on same host, make sure to change service name in docker compose to avoid conflicts. +* Finally run `docker compose up -d` to deploy the fabric driver. ### TL/MP Environment diff --git a/core/identity-management/iin-agent/makefile b/core/identity-management/iin-agent/makefile index f63ed90d7..085d388b3 100644 --- a/core/identity-management/iin-agent/makefile +++ b/core/identity-management/iin-agent/makefile @@ -63,10 +63,10 @@ push-image-latest: deploy: chmod 777 $(DLT_SPECIFIC_DIR) docker network create iin || true - docker-compose $(COMPOSE_ARG) up -d + docker compose $(COMPOSE_ARG) up -d stop: - docker-compose $(COMPOSE_ARG) down + docker compose $(COMPOSE_ARG) down re-deploy: stop deploy diff --git a/core/relay/Makefile b/core/relay/Makefile index 6b5586a14..6a0ce3627 100644 --- a/core/relay/Makefile +++ b/core/relay/Makefile @@ -155,17 +155,17 @@ pushi-images: push-server push-client push-driver push-allinone .PHONY: start start: docker network create relay || true - docker-compose $(COMPOSE_ARG) up -d + docker compose $(COMPOSE_ARG) up -d # Starts an instance of the relay container. # .PHONY: start-server start-server: docker network create relay || true - docker-compose $(COMPOSE_ARG) up -d relay-server + docker compose $(COMPOSE_ARG) up -d relay-server .PHONY: stop stop: - docker-compose $(COMPOSE_ARG) down + docker compose $(COMPOSE_ARG) down .PHONY: convert-compose-method1 convert-compose-method1: @@ -182,7 +182,7 @@ clean: @echo -e "\033[1mCLEAN\033[0m - Removing all artifacts..." -rm -rf protos-rs -rm fingerprint.json - -docker-compose down + -docker compose down -docker rmi $(DOCKER_REGISTRY)/$(DOCKER_IMAGE_SERVER) -docker rmi $(DOCKER_IMAGE_SERVER) -docker rmi $(DOCKER_REGISTRY)/$(DOCKER_IMAGE_CLIENT) diff --git a/core/relay/relay-docker.md b/core/relay/relay-docker.md index c09c90563..974cea8be 100644 --- a/core/relay/relay-docker.md +++ b/core/relay/relay-docker.md @@ -149,7 +149,7 @@ First **login** to github container registry: * Create a Personal Access Token with read packages access in github. Refer [Creating a Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) for help. * Run `docker login ghcr.io` and use your github username and personal access token as password. -**Some sample steps to deploy relay using docker-compose when Config File is available:** +**Some sample steps to deploy relay using docker compose when Config File is available:** * Copy `.env.template` file to `.env`. * Keep following Environment Variables in `.env` and delete/ignore rest: @@ -162,10 +162,10 @@ First **login** to github container registry: * Tip: If running all relays on same host, make sure to change service name before each relay deployment, to avoid conflict in names. * Run `make convert-compose-method1`. * Create docker network named `relay`: `docker network create relay`. -* To deploy relay, run: `docker-compose up relay-server -d` (Given relay-server is the service name in docker-compose). +* To deploy relay, run: `docker compose up relay-server -d` (Given relay-server is the service name in docker-compose). * Also `make start-server` does the above 2 steps, if service name is not changed. -**Some sample steps to deploy relay using docker-compose when Config is not available:** +**Some sample steps to deploy relay using docker compose when Config is not available:** * Copy `.env.template.2` file to `.env`. * Configure the following environment variables in `.env` and delete (or ignore) the rest: @@ -197,7 +197,7 @@ First **login** to github container registry: * Run `make convert-compose-method2`. * Tip: If running all relays on same host, make sure to change service name before each relay deployment, to avoid conflict in names. * Create docker network named `relay`: `docker network create relay`. -* To deploy relay, run: `docker-compose up relay-server -d` (Given relay-server is the service name in docker-compose). +* To deploy relay, run: `docker compose up relay-server -d` (Given relay-server is the service name in docker-compose). * Also `make start-server` does the above 2 steps, if service name is not changed. ## Push Relay image to Github container registry diff --git a/docs/docs/external/getting-started/enabling-weaver-network/corda.md b/docs/docs/external/getting-started/enabling-weaver-network/corda.md index 13f75c9ec..08186e796 100644 --- a/docs/docs/external/getting-started/enabling-weaver-network/corda.md +++ b/docs/docs/external/getting-started/enabling-weaver-network/corda.md @@ -512,7 +512,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger-labs/weaver-d To start the relay server, navigate to the folder containing the above files and run the following: ```bash -docker-compose up -d relay-server +docker compose up -d relay-server ``` #### Launch Driver @@ -545,13 +545,13 @@ Weaver provides a [pre-built image](https://github.com/hyperledger-labs/weaver-d - **Enabling TLS**: - You can make your driver accept TLS connections by specifying `DRIVER_TLS` as `true` and specifying a TLS certificate file path and private key file path in `DRIVER_TLS_CERT_PATH` and `DRIVER_TLS_KEY_PATH` respectively. The same certificate should be specified in this driver's definition in the `drivers` section in the `config.toml` file of your relay in the `tlsca_cert_path` property (see the earlier section on relay configuration). - To communicate with your network' relay using TLS (i.e., if the relay is TLS-enabled), specify that relay's TLS CA certificate path in `RELAY_TLSCA_CERT_PATH` (currently only one certificate can be configured) and set `RELAY_TLS` to `true`. This CA certificate should match the one specified in the `cert_path` property in the relay's `config.toml` file (see the earlier section on relay configuration): - - You can point to the folder in your host system containing the certificate and key using the `TLS_CREDENTIALS_DIR` variable. (This folder will be synced to the `/corda-driver/credentials` folder in the Fabric Driver container as specified in the [docker-compose file](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/drivers/fabric-driver/docker-compose.yml).) Make sure you point to the right certificate and key file paths within the container using the `DRIVER_TLS_CERT_PATH`, `DRIVER_TLS_KEY_PATH`, and `RELAY_TLSCA_CERT_PATH` variables. + - You can point to the folder in your host system containing the certificate and key using the `TLS_CREDENTIALS_DIR` variable. (This folder will be synced to the `/corda-driver/credentials` folder in the Fabric Driver container as specified in the [docker compose file](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/drivers/fabric-driver/docker-compose.yml).) Make sure you point to the right certificate and key file paths within the container using the `DRIVER_TLS_CERT_PATH`, `DRIVER_TLS_KEY_PATH`, and `RELAY_TLSCA_CERT_PATH` variables. - `docker-compose.yaml`: This specifies the properties of the driver container. You can use the [file in the repository](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/drivers/corda-driver/docker-compose.yml) verbatim. To start the driver, navigate to the folder containing the above files and run the following: ```bash -docker-compose up -d +docker compose up -d ``` #### Vault Initialization diff --git a/docs/docs/external/getting-started/enabling-weaver-network/fabric.md b/docs/docs/external/getting-started/enabling-weaver-network/fabric.md index e6de1b953..82f7ebc7b 100644 --- a/docs/docs/external/getting-started/enabling-weaver-network/fabric.md +++ b/docs/docs/external/getting-started/enabling-weaver-network/fabric.md @@ -603,7 +603,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger-labs/weaver-d To start the relay server, navigate to the folder containing the above files and run the following: ```bash -docker-compose up -d relay-server +docker compose up -d relay-server ``` #### Launch Driver @@ -639,7 +639,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger-labs/weaver-d - **Enabling TLS**: - You can make your driver accept TLS connections by specifying `DRIVER_TLS` as `true` and specifying a TLS certificate file path and private key file path in `DRIVER_TLS_CERT_PATH` and `DRIVER_TLS_KEY_PATH` respectively. The same certificate should be specified in this driver's definition in the `drivers` section in the `config.toml` file of your relay in the `tlsca_cert_path` property (see the earlier section on relay configuration). - To communicate with your network' relay using TLS (i.e., if the relay is TLS-enabled), specify that relay's TLS CA certificate path in `RELAY_TLSCA_CERT_PATH` (currently only one certificate can be configured) and set `RELAY_TLS` to `true`. This CA certificate should match the one specified in the `cert_path` property in the relay's `config.toml` file (see the earlier section on relay configuration): - - You can point to the folder in your host system containing the certificate and key using the `TLS_CREDENTIALS_DIR` variable. (This folder will be synced to the `/fabric-driver/credentials` folder in the Fabric Driver container as specified in the [docker-compose file](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/drivers/fabric-driver/docker-compose.yml).) Make sure you point to the right certificate and key file paths within the container using the `DRIVER_TLS_CERT_PATH`, `DRIVER_TLS_KEY_PATH`, and `RELAY_TLSCA_CERT_PATH` variables. + - You can point to the folder in your host system containing the certificate and key using the `TLS_CREDENTIALS_DIR` variable. (This folder will be synced to the `/fabric-driver/credentials` folder in the Fabric Driver container as specified in the [docker compose file](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/drivers/fabric-driver/docker-compose.yml).) Make sure you point to the right certificate and key file paths within the container using the `DRIVER_TLS_CERT_PATH`, `DRIVER_TLS_KEY_PATH`, and `RELAY_TLSCA_CERT_PATH` variables. - `config.json`: This contains settings used to connect to a CA of a Fabric network organization and enroll a client. A sample is given below: ```json @@ -661,7 +661,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger-labs/weaver-d - As in the `.env` configuration, you should pick an organization for the driver to associate with. The `admin` section specifies the registrar name and password (this should be familiar to any Fabric network administrator) used to enroll clients. Default values of `admin` and `adminpw` are specified above as examples, which you should replace with the right values configured in your network organization's CA. - `` should be what's specified in your organization's Fabric CA server configuration. The default is `org1.department1`, but you should look up the appropriate value from the CA server's configuration file. - `` should be set to the (or an) MSP ID of the selected organization. - - `` should be set to the CA server's endpoint. If you launched your CA server as a container from a docker-compose file, this should be set to the container's service name. + - `` should be set to the CA server's endpoint. If you launched your CA server as a container from a docker compose file, this should be set to the container's service name. | Notes | |:------| @@ -671,7 +671,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger-labs/weaver-d To start the driver, navigate to the folder containing the above files and run the following: ```bash -docker-compose up -d +docker compose up -d ``` #### Launch IIN Agents @@ -778,13 +778,13 @@ Weaver provides a [pre-built image](https://github.com/hyperledger-labs/weaver-d - `EXTERNAL_NETWORK`: Set to the network [name](https://docs.docker.com/compose/networking/) of your Fabric network. - **Enabling TLS**: - Make your IIN Agent accept TLS connections by specifying `IIN_AGENT_TLS` as `true` and specifying a TLS certificate file path and private key file path in `IIN_AGENT_TLS_CERT_PATH` and `IIN_AGENT_TLS_KEY_PATH` respectively. The same certificate should be specified in this agent's JSON object in another agent's `dnsconfig.json` file under the appropriate security domain and IIN Agent ID scope. - - You can point to the folder in your host system containing the certificate and key using the `TLS_CREDENTIALS_DIR` variable. (This folder will be synced to the `/opt/iinagent/credentials` folder in the IIN Agent container as specified in the [docker-compose file](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/identity-management/iin-agent/docker-compose.yml).) Make sure you point to the right certificate and key file paths within the container using the `IIN_AGENT_TLS_CERT_PATH` and `IIN_AGENT_TLS_KEY_PATH` variables respectively. + - You can point to the folder in your host system containing the certificate and key using the `TLS_CREDENTIALS_DIR` variable. (This folder will be synced to the `/opt/iinagent/credentials` folder in the IIN Agent container as specified in the [docker compose file](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/identity-management/iin-agent/docker-compose.yml).) Make sure you point to the right certificate and key file paths within the container using the `IIN_AGENT_TLS_CERT_PATH` and `IIN_AGENT_TLS_KEY_PATH` variables respectively. - `docker-compose.yaml`: This specifies the properties of the IIN agent container. You can use the [file in the repository](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/identity-management/iin-agent/docker-compose.yml) verbatim. Now to start the IIN agent, navigate to the folder containing the above files and run the following: ```bash -docker-compose up -d +docker compose up -d ``` Repeat the above steps to launch an IIN Agent for every other organization on your channnel, i.e., create similar configuration files in an organization-specific folder. Make sure you: diff --git a/docs/docs/external/getting-started/test-network/setup-local-docker.md b/docs/docs/external/getting-started/test-network/setup-local-docker.md index 54cd3a4dc..533de1ee0 100644 --- a/docs/docs/external/getting-started/test-network/setup-local-docker.md +++ b/docs/docs/external/getting-started/test-network/setup-local-docker.md @@ -26,7 +26,7 @@ Before starting, make sure you have the following software installed on your hos - Curl: _install using package manager, like `apt` on Debian/Ubuntu Linux_ - Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version) -- Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 1.28.2 or higher, but lower than version V2) +- Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 2 or higher) - Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher) - Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8) - Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 16 Supported) diff --git a/docs/docs/external/getting-started/test-network/setup-local.md b/docs/docs/external/getting-started/test-network/setup-local.md index 7dd6a1484..d996bc8ab 100644 --- a/docs/docs/external/getting-started/test-network/setup-local.md +++ b/docs/docs/external/getting-started/test-network/setup-local.md @@ -27,7 +27,7 @@ Before starting, make sure you have the following software installed on your hos - Curl: _install using package manager, like `apt` on Debian/Ubuntu Linux_ - Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version) -- Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 1.28.2 or higher, but lower than version V2) +- Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 2 or higher) - Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher) - Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8) - Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 16 Supported) diff --git a/docs/docs/external/getting-started/test-network/setup-packages-docker.md b/docs/docs/external/getting-started/test-network/setup-packages-docker.md index 4b9a39e94..cf3c6460d 100644 --- a/docs/docs/external/getting-started/test-network/setup-packages-docker.md +++ b/docs/docs/external/getting-started/test-network/setup-packages-docker.md @@ -26,7 +26,7 @@ Before starting, make sure you have the following software installed on your hos - Curl: _install using package manager, like `apt` on Debian/Ubuntu Linux_ - Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version) -- Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 1.28.2 or higher, but lower than version V2) +- Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 2 or higher) - Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher) - Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8) - Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 11 to Version 16 Supported) diff --git a/docs/docs/external/getting-started/test-network/setup-packages.md b/docs/docs/external/getting-started/test-network/setup-packages.md index 5effa4645..26855900d 100644 --- a/docs/docs/external/getting-started/test-network/setup-packages.md +++ b/docs/docs/external/getting-started/test-network/setup-packages.md @@ -26,7 +26,7 @@ Before starting, make sure you have the following software installed on your hos - Curl: _install using package manager, like `apt` on Debian/Ubuntu Linux_ - Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version) -- Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 1.28.2 or higher, but lower than version V2) +- Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 2 or higher) - Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher) - Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8) - Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 16 Supported) diff --git a/samples/fabric/fabric-cli/readme.md b/samples/fabric/fabric-cli/readme.md index 5a3d7340e..e06b839e6 100644 --- a/samples/fabric/fabric-cli/readme.md +++ b/samples/fabric/fabric-cli/readme.md @@ -86,7 +86,7 @@ Set up `.npmrc` by copying across the `.npmrc.template` and updating the values Run `make build-image` to build fabric-cli docker image. -Then run `docker-compose up -d` to start fabric-cli container. +Then run `docker compose up -d` to start fabric-cli container. Then run `docker exec -it fabric-cli bash`, to open interactive shell for fabric-cli, where regular fabric-cli calls can be made. diff --git a/tests/network-setups/corda/README.md b/tests/network-setups/corda/README.md index cf2c5fffe..a51db8c8c 100644 --- a/tests/network-setups/corda/README.md +++ b/tests/network-setups/corda/README.md @@ -131,7 +131,7 @@ Start the nodes with: This script copies the interoperation and simple state CorDapps from `artifacts` into the CorDapp folder of the nodes. It then uses -docker-compose to start the Corda nodes in containers. +docker compose to start the Corda nodes in containers. ## Restarting the nodes after changing the interop workflows cordapp diff --git a/tests/network-setups/corda/makefile b/tests/network-setups/corda/makefile index edfe9902c..4555bae7a 100644 --- a/tests/network-setups/corda/makefile +++ b/tests/network-setups/corda/makefile @@ -63,11 +63,11 @@ restart-with-new-interop-app: stop .PHONY: stop-network1 stop-network1: - docker-compose -f dev/Corda_Network/docker-compose.yml -p corda --profile $(PROFILE) down --volumes || true + docker compose -f dev/Corda_Network/docker-compose.yml -p corda --profile $(PROFILE) down --volumes || true .PHONY: stop-network2 stop-network2: - docker-compose -f dev/Corda_Network2/docker-compose.yml -p corda_network2 --profile $(PROFILE) down --volumes || true + docker compose -f dev/Corda_Network2/docker-compose.yml -p corda_network2 --profile $(PROFILE) down --volumes || true stop: stop-network1 stop-network2 diff --git a/tests/network-setups/corda/scripts/clean-restart.sh b/tests/network-setups/corda/scripts/clean-restart.sh index d5a896b11..ee0feae03 100755 --- a/tests/network-setups/corda/scripts/clean-restart.sh +++ b/tests/network-setups/corda/scripts/clean-restart.sh @@ -1,6 +1,6 @@ #!/bin/bash -docker-compose down +docker compose down ./gradlew clean diff --git a/tests/network-setups/corda/scripts/start-nodes.sh b/tests/network-setups/corda/scripts/start-nodes.sh index 0cf4a5031..750dedf56 100755 --- a/tests/network-setups/corda/scripts/start-nodes.sh +++ b/tests/network-setups/corda/scripts/start-nodes.sh @@ -41,6 +41,6 @@ if [ "Corda_Network2" = "$nw" ]; then dockerProject="corda_network2" fi -docker-compose -f dev/${nw}/docker-compose.yml -p $dockerProject --profile $profile up -d +docker compose -f dev/${nw}/docker-compose.yml -p $dockerProject --profile $profile up -d docker ps -a #docker logs corda_partya_1 -f diff --git a/tests/network-setups/fabric/dev/network.sh b/tests/network-setups/fabric/dev/network.sh index b9c145a27..8ffd7b148 100755 --- a/tests/network-setups/fabric/dev/network.sh +++ b/tests/network-setups/fabric/dev/network.sh @@ -27,7 +27,7 @@ function printHelp() { echo " - 'up createChannel' - bring up fabric network with one channel" echo " - 'createChannel' - create and join a channel after the network is created" echo " - 'deployCC' - deploy the fabcar chaincode on the channel" - echo " - 'down' - clear the network with docker-compose down" + echo " - 'down' - clear the network with docker compose down" echo " - 'clean' - clean the network" echo echo " Flags:" @@ -253,7 +253,7 @@ function createOrgs() { envsubst < docker/docker-compose-ca.yaml > docker/docker-compose-ca.real.yaml COMPOSE_FILE_CA=docker/docker-compose-ca.real.yaml - IMAGE_TAG=$IMAGETAG docker-compose -f $COMPOSE_FILE_CA --env-file=docker.real.env --profile $DOCKER_PROFILES up -d 2>&1 + IMAGE_TAG=$IMAGETAG docker compose -f $COMPOSE_FILE_CA --env-file=docker.real.env --profile $DOCKER_PROFILES up -d 2>&1 . $NW_CFG_PATH/fabric-ca/registerEnroll.sh @@ -359,7 +359,7 @@ function networkUp() { envsubst < docker.env > docker.real.env envsubst < docker/docker-compose-ca.yaml > docker/docker-compose-ca.real.yaml COMPOSE_FILE_CA=docker/docker-compose-ca.real.yaml - IMAGE_TAG=$IMAGETAG docker-compose -f $COMPOSE_FILE_CA --env-file=docker.real.env --profile $DOCKER_PROFILES up -d 2>&1 + IMAGE_TAG=$IMAGETAG docker compose -f $COMPOSE_FILE_CA --env-file=docker.real.env --profile $DOCKER_PROFILES up -d 2>&1 fi envsubst < docker/docker-compose-test-net.yaml > docker/docker-compose-test-net.real.yaml @@ -375,7 +375,7 @@ function networkUp() { echo "NW config path.. : "$NW_CFG_PATH cat docker.env envsubst < docker.env > docker.real.env - IMAGE_TAG=$IMAGETAG NW_CFG_PATH=$NW_CFG_PATH docker-compose ${COMPOSE_FILES} --env-file=docker.real.env --profile $DOCKER_PROFILES up -d 2>&1 + IMAGE_TAG=$IMAGETAG NW_CFG_PATH=$NW_CFG_PATH docker compose ${COMPOSE_FILES} --env-file=docker.real.env --profile $DOCKER_PROFILES up -d 2>&1 docker ps -a if [ $? -ne 0 ]; then @@ -426,9 +426,9 @@ function networkDown() { cat docker.env envsubst < docker.env > docker.real.env - APP_ROOT=$APP_ROOT docker-compose -f $COMPOSE_FILE_BASE -f $COMPOSE_FILE_COUCH -f $COMPOSE_FILE_CA --env-file=docker.real.env --profile $DOCKER_PROFILES down --volumes --remove-orphans - #docker-compose -f $COMPOSE_FILE_BASE -f $COMPOSE_FILE_COUCH -f $COMPOSE_FILE_CA --env-file=docker.env down --volumes --remove-orphans - # docker-compose -f $COMPOSE_FILE_COUCH_ORG3 -f $COMPOSE_FILE_ORG3 down --volumes --remove-orphans + APP_ROOT=$APP_ROOT docker compose -f $COMPOSE_FILE_BASE -f $COMPOSE_FILE_COUCH -f $COMPOSE_FILE_CA --env-file=docker.real.env --profile $DOCKER_PROFILES down --volumes --remove-orphans + #docker compose -f $COMPOSE_FILE_BASE -f $COMPOSE_FILE_COUCH -f $COMPOSE_FILE_CA --env-file=docker.env down --volumes --remove-orphans + # docker compose -f $COMPOSE_FILE_COUCH_ORG3 -f $COMPOSE_FILE_ORG3 down --volumes --remove-orphans # Bring down the network, deleting the volumes #Cleanup the chaincode containers @@ -471,7 +471,7 @@ CLI_DELAY=3 CHANNEL_NAME="mychannel" # Deploy 1 org or 2 org: profiles DOCKER_PROFILES="1-node" -# use this as the default docker-compose yaml definition +# use this as the default docker compose yaml definition COMPOSE_FILE_BASE=docker/docker-compose-test-net.yaml # docker-compose.yaml file if you are using couchdb COMPOSE_FILE_COUCH=docker/docker-compose-couch.yaml @@ -479,7 +479,7 @@ COMPOSE_FILE_COUCH=docker/docker-compose-couch.yaml COMPOSE_FILE_CA=docker/docker-compose-ca.yaml # use this as the docker compose couch file for org3 #COMPOSE_FILE_COUCH_ORG3=addOrg3/docker/docker-compose-couch-org3.yaml -# use this as the default docker-compose yaml definition for org3 +# use this as the default docker compose yaml definition for org3 #COMPOSE_FILE_ORG3=addOrg3/docker/docker-compose-org3.yaml # # use golang as the default language for chaincode diff --git a/tests/network-setups/indy/docker/start_testiin.sh b/tests/network-setups/indy/docker/start_testiin.sh index 8b8f4ecb0..ef7dedeed 100755 --- a/tests/network-setups/indy/docker/start_testiin.sh +++ b/tests/network-setups/indy/docker/start_testiin.sh @@ -9,4 +9,4 @@ INDY_NODE_PORT_RANGE=$STARTPORT-$ENDPORT echo Starting test iin network. echo NOTE: To change number of nodes and clients please set the environment variables INDYNODES and INDYCLIENTS. -INDYNODES=$INDYNODES INDYCLIENTS=$INDYCLIENTS INDY_NODE_PORT_RANGE=$INDY_NODE_PORT_RANGE docker-compose up -d +INDYNODES=$INDYNODES INDYCLIENTS=$INDYCLIENTS INDY_NODE_PORT_RANGE=$INDY_NODE_PORT_RANGE docker compose up -d diff --git a/tests/network-setups/indy/docker/stop_testiin.sh b/tests/network-setups/indy/docker/stop_testiin.sh index 4b0c58a5c..af5701632 100755 --- a/tests/network-setups/indy/docker/stop_testiin.sh +++ b/tests/network-setups/indy/docker/stop_testiin.sh @@ -6,4 +6,4 @@ ENDPORT=$((($INDYNODES * 2) + $STARTPORT)) INDY_NODE_PORT_RANGE=$STARTPORT-$ENDPORT -INDYNODES=$INDYNODES INDYCLIENTS=$INDYCLIENTS INDY_NODE_PORT_RANGE=$INDY_NODE_PORT_RANGE docker-compose down +INDYNODES=$INDYNODES INDYCLIENTS=$INDYCLIENTS INDY_NODE_PORT_RANGE=$INDY_NODE_PORT_RANGE docker compose down