From 83fbf919687ed5739006c26cb267f1547c3985c5 Mon Sep 17 00:00:00 2001 From: Jennifer Bell Date: Mon, 24 Jun 2024 14:09:41 +0000 Subject: [PATCH] chore(weaver): use docker compose v2 Primary change: Updates the weaver files to use docker compose v2 syntax. docker-compose v1 will be dropped on the github runners shortly. Signed-off-by: Jennifer Bell --- .../enabling-weaver-network/corda.md | 6 +++--- .../enabling-weaver-network/fabric.md | 12 ++++++------ weaver/core/drivers/corda-driver/README.md | 4 ++-- weaver/core/drivers/corda-driver/makefile | 4 ++-- weaver/core/drivers/fabric-driver/makefile | 4 ++-- weaver/core/drivers/fabric-driver/readme.md | 6 +++--- .../identity-management/iin-agent/makefile | 4 ++-- weaver/core/relay/Makefile | 8 ++++---- weaver/core/relay/relay-docker.md | 8 ++++---- .../enabling-weaver-network/corda.md | 6 +++--- .../enabling-weaver-network/fabric.md | 12 ++++++------ weaver/samples/fabric/fabric-cli/readme.md | 2 +- weaver/tests/network-setups/corda/README.md | 2 +- weaver/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 +- 19 files changed, 54 insertions(+), 54 deletions(-) diff --git a/docs/docs/weaver/getting-started/enabling-weaver-network/corda.md b/docs/docs/weaver/getting-started/enabling-weaver-network/corda.md index 41caa7afb57..108393ee6a1 100644 --- a/docs/docs/weaver/getting-started/enabling-weaver-network/corda.md +++ b/docs/docs/weaver/getting-started/enabling-weaver-network/corda.md @@ -519,7 +519,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger/cacti/pkgs/co 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 @@ -553,13 +553,13 @@ Weaver provides a [pre-built image](https://github.com/hyperledger/cacti/pkgs/co - **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/cacti/blob/main/weaver/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/cacti/blob/main/weaver/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/cacti/blob/main/weaver/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/weaver/getting-started/enabling-weaver-network/fabric.md b/docs/docs/weaver/getting-started/enabling-weaver-network/fabric.md index 81c0543f4b4..25bec14ba94 100644 --- a/docs/docs/weaver/getting-started/enabling-weaver-network/fabric.md +++ b/docs/docs/weaver/getting-started/enabling-weaver-network/fabric.md @@ -610,7 +610,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger/cacti/pkgs/co 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 @@ -647,7 +647,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger/cacti/pkgs/co - **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/cacti/blob/main/weaver/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/cacti/blob/main/weaver/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 @@ -669,7 +669,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger/cacti/pkgs/co - 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 | |:------| @@ -679,7 +679,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger/cacti/pkgs/co 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 @@ -790,13 +790,13 @@ Weaver provides a [pre-built image](https://github.com/hyperledger/cacti/pkgs/co - `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/cacti/blob/main/weaver/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/cacti/blob/main/weaver/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/cacti/blob/main/weaver/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/weaver/core/drivers/corda-driver/README.md b/weaver/core/drivers/corda-driver/README.md index 68d6313dc83..4438c895ba5 100644 --- a/weaver/core/drivers/corda-driver/README.md +++ b/weaver/core/drivers/corda-driver/README.md @@ -111,7 +111,7 @@ To push image to github container registry: **NOTE:** Push image to `hyperledger-labs` only after PR approval, first test it by deploying it on your fork by running (instead of last step above): `make push-image DOCKER_REGISTRY=ghcr.io/`, where replace `` with your git username. -### Docker-Compose Deployment +### Docker Compose Deployment * Copy `.env.docker.template` to `.env` - `NETWORK_NAME`: Used as suffix to driver-corda container name, i.e. `driver-corda-` will be the name of the container. @@ -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/weaver/core/drivers/corda-driver/makefile b/weaver/core/drivers/corda-driver/makefile index cc595174a14..c44ae125d0d 100644 --- a/weaver/core/drivers/corda-driver/makefile +++ b/weaver/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/weaver/core/drivers/fabric-driver/makefile b/weaver/core/drivers/fabric-driver/makefile index 57ad1a04b61..ace5a38d314 100644 --- a/weaver/core/drivers/fabric-driver/makefile +++ b/weaver/core/drivers/fabric-driver/makefile @@ -63,10 +63,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/weaver/core/drivers/fabric-driver/readme.md b/weaver/core/drivers/fabric-driver/readme.md index 894396e6220..87596911837 100644 --- a/weaver/core/drivers/fabric-driver/readme.md +++ b/weaver/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: [cacti-weaver-fabric-driver](https://github.com/hyperledger/cacti/pkgs/container/cacti-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/weaver/core/identity-management/iin-agent/makefile b/weaver/core/identity-management/iin-agent/makefile index d553e04bd73..586880ca25e 100644 --- a/weaver/core/identity-management/iin-agent/makefile +++ b/weaver/core/identity-management/iin-agent/makefile @@ -65,10 +65,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/weaver/core/relay/Makefile b/weaver/core/relay/Makefile index 289c88c77a0..b79dea8e541 100644 --- a/weaver/core/relay/Makefile +++ b/weaver/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/weaver/core/relay/relay-docker.md b/weaver/core/relay/relay-docker.md index c09c90563a1..974cea8be60 100644 --- a/weaver/core/relay/relay-docker.md +++ b/weaver/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/weaver/docs/docs/external/getting-started/enabling-weaver-network/corda.md b/weaver/docs/docs/external/getting-started/enabling-weaver-network/corda.md index 9e768a2cead..65532009d48 100644 --- a/weaver/docs/docs/external/getting-started/enabling-weaver-network/corda.md +++ b/weaver/docs/docs/external/getting-started/enabling-weaver-network/corda.md @@ -511,7 +511,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger/cacti/pkgs/co 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 @@ -544,13 +544,13 @@ Weaver provides a [pre-built image](https://github.com/hyperledger/cacti/pkgs/co - **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/cacti/blob/main/weaver/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/cacti/blob/main/weaver/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/cacti/blob/main/weaver/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/weaver/docs/docs/external/getting-started/enabling-weaver-network/fabric.md b/weaver/docs/docs/external/getting-started/enabling-weaver-network/fabric.md index 0810bd4b322..c0ae0a8ff88 100644 --- a/weaver/docs/docs/external/getting-started/enabling-weaver-network/fabric.md +++ b/weaver/docs/docs/external/getting-started/enabling-weaver-network/fabric.md @@ -602,7 +602,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger/cacti/pkgs/co 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 @@ -638,7 +638,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger/cacti/pkgs/co - **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/cacti/blob/main/weaver/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/cacti/blob/main/weaver/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 @@ -660,7 +660,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger/cacti/pkgs/co - 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 | |:------| @@ -670,7 +670,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger/cacti/pkgs/co 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 @@ -777,13 +777,13 @@ Weaver provides a [pre-built image](https://github.com/hyperledger/cacti/pkgs/co - `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/cacti/blob/main/weaver/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/cacti/blob/main/weaver/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/cacti/blob/main/weaver/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/weaver/samples/fabric/fabric-cli/readme.md b/weaver/samples/fabric/fabric-cli/readme.md index f9fe5b29562..1b4bc2df5ad 100644 --- a/weaver/samples/fabric/fabric-cli/readme.md +++ b/weaver/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/weaver/tests/network-setups/corda/README.md b/weaver/tests/network-setups/corda/README.md index cf2c5fffe27..a51db8c8c5c 100644 --- a/weaver/tests/network-setups/corda/README.md +++ b/weaver/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/weaver/tests/network-setups/corda/makefile b/weaver/tests/network-setups/corda/makefile index 2f241071770..b898627d722 100644 --- a/weaver/tests/network-setups/corda/makefile +++ b/weaver/tests/network-setups/corda/makefile @@ -66,11 +66,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/weaver/tests/network-setups/corda/scripts/clean-restart.sh b/weaver/tests/network-setups/corda/scripts/clean-restart.sh index 76e414cc010..288003a9a5f 100755 --- a/weaver/tests/network-setups/corda/scripts/clean-restart.sh +++ b/weaver/tests/network-setups/corda/scripts/clean-restart.sh @@ -4,7 +4,7 @@ # # SPDX-License-Identifier: Apache-2.0 -docker-compose down +docker compose down ./gradlew clean diff --git a/weaver/tests/network-setups/corda/scripts/start-nodes.sh b/weaver/tests/network-setups/corda/scripts/start-nodes.sh index 8180e2ee281..5317d4d50af 100755 --- a/weaver/tests/network-setups/corda/scripts/start-nodes.sh +++ b/weaver/tests/network-setups/corda/scripts/start-nodes.sh @@ -44,6 +44,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/weaver/tests/network-setups/fabric/dev/network.sh b/weaver/tests/network-setups/fabric/dev/network.sh index b9c145a27ba..8ffd7b14829 100755 --- a/weaver/tests/network-setups/fabric/dev/network.sh +++ b/weaver/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/weaver/tests/network-setups/indy/docker/start_testiin.sh b/weaver/tests/network-setups/indy/docker/start_testiin.sh index 2303e3a647b..b62a810cd72 100755 --- a/weaver/tests/network-setups/indy/docker/start_testiin.sh +++ b/weaver/tests/network-setups/indy/docker/start_testiin.sh @@ -13,4 +13,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/weaver/tests/network-setups/indy/docker/stop_testiin.sh b/weaver/tests/network-setups/indy/docker/stop_testiin.sh index 2ee0c6bbecf..1b39e09ac3e 100755 --- a/weaver/tests/network-setups/indy/docker/stop_testiin.sh +++ b/weaver/tests/network-setups/indy/docker/stop_testiin.sh @@ -10,4 +10,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