Skip to content

Commit

Permalink
Merge pull request #158 from ChinthakaJ98/multiple-toml-version-support
Browse files Browse the repository at this point in the history
[OB3][Docker] Use the relevant deployment.toml file as per the base product version
  • Loading branch information
hasithakn authored Jul 7, 2023
2 parents 60ad7e8 + ca0ee98 commit 98c3118
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dockerfiles/alpine/obam/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ RUN if [ -n "$WSO2_OB_KEYSTORES_URL" ]; then wget -O private-keys.jks "${WSO2_OB
# read deployment.toml file
ARG DEPLOYMENT_TOML_FILE=${WSO2_OB_ACCELERATOR_DIR}/repository/resources/deployment.toml
RUN \
cp ${WSO2_OB_ACCELERATOR_DIR}/repository/resources/wso2am-4.0.0-deployment.toml ${DEPLOYMENT_TOML_FILE} \
cp ${WSO2_OB_ACCELERATOR_DIR}/repository/resources/${WSO2_SERVER}-deployment.toml ${DEPLOYMENT_TOML_FILE} \
# configure hostnames
&& sed -i -e 's|IS_HOSTNAME|'${IS_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \
&& sed -i -e 's|APIM_HOSTNAME|'${APIM_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \
Expand Down
12 changes: 6 additions & 6 deletions dockerfiles/alpine/obam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This section defines the step-by-step instructions to build an [Alpine](https://
* [Docker](https://www.docker.com/get-docker) v20.10.10 or above
* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client
* WSO2 Open Banking API Manager Accelerator Module pack downloaded through [WSO2 Updates 2.0](https://ob.docs.wso2.com/en/latest/install-and-setup/setting-up-servers/)
* Zip archive file of the Open Banking root and issuer certificates.
* Zip archive file of the Open Banking root and issuer certificates.
> Download the root and issuer [certificates](https://openbanking.atlassian.net/wiki/spaces/DZ/pages/252018873/OB+Root+and+Issuing+Certificates+for+Sandbox).
> Rename the `OB_SandBox_PP_Root.cer` as `root.cer`.
> Rename the `OB_SandBox_PP_Issuing.cer` as `iss.cer`.
Expand All @@ -33,9 +33,9 @@ git clone https://github.com/wso2/docker-open-banking.git

- Navigate to `<OBAM_DOCKERFILE_HOME>` directory. <br>
Execute `docker build` command as shown below.
+ `docker build --build-arg WSO2_OB_ACCELERATOR_DIST_URL=<URL_OF_THE_HOSTED_LOCATION/FILENAME> --build-arg OB_TRUSTED_CERTS_URL=<URL_OF_THE_HOSTED_LOCATION/FILENAME> --build-arg WSO2_OB_KEYSTORES_URL=<URL_OF_THE_HOSTED_LOCATION/FOLDER_NAME> -t wso2-obam:3.0.0-alpine .` <br>
> eg:- **Hosted locally**: `docker build --build-arg WSO2_OB_ACCELERATOR_DIST_URL=http://localhost:8000/wso2-obam-accelerator-3.0.0.tar.gz --build-arg OB_TRUSTED_CERTS_URL=http://localhost:8000/ob-cert.zip --build-arg WSO2_OB_KEYSTORES_URL=https://github.com/wso2/docker-open-banking/raw/v3.0.0.10/dockerfiles/keystores -t wso2-obam:3.0.0-alpine .` <br><br>
> eg:- **Hosted remotely**: `docker build --build-arg WSO2_OB_ACCELERATOR_DIST_URL=http://<public_ip:port>/wso2-obam-accelerator-3.0.0.tar.gz --build-arg OB_TRUSTED_CERTS_URL=http://<public_ip:port>/ob-cert.zip --build-arg WSO2_OB_KEYSTORES_URL=https://github.com/wso2/docker-open-banking/raw/v3.0.0.10/dockerfiles/keystores -t wso2-obam:3.0.0-alpine .`
+ `docker build --build-arg BASE_PRODUCT_VERSION=<APIM BASE PRODUCT VERSION> --build-arg WSO2_OB_ACCELERATOR_DIST_URL=<URL_OF_THE_HOSTED_LOCATION/FILENAME> --build-arg OB_TRUSTED_CERTS_URL=<URL_OF_THE_HOSTED_LOCATION/FILENAME> --build-arg WSO2_OB_KEYSTORES_URL=<URL_OF_THE_HOSTED_LOCATION/FOLDER_NAME> -t wso2-obam:3.0.0-alpine .` <br>
> eg:- **Hosted locally**: `docker build --build-arg BASE_PRODUCT_VERSION=4.2.0 --build-arg WSO2_OB_ACCELERATOR_DIST_URL=http://localhost:8000/wso2-obam-accelerator-3.0.0.tar.gz --build-arg OB_TRUSTED_CERTS_URL=http://localhost:8000/ob-cert.zip --build-arg WSO2_OB_KEYSTORES_URL=https://github.com/wso2/docker-open-banking/raw/v3.0.0.10/dockerfiles/keystores -t wso2-obam:3.0.0-alpine .` <br><br>
> eg:- **Hosted remotely**: `docker build --build-arg BASE_PRODUCT_VERSION=4.2.0 --build-arg WSO2_OB_ACCELERATOR_DIST_URL=http://<public_ip:port>/wso2-obam-accelerator-3.0.0.tar.gz --build-arg OB_TRUSTED_CERTS_URL=http://<public_ip:port>/ob-cert.zip --build-arg WSO2_OB_KEYSTORES_URL=https://github.com/wso2/docker-open-banking/raw/v3.0.0.10/dockerfiles/keystores -t wso2-obam:3.0.0-alpine .`
##### 3. Running the Docker image.

Expand All @@ -44,8 +44,8 @@ git clone https://github.com/wso2/docker-open-banking.git
##### 4. Accessing management console.

- To access the management console, use the docker host IP and port 9443.
+ `https:<DOCKER_HOST>:9443/carbon`
+ `https:<DOCKER_HOST>:9443/carbon`

> In here, <DOCKER_HOST> refers to hostname or IP of the host machine on top of which containers are spawned.
## How to update configurations
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/alpine/obiam/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ RUN if [ -n "$WSO2_OB_KEYSTORES_URL" ]; then wget -O private-keys.jks "${WSO2_OB
# read deployment.toml file
ARG DEPLOYMENT_TOML_FILE=${WSO2_OB_ACCELERATOR_DIR}/repository/resources/deployment.toml
RUN \
cp ${WSO2_OB_ACCELERATOR_DIR}/repository/resources/wso2is-5.11.0-deployment.toml ${DEPLOYMENT_TOML_FILE} \
cp ${WSO2_OB_ACCELERATOR_DIR}/repository/resources/${WSO2_SERVER}-deployment.toml ${DEPLOYMENT_TOML_FILE} \
# configure hostnames
&& sed -i -e 's|IS_HOSTNAME|'${IS_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \
&& sed -i -e 's|APIM_HOSTNAME|'${APIM_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/ubuntu/obam/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ RUN if [ -n "$WSO2_OB_KEYSTORES_URL" ]; then wget -O private-keys.jks "${WSO2_OB
# read deployment.toml file
ARG DEPLOYMENT_TOML_FILE=${WSO2_OB_ACCELERATOR_DIR}/repository/resources/deployment.toml
RUN \
cp ${WSO2_OB_ACCELERATOR_DIR}/repository/resources/wso2am-4.0.0-deployment.toml ${DEPLOYMENT_TOML_FILE} \
cp ${WSO2_OB_ACCELERATOR_DIR}/repository/resources/${WSO2_SERVER}-deployment.toml ${DEPLOYMENT_TOML_FILE} \
# configure hostnames
&& sed -i -e 's|IS_HOSTNAME|'${IS_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \
&& sed -i -e 's|APIM_HOSTNAME|'${APIM_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/ubuntu/obiam/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ RUN if [ -n "$WSO2_OB_KEYSTORES_URL" ]; then wget -O private-keys.jks "${WSO2_OB
# read deployment.toml file
ARG DEPLOYMENT_TOML_FILE=${WSO2_OB_ACCELERATOR_DIR}/repository/resources/deployment.toml
RUN \
cp ${WSO2_OB_ACCELERATOR_DIR}/repository/resources/wso2is-5.11.0-deployment.toml ${DEPLOYMENT_TOML_FILE} \
cp ${WSO2_OB_ACCELERATOR_DIR}/repository/resources/${WSO2_SERVER}-deployment.toml ${DEPLOYMENT_TOML_FILE} \
# configure hostnames
&& sed -i -e 's|IS_HOSTNAME|'${IS_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \
&& sed -i -e 's|APIM_HOSTNAME|'${APIM_HOSTNAME}'|g' ${DEPLOYMENT_TOML_FILE} \
Expand Down

0 comments on commit 98c3118

Please sign in to comment.