Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9d814ae
Added README.md file
May 21, 2019
9b5c6b0
Added file CONTRIBUTING.md
Jun 10, 2019
2b9ae9f
Updated README.md
Oct 22, 2019
27d6290
Updated CONTRIBUTING.md
Oct 22, 2019
0cbdd97
Added .gitignore
Apr 13, 2020
845664b
On branch master Skeleton, does not pass test.
edburns Apr 7, 2021
f2bfd11
Update sample code format to bash in README.md
Apr 7, 2021
e01ceff
Test push
Apr 7, 2021
80fa9c6
test push
majguo Apr 7, 2021
7e28068
On branch master Iterating
edburns Apr 12, 2021
58a50a7
On branch master
edburns Apr 12, 2021
7478f9d
UI definition for weblogic and auto scaling.
galiacheng Apr 13, 2021
2bf47be
Enhance UI:
Apr 15, 2021
20893c5
UI reviewed by team.
Apr 16, 2021
596c2f4
Deploy AKS using bicep
Apr 19, 2021
8cdac44
Allow to enable azure monitoring.
Apr 19, 2021
fcba188
Fix unique name.
Apr 19, 2021
993714b
Merged PR 318531: mvn -Pbicep -Ddev -Passembly clean install
edburns Apr 20, 2021
1cf0db0
Merged PR 318634: Proposed pids module.
Apr 21, 2021
e924fa3
Merged PR 323147: Create a simple WebLogic Cluster
May 13, 2021
0051021
Merged PR 328523: Setup networking and resolve comment from pr-323147
Jun 7, 2021
007ec91
Merged PR 337599: E2E SSL
Jul 19, 2021
f21a260
Merged PR 338855: Update application using template.
Jul 22, 2021
44da2c4
Merged PR 340400: Update app: parse sas url that has slash in query s…
Jul 28, 2021
8300872
Merged PR 341394: Allow updating weblogic cluster using maintemplate …
Aug 10, 2021
6493b5b
Merged PR 343730: Configure Data source
Aug 11, 2021
64b4391
Merged PR 343913: Ignore VS Code files
edburns Aug 11, 2021
b17b1a5
Merged PR 343925: On branch master Update version for partner center.…
edburns Aug 11, 2021
b9d6e3e
Merged PR 344026: Fix MS SQL driver.
Aug 13, 2021
3747391
Merged PR 344913: Remote console and security enhancement
Aug 18, 2021
88053a9
On branch main: merge remote-tracking branch 'devdiv/master' into main
Aug 18, 2021
6eeb6ca
On branch main: modify with UPL licence info in pom file.
Aug 19, 2021
6d2890a
On branch main: capitalize product name Helm.
Aug 19, 2021
37f4036
On branch main: capitalize product name Kubernetes
Aug 19, 2021
820c7e4
On branch main: lowercase name of ingress controller
Aug 19, 2021
e599233
On branch main: fix wording in comments.
Aug 19, 2021
d8d34fb
On branch main: make sure pv is bound.
Aug 19, 2021
4971d00
On branch main: make sure the patching secret string is correct in db…
Aug 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ Issue related to Oracle WebLogic Server on Microsoft Azure implementation are tr
This section tracks GitHub Actions configured for each offer repo, 'Build and Test' and 'New Tag' are two different workflows.
| Offer Repo | Build and Test | New Tag |
|--- |--- |--- |
| [Single Node] | [Build and Test]| [New Tag]|
| [Admin] | [Build and Test] | [New Tag] |
| [Configured Cluster] | [Build and Test]svg) | [New Tag]) |
| [Dynamic Cluster] | [Build and Test] | [New Tag] |
| [WLS on AKS] | [Build and Test]| [New Tag]|

## Pull Requests

Expand Down
28 changes: 28 additions & 0 deletions weblogic-azure-aks/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021, Oracle Corporation and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<!-- mvn -Pbicep -Passembly clean install -->

<groupId>com.oracle.weblogic.azure</groupId>
<artifactId>wls-on-aks-azure-marketplace</artifactId>
<version>1.0.15</version>

<parent>
<groupId>com.microsoft.azure.iaas</groupId>
<artifactId>azure-javaee-iaas-parent</artifactId>
<version>1.0.10</version>
<relativePath></relativePath>
</parent>

<packaging>jar</packaging>
<name>wls-on-aks-azure-marketplace</name>
<properties>
<test.parameters>-TestParameter '@{&quot;PasswordMinLength&quot;=6}'</test.parameters>
</properties>
</project>
1,062 changes: 1,060 additions & 2 deletions weblogic-azure-aks/src/main/arm/createUiDefinition.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright (c) 2021, Oracle Corporation and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#
# Based on https://raw.githubusercontent.com/Azure/application-gateway-kubernetes-ingress/master/docs/examples/sample-helm-config.yaml

