Skip to content

Commit

Permalink
Updated README.md to include instructions on building Liberty on AKS (#…
Browse files Browse the repository at this point in the history
…11)

* Updated README.md to include instructions on building Liberty on AKS using Bicep templates.

* Updated build process for Liberty on AKS Bicep templates to dynamically fetch parent version from Maven project.

* remove space
  • Loading branch information
backwind1233 authored Jun 11, 2024
1 parent 42596d4 commit 797e23d
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,28 @@ git checkout ${LIBERTY_AKS_REPO_REF}
cd ${DIR}
```
### Build Liberty on AKS Bicep templates
```bash
cd ${DIR}/azure.liberty.aks
VERSION=$(mvn help:evaluate -Dexpression=project.parent.version -q -DforceStdout | grep -v '^\[' | tr -d '\r')
cd ${DIR}
curl -L -o ${DIR}/azure-javaee-iaas-parent-${VERSION}.pom \
https://github.com/azure-javaee/azure-javaee-iaas/releases/download/azure-javaee-iaas-parent-${VERSION}/azure-javaee-iaas-parent-${VERSION}.pom
mvn install:install-file -Dfile=${DIR}/azure-javaee-iaas-parent-${VERSION}.pom \
-DgroupId=com.microsoft.azure.iaas \
-DartifactId=azure-javaee-iaas-parent \
-Dversion=${VERSION} \
-Dpackaging=pom
cd ${DIR}/azure.liberty.aks
mvn clean package -DskipTests
```
### Sign in to Azure
If you haven't already, sign into your Azure subscription by using the `az login` command and follow the on-screen directions.
Expand Down Expand Up @@ -204,7 +226,7 @@ EOF

### Invoke Liberty on AKS Bicep template to deploy the Open Liberty Operator

Invoke the Bicep template in `${DIR}/azure.liberty.aks/src/main/bicep/mainTemplate.bicep` to deploy Open Liberty Operator on AKS.
Invoke the Bicep template in `${DIR}/azure.liberty.aks/target/main/bicep/mainTemplate.bicep` to deploy Open Liberty Operator on AKS.

Run the following command to validate the parameter file.

Expand All @@ -213,7 +235,7 @@ az deployment group validate \
--resource-group ${RESOURCE_GROUP_NAME} \
--name liberty-on-aks \
--parameters @parameters.json \
--template-file ${DIR}/azure.liberty.aks/src/main/bicep/mainTemplate.bicep
--template-file ${DIR}/azure.liberty.aks/target/main/bicep/mainTemplate.bicep
```

The command should be completed without error. If there is, you must resolve it before moving on. Verify the exit status from the command by examining shell's exit status. In POSIX environments, this is `$?`.
Expand All @@ -231,7 +253,7 @@ az deployment group create \
--resource-group ${RESOURCE_GROUP_NAME} \
--name liberty-on-aks \
--parameters @parameters.json \
--template-file ${DIR}/azure.liberty.aks/src/main/bicep/mainTemplate.bicep
--template-file ${DIR}/azure.liberty.aks/target/main/bicep/mainTemplate.bicep
```
It takes more than 10 minutes to finish the deployment. The Open Liberty Operator is running in namespace `default`.
Expand Down

0 comments on commit 797e23d

Please sign in to comment.