Skip to content

Commit

Permalink
Merge pull request #279 from azure-javaee/payg-singlevm
Browse files Browse the repository at this point in the history
EAP8 PAYG singlevm
  • Loading branch information
edburns authored Feb 14, 2025
2 parents 5f83edc + b5b1133 commit c029495
Show file tree
Hide file tree
Showing 24 changed files with 163 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-artifact-payg-single.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

env:
offerName: "eap74-rhel8-payg"
offerName: "eap-rhel-payg"

jobs:
preflight:
Expand Down
33 changes: 21 additions & 12 deletions .github/workflows/validate-payg-singlenode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ on:
jdkVersion:
description: 'jdkVersion'
required: true
default: 'openjdk17'
default: 'eap8-openjdk17'
type: choice
options:
- openjdk8
- openjdk11
- openjdk17
- eap8-openjdk17
- eap8-openjdk11
- eap74-openjdk17
- eap74-openjdk11
- eap74-openjdk8
timeWaitBeforeDelete:
description: 'Choose the wait time before deleting resources: 30m (30 minutes), 2h (2 hours), 5h (5 hours), 0 (immediately)'
required: true
Expand Down Expand Up @@ -54,7 +56,8 @@ env:
testPubIpName: testPubIp
nsgName: jbosseap-nsg
scriptLocation: https://raw.githubusercontent.com/${{ secrets.USER_NAME }}/rhel-jboss-templates/$GITHUB_REF_NAME/utilities/
offerName: "eap74-rhel8-payg"
offerName: "eap-rhel-payg"
gracefulShutdownTimeout: "-1"

