Copied new changes from main repository
Change-Id: If3e0b4272debbd8f3ffe080ad467031bb02dddd5
This commit is contained in:
parent
8593e5a874
commit
68715c8e2c
@ -6,6 +6,7 @@ echo "Architecture: $arch, Bits: $bits"
|
||||
|
||||
[[ "$bits" == "32" ]] && [[ "${arch,,}" = arm* ]] && TARGET="ARM-32"
|
||||
[[ "$bits" == "64" ]] && [[ "${arch,,}" = arm* ]] && TARGET="ARM-64"
|
||||
[[ "$bits" == "64" ]] && [[ "${arch,,}" = aarch64 ]] && TARGET="ARM-64"
|
||||
[[ "$bits" == "64" ]] && [[ "${arch,,}" = amd* ]] && TARGET="x86-64"
|
||||
[[ "$bits" == "64" ]] && [[ "${arch,,}" = x86* ]] && TARGET="x86-64"
|
||||
|
||||
|
@ -575,7 +575,7 @@ public class ClientShellCommand implements Command, Runnable, ServerSessionAware
|
||||
}
|
||||
|
||||
public void sendToClient(String msg) {
|
||||
sendToClient(msg, Level.INFO);
|
||||
sendToClient(msg, Level.DEBUG);
|
||||
}
|
||||
|
||||
public void sendToClient(String msg, Level logLevel) {
|
||||
@ -694,7 +694,7 @@ public class ClientShellCommand implements Command, Runnable, ServerSessionAware
|
||||
log.debug("sendClientConfiguration: id={}, client-config={}", id, cc);
|
||||
try {
|
||||
String ccStr = serializeToString(cc);
|
||||
log.info("sendClientConfiguration: Serialization of Client configuration: {}", ccStr);
|
||||
log.debug("sendClientConfiguration: Serialization of Client configuration: {}", ccStr);
|
||||
sendToClient("SET-CLIENT-CONFIG " + ccStr);
|
||||
} catch (IOException ex) {
|
||||
log.error("sendClientConfiguration: Exception while serializing Client configuration: ", ex);
|
||||
|
@ -16,11 +16,11 @@
|
||||
os: LINUX
|
||||
description: EMS client SKIP installation instruction set
|
||||
condition: >-
|
||||
${SKIP_BAGUETTE_INSTALLATION:-false} ||
|
||||
'${OS_ARCHITECTURE:-x}'.startsWith('arm') ||
|
||||
${CPU_PROCESSORS:-0} <= ${BAGUETTE_INSTALLATION_MIN_PROCESSORS:-0} ||
|
||||
${RAM_AVAILABLE_KB:-0} <= ${BAGUETTE_INSTALLATION_MIN_RAM:-0} ||
|
||||
${DISK_FREE_KB:-0} <= ${BAGUETTE_INSTALLATION_MIN_DISK_FREE:-0}
|
||||
${SKIP_BAGUETTE_INSTALLATION:-false}
|
||||
# || '${OS_ARCHITECTURE:-x}'.startsWith('arm')
|
||||
# || ${CPU_PROCESSORS:-0} <= ${BAGUETTE_INSTALLATION_MIN_PROCESSORS:-0}
|
||||
# || ${RAM_AVAILABLE_KB:-0} <= ${BAGUETTE_INSTALLATION_MIN_RAM:-0}
|
||||
# || ${DISK_FREE_KB:-0} <= ${BAGUETTE_INSTALLATION_MIN_DISK_FREE:-0}
|
||||
instructions:
|
||||
- description: 'DEBUG: Print node pre-registration VARIABLES'
|
||||
taskType: PRINT_VARS
|
||||
|
@ -15,11 +15,11 @@
|
||||
os: LINUX
|
||||
description: EMS client installation instruction set at VM node
|
||||
condition: >-
|
||||
! ${SKIP_BAGUETTE_INSTALLATION:-false} &&
|
||||
! '${OS_ARCHITECTURE:-x}'.startsWith('arm') &&
|
||||
${CPU_PROCESSORS:-0} > ${BAGUETTE_INSTALLATION_MIN_PROCESSORS:-0} &&
|
||||
${RAM_AVAILABLE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_RAM:-0} &&
|
||||
${DISK_FREE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_DISK_FREE:-0}
|
||||
! ${SKIP_BAGUETTE_INSTALLATION:-false}
|
||||
# && ! '${OS_ARCHITECTURE:-x}'.startsWith('arm')
|
||||
# && ${CPU_PROCESSORS:-0} > ${BAGUETTE_INSTALLATION_MIN_PROCESSORS:-0}
|
||||
# && ${RAM_AVAILABLE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_RAM:-0}
|
||||
# && ${DISK_FREE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_DISK_FREE:-0}
|
||||
instructions:
|
||||
- description: 'DEBUG: Print node pre-registration VARIABLES'
|
||||
taskType: PRINT_VARS
|
||||
|
@ -15,11 +15,11 @@
|
||||
os: LINUX
|
||||
description: JRE installation instruction set at VM node
|
||||
condition: >-
|
||||
! ${SKIP_JRE_INSTALLATION:-false} &&
|
||||
! '${OS_ARCHITECTURE:-x}'.startsWith('arm') &&
|
||||
${CPU_PROCESSORS:-0} > ${BAGUETTE_INSTALLATION_MIN_PROCESSORS:-0} &&
|
||||
${RAM_AVAILABLE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_RAM:-0} &&
|
||||
${DISK_FREE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_DISK_FREE:-0}
|
||||
! ${SKIP_JRE_INSTALLATION:-false}
|
||||
# && ! '${OS_ARCHITECTURE:-x}'.startsWith('arm')
|
||||
# && ${CPU_PROCESSORS:-0} > ${BAGUETTE_INSTALLATION_MIN_PROCESSORS:-0}
|
||||
# && ${RAM_AVAILABLE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_RAM:-0}
|
||||
# && ${DISK_FREE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_DISK_FREE:-0}
|
||||
instructions:
|
||||
- description: Check if JRE is already installed at Node
|
||||
taskType: CHECK
|
||||
@ -45,23 +45,38 @@ instructions:
|
||||
# executable: false
|
||||
# exitCode: 0
|
||||
# match: false
|
||||
- description: Copy JRE package
|
||||
# - description: Copy JRE package
|
||||
# taskType: COPY
|
||||
# fileName: /tmp/${JRE_LINUX_PACKAGE}
|
||||
# localFileName: '${EMS_PUBLIC_DIR}/resources/${JRE_LINUX_PACKAGE}'
|
||||
# executable: false
|
||||
# exitCode: 0
|
||||
# match: false
|
||||
- description: Copy JRE installation script
|
||||
taskType: COPY
|
||||
fileName: /tmp/${JRE_LINUX_PACKAGE}
|
||||
localFileName: '${EMS_PUBLIC_DIR}/resources/${JRE_LINUX_PACKAGE}'
|
||||
fileName: /tmp/jre-install.sh
|
||||
localFileName: '${EMS_PUBLIC_DIR}/resources/jre-install.sh'
|
||||
executable: true
|
||||
exitCode: 0
|
||||
match: false
|
||||
- description: Run JRE installation script
|
||||
taskType: CMD
|
||||
command: 'chmod +x /tmp/jre-install.sh && /tmp/jre-install.sh'
|
||||
executable: false
|
||||
exitCode: 0
|
||||
match: false
|
||||
executionTimeout: 300000
|
||||
- description: Extract JRE package into installation folder
|
||||
taskType: CMD
|
||||
command: '${ROOT_CMD} tar zxvf /tmp/${JRE_LINUX_PACKAGE} -C ${BAGUETTE_CLIENT_BASE_DIR}'
|
||||
#command: '${ROOT_CMD} tar zxvf /tmp/${JRE_LINUX_PACKAGE} -C ${BAGUETTE_CLIENT_BASE_DIR}'
|
||||
command: '${ROOT_CMD} tar zxvf /tmp/jre.tar.gz -C ${BAGUETTE_CLIENT_BASE_DIR}'
|
||||
executable: false
|
||||
exitCode: 0
|
||||
match: false
|
||||
- description: Rename JRE directory
|
||||
taskType: CMD
|
||||
command: >-
|
||||
${ROOT_CMD} mv ${BAGUETTE_CLIENT_BASE_DIR}/zulu* ${BAGUETTE_CLIENT_BASE_DIR}/jre
|
||||
#command: ${ROOT_CMD} mv ${BAGUETTE_CLIENT_BASE_DIR}/zulu* ${BAGUETTE_CLIENT_BASE_DIR}/jre
|
||||
command: ${ROOT_CMD} mv ${BAGUETTE_CLIENT_BASE_DIR}/jre* ${BAGUETTE_CLIENT_BASE_DIR}/jre
|
||||
executable: false
|
||||
exitCode: 0
|
||||
match: false
|
||||
|
@ -1,7 +1,8 @@
|
||||
{
|
||||
"os": "LINUX",
|
||||
"description": "EMS client SKIP installation instruction set",
|
||||
"condition": "${SKIP_BAGUETTE_INSTALLATION:-false} || '${OS_ARCHITECTURE:-x}'.startsWith('arm') || ${CPU_PROCESSORS:-0} <= ${BAGUETTE_INSTALLATION_MIN_PROCESSORS:-0} || ${RAM_AVAILABLE_KB:-0} <= ${BAGUETTE_INSTALLATION_MIN_RAM:-0} || ${DISK_FREE_KB:-0} <= ${BAGUETTE_INSTALLATION_MIN_DISK_FREE:-0}",
|
||||
/*"condition": "${SKIP_BAGUETTE_INSTALLATION:-false} || '${OS_ARCHITECTURE:-x}'.startsWith('arm') || ${CPU_PROCESSORS:-0} <= ${BAGUETTE_INSTALLATION_MIN_PROCESSORS:-0} || ${RAM_AVAILABLE_KB:-0} <= ${BAGUETTE_INSTALLATION_MIN_RAM:-0} || ${DISK_FREE_KB:-0} <= ${BAGUETTE_INSTALLATION_MIN_DISK_FREE:-0}",*/
|
||||
"condition": "${SKIP_BAGUETTE_INSTALLATION:-false}",
|
||||
"instructions": [
|
||||
{
|
||||
"description": "DEBUG: Print node pre-registration VARIABLES",
|
||||
@ -20,4 +21,4 @@
|
||||
"message": "EMS client installation SKIPPED at Node"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{
|
||||
"os": "LINUX",
|
||||
"description": "EMS client installation instruction set at VM node",
|
||||
"condition": "! ${SKIP_BAGUETTE_INSTALLATION:-false} && ! '${OS_ARCHITECTURE:-x}'.startsWith('arm') && ${CPU_PROCESSORS:-0} > ${BAGUETTE_INSTALLATION_MIN_PROCESSORS:-0} && ${RAM_AVAILABLE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_RAM:-0} && ${DISK_FREE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_DISK_FREE:-0}",
|
||||
/*"condition": "! ${SKIP_BAGUETTE_INSTALLATION:-false} && ! '${OS_ARCHITECTURE:-x}'.startsWith('arm') && ${CPU_PROCESSORS:-0} > ${BAGUETTE_INSTALLATION_MIN_PROCESSORS:-0} && ${RAM_AVAILABLE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_RAM:-0} && ${DISK_FREE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_DISK_FREE:-0}",*/
|
||||
"condition": "! ${SKIP_BAGUETTE_INSTALLATION:-false}",
|
||||
"instructions": [
|
||||
{
|
||||
"description": "DEBUG: Print node pre-registration VARIABLES",
|
||||
@ -151,4 +152,4 @@
|
||||
"message": "EMS client installation completed at Node"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{
|
||||
"os": "LINUX",
|
||||
"description": "JRE installation instruction set at VM node",
|
||||
"condition": "! ${SKIP_JRE_INSTALLATION:-false} && ! '${OS_ARCHITECTURE:-x}'.startsWith('arm') && ${CPU_PROCESSORS:-0} > ${BAGUETTE_INSTALLATION_MIN_PROCESSORS:-0} && ${RAM_AVAILABLE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_RAM:-0} && ${DISK_FREE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_DISK_FREE:-0}",
|
||||
/*"condition": "! ${SKIP_JRE_INSTALLATION:-false} && ! '${OS_ARCHITECTURE:-x}'.startsWith('arm') && ${CPU_PROCESSORS:-0} > ${BAGUETTE_INSTALLATION_MIN_PROCESSORS:-0} && ${RAM_AVAILABLE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_RAM:-0} && ${DISK_FREE_KB:-0} > ${BAGUETTE_INSTALLATION_MIN_DISK_FREE:-0}",*/
|
||||
"condition": "! ${SKIP_JRE_INSTALLATION:-false}",
|
||||
"instructions": [
|
||||
{
|
||||
"description": "Check if JRE is already installed at Node",
|
||||
@ -96,4 +97,4 @@
|
||||
"match": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -52,9 +52,9 @@ ENV PUBLIC_DIR ${BASEDIR}/public_resources
|
||||
|
||||
# Download a JRE suitable for running EMS clients, and
|
||||
# offer it for download
|
||||
ENV JRE_LINUX_PACKAGE zulu21.30.15-ca-jre21.0.1-linux_x64.tar.gz
|
||||
RUN mkdir -p ${PUBLIC_DIR}/resources && \
|
||||
wget --progress=dot:giga -O ${PUBLIC_DIR}/resources/${JRE_LINUX_PACKAGE} https://cdn.azul.com/zulu/bin/${JRE_LINUX_PACKAGE}
|
||||
#ENV JRE_LINUX_PACKAGE zulu21.30.15-ca-jre21.0.1-linux_x64.tar.gz
|
||||
#RUN mkdir -p ${PUBLIC_DIR}/resources && \
|
||||
# wget --progress=dot:giga -O ${PUBLIC_DIR}/resources/${JRE_LINUX_PACKAGE} https://cdn.azul.com/zulu/bin/${JRE_LINUX_PACKAGE}
|
||||
|
||||
# Copy resource files to image
|
||||
COPY --chown=${EMS_USER}:${EMS_USER} bin ${BIN_DIR}
|
||||
|
@ -52,9 +52,9 @@ ENV PUBLIC_DIR ${BASEDIR}/public_resources
|
||||
|
||||
# Download a JRE suitable for running EMS clients, and
|
||||
# offer it for download
|
||||
ENV JRE_LINUX_PACKAGE zulu21.30.15-ca-jre21.0.1-linux_x64.tar.gz
|
||||
RUN mkdir -p ${PUBLIC_DIR}/resources && \
|
||||
wget --progress=dot:giga -O ${PUBLIC_DIR}/resources/${JRE_LINUX_PACKAGE} https://cdn.azul.com/zulu/bin/${JRE_LINUX_PACKAGE}
|
||||
#ENV JRE_LINUX_PACKAGE zulu21.30.15-ca-jre21.0.1-linux_x64.tar.gz
|
||||
#RUN mkdir -p ${PUBLIC_DIR}/resources && \
|
||||
# wget --progress=dot:giga -O ${PUBLIC_DIR}/resources/${JRE_LINUX_PACKAGE} https://cdn.azul.com/zulu/bin/${JRE_LINUX_PACKAGE}
|
||||
|
||||
# Copy resource files to image
|
||||
COPY --chown=${EMS_USER}:${EMS_USER} bin ${BIN_DIR}
|
||||
|
@ -94,7 +94,7 @@ public class PredictionsPostTranslationPlugin implements PostTranslationPlugin {
|
||||
}
|
||||
|
||||
HashMap<String,Object> result = new HashMap<>();
|
||||
result.put("name", "_" + translationContext.getModelName());
|
||||
result.put("name", translationContext.getAppId());
|
||||
result.put("operator", "OR");
|
||||
result.put("constraints", slos);
|
||||
result.put("version", topicBeacon.getModelVersion());
|
||||
@ -224,7 +224,7 @@ public class PredictionsPostTranslationPlugin implements PostTranslationPlugin {
|
||||
// Convert to SLO Severity-based Violation Detector Event Type III format
|
||||
// See: https://158.39.75.54/projects/nebulous-collaboration-hub/wiki/slo-severity-based-violation-detector
|
||||
HashMap<String,Object> payload = new HashMap<>();
|
||||
payload.put("name", "_" + _TC.getModelName());
|
||||
payload.put("name", _TC.getAppId());
|
||||
payload.put("version", topicBeacon.getModelVersion());
|
||||
payload.put("metric_list",
|
||||
metricsOfTopLevelNodes.stream().map(mc -> {
|
||||
|
@ -178,7 +178,8 @@ public class EmsBootInitializer extends AbstractExternalBrokerService implements
|
||||
}
|
||||
|
||||
private String getModelFile(String appId) {
|
||||
return String.format("model-%s--%d.yml", appId, System.currentTimeMillis());
|
||||
//return String.format("model-%s--%d.yml", appId, System.currentTimeMillis());
|
||||
return String.format("%s.yml", appId);
|
||||
}
|
||||
|
||||
private void storeModel(String fileName, String modelStr) throws IOException {
|
||||
|
@ -85,7 +85,7 @@ public class ShorthandsExpansionHelper {
|
||||
// ----- Expand Metric templates in Metric specifications -----
|
||||
List<Object> expandedTemplates = asList(ctx
|
||||
.read("$.spec.*.*.metrics.*[?(@.template)]", List.class)).stream()
|
||||
.filter(item -> JsonPath.read(item, "$.template") instanceof String)
|
||||
.filter(item -> JsonPath.read(item, "$.template") instanceof String s && StringUtils.isNotBlank(s))
|
||||
.peek(item -> expandTemplate(item, templateSpecs))
|
||||
.toList();
|
||||
log.debug("ShorthandsExpansionHelper: Templates expanded: {}", expandedTemplates);
|
||||
|
Loading…
x
Reference in New Issue
Block a user