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
36 changes: 34 additions & 2 deletions omnia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
YELLOW='\033[0;33m'
omnia_release=2.0.0.0
omnia_release=2.1.0.0

core_container_status=false
omnia_path=""
Expand Down Expand Up @@ -925,9 +925,10 @@ start_container_session() {
}

show_help() {
echo "Usage: $0 [--install | --uninstall | --help]"
echo "Usage: $0 [--install | --uninstall | --version | --help]"
echo " -i, --install Install and start the Omnia core container"
echo " -u, --uninstall Uninstall the Omnia core container and clean up configuration"
echo " -v, --version Display Omnia version information"
echo " -h, --help More information about usage"
}

Expand Down Expand Up @@ -1110,6 +1111,34 @@ install_omnia_core() {
fi
}

# Check if Omnia core container is running
check_container_status() {
# Check if the Omnia core container is running
if ! podman ps --format '{{.Names}}' | grep -qw "omnia_core"; then
echo -e "${RED}ERROR: Omnia core container is not running.${NC}"
exit 1
fi
}

# Function to display version information
display_version() {
# Check if metadata file exists and Omnia core container is running
check_container_status

# Fetch the metadata from the oim_metadata.yml file in the container
echo -e "${GREEN} Fetching metadata from omnia_core container...${NC}"
core_config=$(podman exec omnia_core /bin/bash -c 'cat /opt/omnia/.data/oim_metadata.yml')

# Extract Omnia version from metadata file
omnia_version=$(echo "$core_config" | grep "omnia_version:" | cut -d':' -f2 | tr -d ' \t\n\r')

# Display version information
echo "Omnia version: $omnia_version"

# Return exit code 0 on success
exit 0
}

# Main function to check if omnia_core container is already running.
# If yes, ask the user if they want to enter the container or reinstall.
# If no, set it up.
Expand All @@ -1121,6 +1150,9 @@ main() {
--uninstall|-u)
cleanup_omnia_core
;;
--version|-v)
display_version
;;
--help|-h|"")
show_help
;;
Expand Down
17 changes: 17 additions & 0 deletions upgrade/ansible.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[defaults]
log_path = /opt/omnia/log/core/playbooks/upgrade.log
remote_tmp = /opt/omnia/tmp/.ansible/tmp/
host_key_checking = false
forks = 5
timeout = 180
executable = /bin/bash
library = ../common/library/modules
module_utils = ../common/library/module_utils

[persistent_connection]
command_timeout = 180
connect_timeout = 180

[ssh_connection]
retries = 3
ssh_args = -o ControlMaster=auto -o ControlPersist=60 -o ConnectTimeout=60
14 changes: 14 additions & 0 deletions upgrade/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
14 changes: 14 additions & 0 deletions upgrade/roles/import_input_parameters/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
14 changes: 14 additions & 0 deletions upgrade/roles/import_input_parameters/templates/network_spec.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

14 changes: 14 additions & 0 deletions upgrade/roles/import_input_parameters/vars/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
18 changes: 18 additions & 0 deletions upgrade/roles/upgrade_cluster/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---

- name: Include import input parameters
ansible.builtin.include_role:
name: import_input_parameters
14 changes: 14 additions & 0 deletions upgrade/roles/upgrade_cluster/vars/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
18 changes: 18 additions & 0 deletions upgrade/roles/upgrade_oim/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---

- name: Include import input parameters
ansible.builtin.include_role:
name: import_input_parameters
14 changes: 14 additions & 0 deletions upgrade/roles/upgrade_oim/vars/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
20 changes: 20 additions & 0 deletions upgrade/upgrade_cluster.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---

- name: Upgrade cluster tasks
hosts: localhost
connection: local
roles:
- role: upgrade_cluster
20 changes: 20 additions & 0 deletions upgrade/upgrade_oim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---

- name: Upgrade OIM tasks
hosts: localhost
connection: local
roles:
- role: upgrade_oim
20 changes: 20 additions & 0 deletions upgrade/upgrade_omnia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---

- name: Upgrade OIM tasks
ansible.builtin.import_playbook: upgrade_oim.yml

- name: Upgrade cluster tasks
ansible.builtin.import_playbook: upgrade_cluster.yml