jobs:
preflight:
Expand Down Expand Up @@ -95,8 +98,8 @@ jobs:
git config --global user.name $gitUserName
echo "create branch $singleTestBranchName"
git checkout -b $singleTestBranchName
rm -r -f $current/rhel-jboss-templates/eap74-rhel8-payg/src/main/*
cp -r -f $current/rhel-jboss-templates-dev/* $current/rhel-jboss-templates/eap74-rhel8-payg/
rm -r -f $current/rhel-jboss-templates/eap-rhel-payg/src/main/*
cp -r -f $current/rhel-jboss-templates-dev/* $current/rhel-jboss-templates/eap-rhel-payg/
git add .
git status
git commit -m "test branch for pipeline"
Expand All @@ -105,6 +108,12 @@ jobs:
id: azure-login
with:
creds: ${{ env.azureCredentials }}
- name: Accept Image Terms
id: accept-terms
run: |
echo "accept terms for VM image"
az vm image terms accept --urn RedHat:rh-jboss-eap:rh-jboss-eap8-jdk17-rhel9-gen2:latest
az vm image terms accept --urn RedHat:rh-jboss-eap:rh-jboss-eap8-jdk11-rhel9-gen2:latest
- name: Deploy an instance of Azure SQL Database
if: ${{ inputs.databaseType == 'mssqlserver' || github.event.client_payload.databaseType == 'mssqlserver' }}
run: |
Expand Down Expand Up @@ -223,8 +232,8 @@ jobs:
fi
echo "generate parameter file for single"
bash rhel-jboss-templates/eap74-rhel8-payg/src/test/scripts/gen-parameters.sh \
<<< "rhel-jboss-templates/eap74-rhel8-payg/src/test/parameters-test-single.json \
bash rhel-jboss-templates/eap-rhel-payg/src/test/scripts/gen-parameters.sh \
<<< "rhel-jboss-templates/eap-rhel-payg/src/test/parameters-test-single.json \
${gitUserName} \
${singleTestBranchName} \
${location} \
Expand All @@ -249,7 +258,7 @@ jobs:
if: success()
with:
name: parameters-test-single
path: rhel-jboss-templates/eap74-rhel8-payg/src/test/parameters-test-single.json
path: rhel-jboss-templates/eap-rhel-payg/src/test/parameters-test-single.json
- name: Create Resource Group if needed
if: ${{ inputs.databaseType == 'none' || github.event.client_payload.databaseType == 'none' }}
uses: azure/CLI@v1
Expand All @@ -268,8 +277,8 @@ jobs:
--verbose \
--resource-group ${{ env.singleResourceGroup }} \
--name single \
--parameters @rhel-jboss-templates/eap74-rhel8-payg/src/test/parameters-test-single.json \
--template-file rhel-jboss-templates/eap74-rhel8-payg/mainTemplate.json
--parameters @rhel-jboss-templates/eap-rhel-payg/src/test/parameters-test-single.json \
--template-file rhel-jboss-templates/eap-rhel-payg/mainTemplate.json
- name: Get public IP
id: get_public_ip
uses: azure/CLI@v1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ There are three different types of EAP on VM offers based on their outcomes.

| Type | Offer | Description |
|--------|-----------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| on VMs | JBoss EAP standalone on RHEL VM(PAYG/BYOS) | [Deployment description](https://htmlpreview.github.io/?https://github.com/azure-javaee/rhel-jboss-templates/blob/main/eap74-rhel8-payg/src/main/resources/marketing-artifacts/partner-center.html) |
| on VMs | JBoss EAP standalone on RHEL VM(PAYG/BYOS) | [Deployment description](https://htmlpreview.github.io/?https://github.com/azure-javaee/rhel-jboss-templates/blob/main/eap-rhel-payg/src/main/resources/marketing-artifacts/partner-center.html) |
| on VMs | JBoss EAP Cluster on VM Scale Sets(PAYG/BYOS) | [Deployment description](https://htmlpreview.github.io/?https://github.com/azure-javaee/rhel-jboss-templates/blob/main/eap74-rhel8-payg-vmss/src/main/resources/marketing-artifacts/partner-center.html) |
| on VMs | JBoss EAP Cluster on VMs(PAYG/BYOS) | [Deployment description](https://htmlpreview.github.io/?https://github.com/azure-javaee/rhel-jboss-templates/blob/main/eap74-rhel8-payg-multivm/src/main/resources/marketing-artifacts/partner-center.html) |
| on ARO | JBoss EAP on ARO | [Deployment description](https://htmlpreview.github.io/?https://github.com/azure-javaee/rhel-jboss-templates/blob/main/eap-aro/src/main/resources/marketing-artifacts/partner-center.html) |
Expand Down
4 changes: 2 additions & 2 deletions eap74-rhel8-payg/pom.xml → eap-rhel-payg/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</parent>

<groupId>com.rhel.jboss.azure</groupId>
<artifactId>eap74-rhel8-payg</artifactId>
<version>${version.eap74-rhel8-payg}</version>
<artifactId>eap-rhel-payg</artifactId>
<version>${version.eap-rhel-payg}</version>
<packaging>pom</packaging>
<name>${project.artifactId}</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,16 @@
{
"name": "jdkVersion",
"type": "Microsoft.Common.DropDown",
"label": "JDK version",
"defaultValue": "OpenJDK 17",
"label": "EAP and JDK version",
"defaultValue": "EAP 8 with JDK 17",
"toolTip": "Choose JDK version.",
"constraints": {
"allowedValues": [
{
"label": "OpenJDK 8",
"value": "openjdk8"
},
{
"label": "OpenJDK 11",
"value": "openjdk11"
},
{
"label": "OpenJDK 17",
"value": "openjdk17"
}
{ "label": "EAP 8 with JDK 17", "value": "eap8-openjdk17" },
{ "label": "EAP 8 with JDK 11", "value": "eap8-openjdk11" },
{ "label": "EAP 7.4 with JDK 17", "value": "eap74-openjdk17" },
{ "label": "EAP 7.4 with JDK 11", "value": "eap74-openjdk11" },
{ "label": "EAP 7.4 with JDK 8", "value": "eap74-openjdk8" }
],
"required": true
},
Expand Down Expand Up @@ -376,6 +369,18 @@
"required": true
},
"visible": true
},
{
"name": "gracefulShutdownTimeout",
"type": "Microsoft.Common.TextBox",
"label": "Graceful shutdown timeout in seconds (-1 to disable)",
"defaultValue": "-1",
"constraints": {
"required": false,
"regex": "^[a-zA-Z0-9+_.-]{1,30}(@[a-zA-Z0-9.-]+){0,1}$",
"validationMessage": "Please enter a graceful shutdown timeout in seconds"
},
"toolTip": "Please enter a graceful shutdown timeout in seconds (-1 to disable)"
},
{
"name": "connectToSatelliteServer",
Expand Down Expand Up @@ -697,6 +702,7 @@

"jbossEAPUserName": "[steps('jbossEAPSettings').jbossEAPUserName]",
"jbossEAPPassword": "[steps('jbossEAPSettings').jbossEAPPassword]",
"gracefulShutdownTimeout": "[steps('jbossEAPSettings').gracefulShutdownTimeout]",
"connectSatellite": "[steps('jbossEAPSettings').connectSatellite]",
"satelliteActivationKey": "[steps('jbossEAPSettings').satelliteActivationKey]",
"satelliteOrgName": "[steps('jbossEAPSettings').satelliteOrgName]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,8 @@ param adminPasswordOrSSHKey string
@description('The size of the Virtual Machine')
param vmSize string = 'Standard_B1ms'

@allowed([
'openjdk8'
'openjdk11'
'openjdk17'
])
@description('The JDK version of the Virtual Machine')
param jdkVersion string = 'openjdk17'
param jdkVersion string = 'eap8-openjdk17'

@description('Capture serial console outputs and screenshots of the virtual machine running on a host to help diagnose startup issues')
@allowed([
Expand Down Expand Up @@ -87,6 +82,9 @@ param jbossEAPUserName string
@secure()
param jbossEAPPassword string

@description('Please enter a Graceful Shutdown Timeout in seconds')
param gracefulShutdownTimeout string

@description('The base URI where artifacts required by this template are located. When the template is deployed using the accompanying scripts, a private location in the subscription will be used and this value will be automatically generated')
param artifactsLocation string = deployment().properties.templateLink.uri

Expand Down Expand Up @@ -155,7 +153,7 @@ var obj_uamiForDeploymentScript = {
var plan = {
publisher: 'redhat'
product: 'rh-jboss-eap'
name: (jdkVersion == 'openjdk8') ? 'rh-jboss-eap74-jdk8-rhel8' : (jdkVersion == 'openjdk11') ? 'rh-jboss-eap74-jdk11-rhel8' : (jdkVersion == 'openjdk17') ? 'rh-jboss-eap74-jdk17-rhel8' : null
name: (jdkVersion == 'eap74-openjdk8') ? 'rh-jboss-eap74-jdk8-rhel8' : (jdkVersion == 'eap74-openjdk11') ? 'rh-jboss-eap74-jdk11-rhel8' : (jdkVersion == 'eap74-openjdk17') ? 'rh-jboss-eap74-jdk17-rhel8' : (jdkVersion == 'eap8-openjdk11') ? 'rh-jboss-eap8-jdk11-rhel9' : (jdkVersion == 'eap8-openjdk17') ? 'rh-jboss-eap8-jdk17-rhel9' : null
}

/*
Expand Down Expand Up @@ -303,8 +301,8 @@ resource vmName_resource 'Microsoft.Compute/virtualMachines@${azure.apiVersionFo
imageReference: {
publisher: 'RedHat'
offer: 'rh-jboss-eap'
sku: (jdkVersion == 'openjdk8') ? 'rh-jboss-eap74-jdk8-rhel8' : (jdkVersion == 'openjdk11') ? 'rh-jboss-eap74-jdk11-rhel8' : (jdkVersion == 'openjdk17') ? 'rh-jboss-eap74-jdk17-rhel8' : null
version: 'latest'
sku: (jdkVersion == 'eap74-openjdk8') ? 'rh-jboss-eap74-jdk8-rhel8' : (jdkVersion == 'eap74-openjdk11') ? 'rh-jboss-eap74-jdk11-rhel8' : (jdkVersion == 'eap74-openjdk17') ? 'rh-jboss-eap74-jdk17-rhel8' : (jdkVersion == 'eap8-openjdk11') ? 'rh-jboss-eap8-jdk11-rhel9' : (jdkVersion == 'eap8-openjdk17') ? 'rh-jboss-eap8-jdk17-rhel9' : null
version: (jdkVersion == 'eap8-openjdk11') ? '8.0.2024111801' : (jdkVersion == 'eap8-openjdk17') ? '8.0.2024111801' : 'latest'
}
osDisk: {
name: '${vmName}_OSDisk'
Expand All @@ -330,7 +328,12 @@ resource vmName_resource 'Microsoft.Compute/virtualMachines@${azure.apiVersionFo
}

module baseImageSelected './modules/_pids/_empty.bicep' = {
name: (jdkVersion == 'openjdk8') ? '${azure.guid.eap74-rhel8-payg.rh-jboss-eap74-jdk8-rhel8}' : (jdkVersion == 'openjdk11') ? '${azure.guid.eap74-rhel8-payg.rh-jboss-eap74-jdk11-rhel8}' : (jdkVersion == 'openjdk17') ? '${azure.guid.eap74-rhel8-payg.rh-jboss-eap74-jdk17-rhel8}' : 'eap74-rhel8-payg.null'
name:(jdkVersion == 'eap74-openjdk8') ? '${azure.guid.eap-rhel-payg.rh-jboss-eap74-jdk8-rhel8}' : /*
*/(jdkVersion == 'eap74-openjdk11') ? '${azure.guid.eap-rhel-payg.rh-jboss-eap74-jdk11-rhel8}' : /*
*/(jdkVersion == 'eap74-openjdk17') ? '${azure.guid.eap-rhel-payg.rh-jboss-eap74-jdk17-rhel8}' : /*
*/(jdkVersion == 'eap8-openjdk11') ? '${azure.guid.eap-rhel-payg.rh-jboss-eap8-jdk11-rhel9}' : /*
*/(jdkVersion == 'eap8-openjdk17') ? '${azure.guid.eap-rhel-payg.rh-jboss-eap8-jdk17-rhel9}' : /*
*/'eap-rhel-payg.null'
params: {}
}

