Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ python/README.rst
/.venv
/site
report/
/python/.venv
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "^.secrets.baseline$",
"lines": null
},
"generated_at": "2025-10-24T12:47:22Z",
"generated_at": "2025-10-24T15:33:48Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -502,7 +502,7 @@
"hashed_secret": "2582aea6f911bd00fc04cb25e0ec16d5ead62068",
"is_secret": false,
"is_verified": false,
"line_number": 336,
"line_number": 342,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/provision-fyre.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Usage
- `--fyre-cluster-size FYRE_CLUSTER_SIZE` When Fyre Quick Burn, defines the size category ("medium" or "large")

### Storage Provisioner Configuration
- `--no-storage` Disable setup of the nfs-client storage class
- `--storage` Configure the storage provider (nfs, odf, or longhorn)
- `--nfs-image-registry-size FYRE_NFS_IMAGE_REGISTRY_SIZE` Defines the image registry storage size when configured to use NFS (default 100gb). The size allocated cannot be superior of storage available in the Fyre Infrastructure node.

### Other Commands
Expand Down
39 changes: 21 additions & 18 deletions image/cli/mascli/functions/provision_fyre
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Worker Node Configuration (Optional, only takes effect when quota-type is set to
--worker-additional-disks ${COLOR_YELLOW}FYRE_WORKER_ADDITIONAL_DISKS${TEXT_RESET} Comma-seperated list of sizes for additional disks to attach (e.g. "200,200" to attach two 400gb additional disks)

Storage Provisioner Configuration:
--storage ${COLOR_YELLOW}OCP_STORAGE_PROVIDER${TEXT_RESET} Choose optional storage provider (nfs, odf, or longhorn)
--nfs-image-registry-size ${COLOR_YELLOW}FYRE_NFS_IMAGE_REGISTRY_SIZE${TEXT_RESET} Defines the image registry storage size when configured to use NFS (default 100gb). The size allocated cannot be superior of storage available in the Fyre Infrastructure node.
--no-storage Disable setup of the nfs-client storage class

Other Commands:
--no-confirm Provision the cluster without prompting for confirmation
Expand All @@ -53,9 +53,6 @@ function provision_fyre_noninteractive() {
if [[ -z "$CLUSTER_PLATFORM" ]]; then
CLUSTER_PLATFORM=x
fi
if [[ -z "$FYRE_NFS_SETUP" ]]; then
FYRE_NFS_SETUP=true
fi

while [[ $# -gt 0 ]]
do
Expand Down Expand Up @@ -123,8 +120,8 @@ function provision_fyre_noninteractive() {
;;

# Storage Configuration
--no-storage)
FYRE_NFS_SETUP=false
--storage)
OCP_STORAGE_PROVIDER=$1 && shift
;;
--nfs-image-registry-size)
IMAGE_REGISTRY_STORAGE_SIZE=$1 && shift
Expand Down Expand Up @@ -275,13 +272,23 @@ function provision_fyre_interactive() {
fi
fi

prompt_for_confirm_default_yes "Enable NFS storage class (nfs-client) in the cluster?" CONFIGURE_NFS
if [[ "$CONFIGURE_NFS" == "false" ]]; then
export FYRE_NFS_SETUP=false
else
prompt_for_input "Image Registry PVC Size" FYRE_IMAGE_REGISTRY_SIZE "100Gi"
echo
echo "Storage Provider:"
echo " 1. None"
echo " 2. Longhorn"
echo " 3. NFS"
echo " 4. ODF"
prompt_for_input "Select the storage provider to setup" OCP_STORAGE_PROVIDER_SELECTION "1"

if [[ "$OCP_STORAGE_PROVIDER_SELECTION" == "1" ]]; then
OCP_STORAGE_PROVIDER=""
elif [[ "$OCP_STORAGE_PROVIDER_SELECTION" == "2" ]]; then
OCP_STORAGE_PROVIDER="longhorn"
elif [[ "$OCP_STORAGE_PROVIDER_SELECTION" == "3" ]]; then
OCP_STORAGE_PROVIDER="nfs"
elif [[ "$OCP_STORAGE_PROVIDER_SELECTION" == "4" ]]; then
OCP_STORAGE_PROVIDER="odf"
fi

}

function provision_fyre() {
Expand Down Expand Up @@ -324,8 +331,7 @@ function provision_fyre() {

export FYRE_CLUSTER_SIZE

export FYRE_NFS_SETUP
export FYRE_IMAGE_REGISTRY_SIZE
export OCP_STORAGE_PROVIDER

echo
reset_colors
Expand Down Expand Up @@ -362,10 +368,7 @@ function provision_fyre() {
reset_colors
echo "${TEXT_DIM}"
echo_h2 "Storage" " "
echo_reset_dim "Enable NFS Storage Class .. ${COLOR_MAGENTA}${FYRE_NFS_SETUP}"
if [[ "${FYRE_NFS_SETUP}" == "true" ]]; then
echo_reset_dim "Image Registry Size ....... ${COLOR_MAGENTA}${FYRE_NFS_IMAGE_REGISTRY_SIZE:-Default}"
fi
echo_reset_dim "Storage Provider ............ ${COLOR_MAGENTA}${OCP_STORAGE_PROVIDER}"

echo
reset_colors
Expand Down
3 changes: 2 additions & 1 deletion python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ dynClient = dynamic.DynamicClient(
)

# Install OpenShift Pipelines Operator
installOpenShiftPipelines(dynamicClient)
success = installOpenShiftPipelines(dynamicClient)
assert success is True

# Create the pipelines namespace and install the MAS tekton definitions
createNamespace(dynamicClient, pipelinesNamespace)
Expand Down
7 changes: 5 additions & 2 deletions python/src/mas/cli/aiservice/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,11 @@ def install(self, argv):
wait = False

with Halo(text='Validating OpenShift Pipelines installation', spinner=self.spinner) as h:
installOpenShiftPipelines(self.dynamicClient)
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator is installed and ready to use")
if installOpenShiftPipelines(self.dynamicClient):
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator is installed and ready to use")
else:
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator installation failed")
self.fatalError("Installation failed")

with Halo(text=f'Preparing namespace ({pipelinesNamespace})', spinner=self.spinner) as h:
createNamespace(self.dynamicClient, pipelinesNamespace)
Expand Down
7 changes: 5 additions & 2 deletions python/src/mas/cli/aiservice/upgrade/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,11 @@ def upgrade(self, argv):
pipelinesNamespace = f"aiservice-{aiserviceInstanceId}-pipelines"

with Halo(text='Validating OpenShift Pipelines installation', spinner=self.spinner) as h:
installOpenShiftPipelines(self.dynamicClient)
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator is installed and ready to use")
if installOpenShiftPipelines(self.dynamicClient):
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator is installed and ready to use")
else:
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator installation failed")
self.fatalError("Installation failed")

with Halo(text=f'Preparing namespace ({pipelinesNamespace})', spinner=self.spinner) as h:
createNamespace(self.dynamicClient, pipelinesNamespace)
Expand Down
1 change: 1 addition & 0 deletions python/src/mas/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# *****************************************************************************

import logging
import logging.handlers
import urllib3

from argparse import RawTextHelpFormatter
Expand Down
7 changes: 5 additions & 2 deletions python/src/mas/cli/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1263,8 +1263,11 @@ def install(self, argv):
pipelinesNamespace = f"mas-{self.getParam('mas_instance_id')}-pipelines"

with Halo(text='Validating OpenShift Pipelines installation', spinner=self.spinner) as h:
installOpenShiftPipelines(self.dynamicClient)
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator is installed and ready to use")
if installOpenShiftPipelines(self.dynamicClient):
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator is installed and ready to use")
else:
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator installation failed")
self.fatalError("Installation failed")

with Halo(text=f'Preparing namespace ({pipelinesNamespace})', spinner=self.spinner) as h:
createNamespace(self.dynamicClient, pipelinesNamespace)
Expand Down
10 changes: 5 additions & 5 deletions python/src/mas/cli/install/settings/db2Settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ def setDB2DefaultSettings(self) -> None:
self.params["db2_cpu_requests"] = "300m"

else:
self.setParam("db2_meta_storage_size", "20Gi")
self.setParam("db2_backup_storage_size", "100Gi")
self.setParam("db2_logs_storage_size", "100Gi")
self.setParam("db2_temp_storage_size", "100Gi")
self.setParam("db2_data_storage_size", "100Gi")
self.setParam("db2_meta_storage_size", "10Gi")
self.setParam("db2_backup_storage_size", "50Gi")
self.setParam("db2_logs_storage_size", "10Gi")
self.setParam("db2_temp_storage_size", "10Gi")
self.setParam("db2_data_storage_size", "50Gi")
7 changes: 5 additions & 2 deletions python/src/mas/cli/uninstall/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,11 @@ def uninstall(self, argv):
pipelinesNamespace = f"mas-{instanceId}-pipelines"

with Halo(text='Validating OpenShift Pipelines installation', spinner=self.spinner) as h:
installOpenShiftPipelines(self.dynamicClient)
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator is installed and ready to use")
if installOpenShiftPipelines(self.dynamicClient):
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator is installed and ready to use")
else:
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator installation failed")
self.fatalError("Installation failed")

with Halo(text=f'Preparing namespace ({pipelinesNamespace})', spinner=self.spinner) as h:
createNamespace(self.dynamicClient, pipelinesNamespace)
Expand Down
7 changes: 5 additions & 2 deletions python/src/mas/cli/update/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,11 @@ def update(self, argv):
pipelinesNamespace = "mas-pipelines"

with Halo(text='Validating OpenShift Pipelines installation', spinner=self.spinner) as h:
installOpenShiftPipelines(self.dynamicClient)
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator is installed and ready to use")
if installOpenShiftPipelines(self.dynamicClient):
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator is installed and ready to use")
else:
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator installation failed")
self.fatalError("Installation failed")

with Halo(text=f'Preparing namespace ({pipelinesNamespace})', spinner=self.spinner) as h:
createNamespace(self.dynamicClient, pipelinesNamespace)
Expand Down
8 changes: 6 additions & 2 deletions python/src/mas/cli/upgrade/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,12 @@ def upgrade(self, argv):
pipelinesNamespace = f"mas-{instanceId}-pipelines"

with Halo(text='Validating OpenShift Pipelines installation', spinner=self.spinner) as h:
installOpenShiftPipelines(self.dynamicClient)
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator is installed and ready to use")
successfullyInstalledPipelines = installOpenShiftPipelines(self.dynamicClient)
if successfullyInstalledPipelines:
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator is installed and ready to use")
else:
h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator installation failed")
self.fatalError("Installation failed")

with Halo(text=f'Preparing namespace ({pipelinesNamespace})', spinner=self.spinner) as h:
createNamespace(self.dynamicClient, pipelinesNamespace)
Expand Down
Loading