blob: 069a446a2436a416b01429ef4b9e046776c2f875 [file] [log] [blame]
garciadeblascf603f52025-06-04 11:57:28 +02001#!/bin/bash
2#######################################################################################
3# Copyright ETSI Contributors and Others.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14# implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#######################################################################################
18
19set -e
20
21HERE=$(dirname "$(readlink --canonicalize "$BASH_SOURCE")")
22source "${HERE}/../library/functions.sh"
23source "${HERE}/../library/trap.sh"
24source "${HERE}/../library/logging"
25source "${HERE}/../library/track"
26
27# Saves locally to local environment at OSM home dir folder
28m "Saving local enviroment to OSM_HOME_DIR folder..."
29
30OSM_HOME_DIR=${OSM_HOME_DIR:-"$HOME/.osm"}
31mkdir -p "${OSM_HOME_DIR}"
32
33cat << EOF > "${OSM_HOME_DIR}/user-install-options.rc"
34export ASSUME_YES=${ASSUME_YES}
35export APT_PROXY_URL=${APT_PROXY_URL}
36export K8S_CLUSTER_ENGINE=${K8S_CLUSTER_ENGINE}
37export DEBUG_INSTALL=${DEBUG_INSTALL}
38export RELEASE=${RELEASE}
garciadeblascf603f52025-06-04 11:57:28 +020039export INSTALL_AUX_CLUSTER=${INSTALL_AUX_CLUSTER}
40export INSTALL_MGMT_CLUSTER=${INSTALL_MGMT_CLUSTER}
41export OSM_NAMESPACE=${OSM_NAMESPACE}
42export OSM_HELM_RELEASE=${OSM_HELM_RELEASE}
43export OSM_DOCKER_TAG=${OSM_DOCKER_TAG}
44export DOCKER_USER=${DOCKER_USER}
45export DOCKER_REGISTRY_USER=${DOCKER_REGISTRY_USER}
46export DOCKER_REGISTRY_PASSWORD=${DOCKER_REGISTRY_PASSWORD}
47export DOCKER_REGISTRY_URL=${DOCKER_REGISTRY_URL}
48export DOCKER_PROXY_URL=${DOCKER_PROXY_URL}
garciadeblas0b1c75c2025-11-11 23:04:39 +010049export MODULES_FOR_TESTING=${MODULES_FOR_TESTING}
garciadeblascf603f52025-06-04 11:57:28 +020050export MODULE_DOCKER_TAG=${MODULE_DOCKER_TAG}
51export OSM_CLIENT_VERSION=${OSM_CLIENT_VERSION}
52export OSM_IM_VERSION=${OSM_IM_VERSION}
53export OSM_HOME_DIR=${OSM_HOME_DIR}
54export CREDENTIALS_DIR="${OSM_HOME_DIR}/.credentials"
55export WORK_REPOS_DIR="${OSM_HOME_DIR}/repos"
56export INSTALL_MINIO=${INSTALL_MINIO}
57export KUBECONFIG_AUX_CLUSTER=${KUBECONFIG_AUX_CLUSTER}
58export KUBECONFIG_MGMT_CLUSTER=${KUBECONFIG_MGMT_CLUSTER}
59export KUBECONFIG_OSM_CLUSTER=${KUBECONFIG_OSM_CLUSTER}
60export OSM_BEHIND_PROXY=${OSM_BEHIND_PROXY}
garciadeblas8a28f6d2025-06-11 11:11:56 +020061export OPENSHIFT_MGMT_CLUSTER=${OPENSHIFT_MGMT_CLUSTER}
62export MGMT_CLUSTER_CA_FILE=${MGMT_CLUSTER_CA_FILE}
garciadeblas0df99ed2025-09-09 14:00:42 +020063export OSM_BASE_DOMAIN=${OSM_BASE_DOMAIN}
garciadeblas578ac922025-09-08 17:17:23 +020064export OSM_HELM_TIMEOUT=${OSM_HELM_TIMEOUT}
garciadeblasb89a41f2025-09-09 13:07:50 +020065export OSM_CLUSTER_INGRESS_CLASS=${OSM_CLUSTER_INGRESS_CLASS}
66export AUX_CLUSTER_INGRESS_CLASS=${AUX_CLUSTER_INGRESS_CLASS}
garciadeblascf603f52025-06-04 11:57:28 +020067EOF
68
garciadeblas31dd8bb2025-07-08 14:54:24 +020069cat "${OSM_HOME_DIR}/user-install-options.rc"
70
garciadeblascf603f52025-06-04 11:57:28 +020071m "Done."
72echo