Expand Down Expand Up @@ -378,7 +381,7 @@ resource vmName_jbosseap_setup_extension 'Microsoft.Compute/virtualMachines/exte
]
}
protectedSettings: {
commandToExecute: 'sh jbosseap-setup-redhat.sh \'${jbossEAPUserName}\' \'${base64(jbossEAPPassword)}\' \'${connectSatellite}\' \'${base64(satelliteActivationKey)}\' \'${base64(satelliteOrgName)}\' \'${satelliteFqdn}\' \'${jdkVersion}\' \'${enableDB}\' \'${databaseType}\' \'${base64(jdbcDataSourceJNDIName)}\' \'${base64(dsConnectionURL)}\' \'${base64(dbUser)}\' \'${base64(dbPassword)}\''
commandToExecute: 'sh jbosseap-setup-redhat.sh \'${jbossEAPUserName}\' \'${base64(jbossEAPPassword)}\' \'${connectSatellite}\' \'${base64(satelliteActivationKey)}\' \'${base64(satelliteOrgName)}\' \'${satelliteFqdn}\' \'${jdkVersion}\' \'${enableDB}\' \'${databaseType}\' \'${base64(jdbcDataSourceJNDIName)}\' \'${base64(dsConnectionURL)}\' \'${base64(dbUser)}\' \'${base64(dbPassword)}\' \'${gracefulShutdownTimeout}\''
}
}
}
Expand Down
Loading

0 comments on commit c029495

Please sign in to comment.