# This file contains the essential configs for the ingress controller Helm chart

# Verbosity level of the App Gateway Ingress Controller
verbosityLevel: 3

################################################################################
# Specify which application gateway the ingress controller will manage
#
appgw:
subscriptionId: @SUB_ID@
resourceGroup: @APPGW_RG_NAME@
name: @APPGW_NAME@
usePrivateIP: false

# Setting appgw.shared to "true" will create an AzureIngressProhibitedTarget CRD.
# This prohibits AGIC from applying config for any host/path.
# Use "kubectl get AzureIngressProhibitedTargets" to view and change this.
shared: false

################################################################################
# Specify which Kubernetes namespace the ingress controller will watch
# Default value is "default"
# Leaving this variable out or setting it to blank or empty string would
# result in ingress controller observing all acessible namespaces.
#
kubernetes:
watchNamespace: @WATCH_NAMESPACE@

################################################################################
# Specify the authentication with Azure Resource Manager
#
# Two authentication methods are available:
# - Option 1: AAD-Pod-Identity (https://github.com/Azure/aad-pod-identity)
# armAuth:
# type: aadPodIdentity
# identityResourceID:
# identityClientID:

armAuth:
type: servicePrincipal
secretJSON: @SP_ENCODING_CREDENTIALS@

################################################################################
# Specify if the cluster is RBAC enabled or not
rbac:
# Specifies whether RBAC resources should be created
create: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2021, Oracle Corporation and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ingress-azure-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: ingress-azure
namespace: default
76 changes: 38 additions & 38 deletions weblogic-azure-aks/src/main/arm/scripts/buildWLSDockerImage.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) 2021, Oracle Corporation and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

echo "Script ${0} starts"

#Function to output message to StdErr
function echo_stderr() {
echo "$@" >&2
Expand All @@ -13,7 +15,7 @@ function read_sensitive_parameters_from_stdin() {

#Function to display usage message
function usage() {
echo_stdout "<azureACRPassword> <ocrSSOPSW> ./buildWLSDockerImage.sh <wlsImagePath> <azureACRServer> <azureACRUserName> <imageTag> <appPackageUrls> <ocrSSOUser> <wlsClusterSize>"
echo "<azureACRPassword> <ocrSSOPSW> ./buildWLSDockerImage.sh ./buildWLSDockerImage.sh <wlsImagePath> <azureACRServer> <azureACRUserName> <imageTag> <appPackageUrls> <ocrSSOUser> <wlsClusterSize> <enableSSL>"
if [ $1 -eq 1 ]; then
exit 1
fi
Expand All @@ -39,13 +41,13 @@ function validate_inputs() {
usage 1
fi

if [ -z "$azureACRPassword" ]; then
echo_stderr "azureACRPassword is required. "
if [ -z "$azureACRUserName" ]; then
echo_stderr "azureACRUserName is required. "
usage 1
fi

if [ -z "$azureACRUserName" ]; then
echo_stderr "azureACRUserName is required. "
if [ -z "$azureACRPassword" ]; then
echo_stderr "azureACRPassword is required. "
usage 1
fi

Expand Down Expand Up @@ -73,6 +75,11 @@ function validate_inputs() {
echo_stderr "wlsClusterSize is required. "
usage 1
fi

if [ -z "$enableSSL" ]; then
echo_stderr "enableSSL is required. "
usage 1
fi
}

function initialize() {
Expand All @@ -87,6 +94,7 @@ function initialize() {
mkdir wlsdeploy
mkdir wlsdeploy/config
mkdir wlsdeploy/applications
mkdir wlsdeploy/domainLibraries
}

# Install docker, zip, unzip and java
Expand All @@ -95,7 +103,7 @@ function install_utilities() {
# Install docker
sudo apt-get -q update
sudo apt-get -y -q install apt-transport-https
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
curl -m ${curlMaxTime} -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
Expand Down Expand Up @@ -133,11 +141,17 @@ function install_utilities() {
validate_status "Check status of unzip."

# Download weblogic tools
curl -m 120 -fL ${wdtDownloadURL} -o weblogic-deploy.zip
curl -m ${curlMaxTime} -fL ${wdtDownloadURL} -o weblogic-deploy.zip
validate_status "Check status of weblogic-deploy.zip."

curl -m 120 -fL ${witDownloadURL} -o imagetool.zip
curl -m ${curlMaxTime} -fL ${witDownloadURL} -o imagetool.zip
validate_status "Check status of imagetool.zip."

curl -m ${curlMaxTime} -fL ${wlsPostgresqlDriverUrl} -o ${scriptDir}/model-images/wlsdeploy/domainLibraries/postgresql-42.2.8.jar
validate_status "Install postgresql driver."

curl -m ${curlMaxTime} -fL ${wlsMSSQLDriverUrl} -o ${scriptDir}/model-images/wlsdeploy/domainLibraries/mssql-jdbc-7.4.1.jre8.jar
validate_status "Install mssql driver."
}

# Login in OCR
Expand All @@ -158,35 +172,15 @@ function prepare_wls_models() {
CLUSTER_SIZE=${wlsClusterSize}
EOF

# Generate application deployment model in model.yaml
# Known issue: no support for package name that has comma.
# remove []
if [ "${appPackageUrls}" == "[]" ]; then
return
fi
echo "Starting generation of image model file..."
modelFilePath="$scriptDir/model.yaml"

cat <<EOF >>${scriptDir}/model.yaml
appDeployments:
Application:
EOF
appPackageUrls=$(echo "${appPackageUrls:1:${#appPackageUrls}-2}")
appUrlArray=$(echo $appPackageUrls | tr "," "\n")

index=1
for item in $appUrlArray; do
# e.g. https://wlsaksapp.blob.core.windows.net/japps/testwebapp.war?sp=r&se=2021-04-29T15:12:38Z&sv=2020-02-10&sr=b&sig=7grL4qP%2BcJ%2BLfDJgHXiDeQ2ZvlWosRLRQ1ciLk0Kl7M%3D
fileNamewithQueryString="${item##*/}"
fileName="${fileNamewithQueryString%\?*}"
fileExtension="${fileName##*.}"
curl -m 120 -fL "$item" -o wlsdeploy/applications/${fileName}
cat <<EOF >>${scriptDir}/model.yaml
app${index}:
SourcePath: 'wlsdeploy/applications/${fileName}'
ModuleType: ${fileExtension}
Target: 'cluster-1'
EOF
index=$((index + 1))
done
chmod ugo+x $scriptDir/genImageModel.sh
bash $scriptDir/genImageModel.sh \
${modelFilePath} \
${appPackageUrls} \
${enableSSL}
validate_status "Generate image model file."
}

# Build weblogic image
Expand All @@ -213,6 +207,7 @@ function build_wls_image() {
--wdtModelOnly \
--wdtDomainType WLS \
--chown oracle:root
# --additionalBuildCommands ${scriptDir}/nodemanager.dockerfile

validate_status "Check status of building WLS domain image."

Expand All @@ -231,18 +226,23 @@ function build_wls_image() {
export script="${BASH_SOURCE[0]}"
export scriptDir="$(cd "$(dirname "${script}")" && pwd)"

source ${scriptDir}/common.sh

export wlsImagePath=$1
export azureACRServer=$2
export azureACRUserName=$3
export imageTag=$4
export appPackageUrls=$5
export ocrSSOUser=$6
export wlsClusterSize=$7
export enableSSL=$8

export acrImagePath="$azureACRServer/aks-wls-images:${imageTag}"
export ocrLoginServer="container-registry.oracle.com"
export wdtDownloadURL="https://github.com/oracle/weblogic-deploy-tooling/releases/download/release-1.9.7/weblogic-deploy.zip"
export witDownloadURL="https://github.com/oracle/weblogic-image-tool/releases/download/release-1.9.11/imagetool.zip"
export wdtDownloadURL="https://github.com/oracle/weblogic-deploy-tooling/releases/download/release-1.9.14/weblogic-deploy.zip"
export witDownloadURL="https://github.com/oracle/weblogic-image-tool/releases/download/release-1.9.12/imagetool.zip"
export wlsPostgresqlDriverUrl="https://jdbc.postgresql.org/download/postgresql-42.2.8.jar"
export wlsMSSQLDriverUrl="https://repo.maven.apache.org/maven2/com/microsoft/sqlserver/mssql-jdbc/7.4.1.jre8/mssql-jdbc-7.4.1.jre8.jar"

read_sensitive_parameters_from_stdin

Expand Down
14 changes: 14 additions & 0 deletions weblogic-azure-aks/src/main/arm/scripts/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export checkPodStatusInterval=20 # interval of checking pod status.
export checkPodStatusMaxAttemps=30 # max attempt to check pod status.
export checkPVStateInterval=5 # interval of checking pvc status.
export checkPVStateMaxAttempt=10 # max attempt to check pvc status.

export constFalse="false"
export constTrue="true"

export curlMaxTime=120 # seconds
export ocrLoginServer="container-registry.oracle.com"
export optUninstallMaxTry=5 # Max attempts to wait for the operator uninstalled
export optUninstallInterval=10

export wlsContainerName="weblogic-server"
Loading