Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[minor] DRO installation using cli command #537

Merged
merged 55 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
a3d7546
Added changes for DRO install-uninstall
MrunaliniKankariya2 Sep 27, 2023
04d3bf5
[minor] Added changes for DRO install-uninstall
MrunaliniKankariya2 Sep 27, 2023
7d04b48
[minor] Added changes for DRO install-uninstall
MrunaliniKankariya2 Oct 3, 2023
7b6b71c
Merge branch 'dro-migration' of https://github.com/ibm-mas/cli into d…
MrunaliniKankariya2 Oct 3, 2023
57dd4f8
[minor] Merge branch 'dro-migration' of https://github.com/ibm-mas/cl…
MrunaliniKankariya2 Oct 3, 2023
b35481d
[minor] Merge branch 'dro-migration' of https://github.com/ibm-mas/cl…
MrunaliniKankariya2 Oct 3, 2023
93683f2
Merge branch 'master' into dro-migration
MrunaliniKankariya2 Oct 3, 2023
d09e7be
[minor] Added changes to test with Ansible changed branch
MrunaliniKankariya2 Oct 5, 2023
b4e1d92
[minor] Merge branch 'dro-migration' of https://github.com/ibm-mas/cl…
MrunaliniKankariya2 Oct 5, 2023
7bc8a78
[minor] changes for dro install
MrunaliniKankariya2 Oct 5, 2023
140849b
[minor] corrected git repo link
MrunaliniKankariya2 Oct 5, 2023
3066c08
[minor] Added pull secret toekn for DRO
MrunaliniKankariya2 Oct 5, 2023
5953e21
[minor] Added missing param defination for dro token
MrunaliniKankariya2 Oct 6, 2023
2336655
[minor] Added missing changes for DRO
MrunaliniKankariya2 Oct 9, 2023
3cf0557
[minor] Added dro_action flag
MrunaliniKankariya2 Oct 9, 2023
c6e51e5
[minor] Added a check for UDS presence during upgrade
MrunaliniKankariya2 Oct 9, 2023
b729348
[minor] install UDS on upgrade
MrunaliniKankariya2 Oct 11, 2023
8ee8930
Merge branch 'master' into dro-migration
MrunaliniKankariya2 Oct 13, 2023
964ec31
Updated to install UDS by default
MrunaliniKankariya2 Oct 16, 2023
1d55135
[minor] Updated to get user input for UDS/DRO
MrunaliniKankariya2 Oct 17, 2023
50aeffe
Merge branch 'master' into dro-migration
MrunaliniKankariya2 Oct 17, 2023
1117225
[minor] Added check to define task for uds or dro
MrunaliniKankariya2 Oct 20, 2023
285d568
Merge branch 'dro-migration' of https://github.com/ibm-mas/cli into d…
MrunaliniKankariya2 Oct 20, 2023
91e90f9
[minor] Added check to define task for uds or dro
MrunaliniKankariya2 Oct 20, 2023
8986af1
Merge branch 'master' into dro-migration
lokesh-sreedhara Oct 20, 2023
9774ee9
[patch] updated with default values
HariPalleti Oct 20, 2023
b1fe639
[patch] add entitlement key
HariPalleti Oct 20, 2023
74ed6e7
[patch] updated params
HariPalleti Oct 20, 2023
cf07863
Added check for supported MAS version for DRO
MrunaliniKankariya2 Oct 23, 2023
f2c6165
Merge branch 'dro-migration' of https://github.com/ibm-mas/cli into d…
MrunaliniKankariya2 Oct 23, 2023
4f75014
Documentation changes
MrunaliniKankariya2 Oct 23, 2023
4dd8100
Merge branch 'master' into dro-migration
MrunaliniKankariya2 Oct 23, 2023
ba0e9a8
Removed DRO catalog entry from previous catalogs
MrunaliniKankariya2 Oct 23, 2023
ea711f7
Merge branch 'dro-migration' of https://github.com/ibm-mas/cli into d…
MrunaliniKankariya2 Oct 23, 2023
24d85f2
[patch] added entitlement_key
HariPalleti Oct 23, 2023
4a68ee6
Merge branch 'dro-migration' of https://github.com/ibm-mas/cli into d…
HariPalleti Oct 23, 2023
ce39352
[patch[ set env var
HariPalleti Oct 23, 2023
11794b1
Updated to incorporate review comments
MrunaliniKankariya2 Oct 24, 2023
e9e2c53
Updated to incorporate review comments
MrunaliniKankariya2 Oct 24, 2023
753a3d4
Merge branch 'master' into dro-migration
MrunaliniKankariya2 Oct 24, 2023
fd0939d
[patch] empty commit
HariPalleti Oct 27, 2023
6989195
Merge branch 'master' into dro-migration
durera Oct 27, 2023
1e126ad
[patch] added dro envs
HariPalleti Oct 27, 2023
ad4e7a5
[patch] add dro params
HariPalleti Oct 27, 2023
386be58
Merge branch 'drofvt' into dro-migration
HariPalleti Oct 29, 2023
76aa70f
[patch] to connect story MASCORE-686
HariPalleti Oct 29, 2023
2c53836
[minor] Updated as per review for fvt test
MrunaliniKankariya2 Oct 30, 2023
89071ec
[patch] updated to uds
HariPalleti Oct 30, 2023
8b11c88
[patch] updated dro_action
HariPalleti Oct 30, 2023
d800821
Merge branch 'master' into dro-migration
whitfiea Oct 31, 2023
c64334c
Merge branch 'dro-fvt-test' into dro-migration
HariPalleti Oct 31, 2023
68eb17d
Incorporated review comments
MrunaliniKankariya2 Oct 31, 2023
5287306
Merge branch 'master' into dro-migration
MrunaliniKankariya2 Nov 3, 2023
de0c7cb
Merge branch 'master' into dro-migration
lokesh-sreedhara Nov 6, 2023
6b1b7d4
Merge branch 'master' into dro-migration
durera Nov 7, 2023
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: 0 additions & 1 deletion docs/catalogs/v8-220717-amd64.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ IBM Maximo Application Suite will run anywhere that you can run a supported Open
- User Data Services (UDS) is supported on Linux® x86_64 and OpenShift Container Platform versions 4.6, 4.7 and 4.8 only.
- DB2, which is installed with ibm-db2u-operator, is supported on OpenShift Container Platform versions 4.6, 4.7, 4.8, and 4.9 only.


Manifest
-------------------------------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion docs/catalogs/v8-221025-amd64.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ IBM Maximo Application Suite will run anywhere that you can run a supported Open
- User Data Services (UDS) is supported on Linux® x86_64 and OpenShift Container Platform versions 4.6-4.10 only.
- DB2, which is installed with ibm-db2u-operator, is supported on OpenShift Container Platform versions 4.6-4.9 only.


Manifest
-------------------------------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion docs/catalogs/v8-221129-amd64.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ IBM Maximo Application Suite will run anywhere that you can run a supported Open
- User Data Services (UDS) is supported on Linux® x86_64 and OpenShift Container Platform versions 4.6-4.10 only.
- DB2, which is installed with ibm-db2u-operator, is supported on OpenShift Container Platform versions 4.6-4.9 only.


Manifest
-------------------------------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion docs/catalogs/v8-221228-amd64.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ IBM Maximo Application Suite will run anywhere that you can run a supported Open
- User Data Services (UDS) is supported on Linux® x86_64 and OpenShift Container Platform versions 4.8-4.10 only.
- DB2, which is installed with ibm-db2u-operator, is supported on OpenShift Container Platform versions 4.8 and 4.10 only.


Manifest
-------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/commands/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ Provide your license ID and the location of your license file.


### Step 19. Configure UDS
Maximo Application Suite's required integration with IBM User Data Services requires your e-mail address and first/last name be provided.
Maximo Application Suite's required integration with either IBM User Data Services OR IBM Data Reporter Operator requires your e-mail address and first/last name be provided.


### Step 20. Prepare Installation
Expand Down
17 changes: 17 additions & 0 deletions image/cli/mascli/functions/catalog_utils
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,23 @@ function choose_mas_version() {
esac
}

# Determine whether UDS or DRO Operator to use
# -----------------------------------------------------------------------------
# We automatically select the UDS or DRO operator to install in the
# cluster based on the version of the catalog that is being used
# TODO: Need to know the latest catalog version name
function uds_dro_selection() {
case $MAS_CATALOG_VERSION in
# UDS/DRO selection
# -------------------------------------------------------------------------
v8-240111-amd64)
BAS_PROVIDER="DRO"
;;
*)
BAS_PROVIDER="UDS" # The default channel will be used
;;
esac
}

# Determine the version of Db2u Operator to use
# -----------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions image/cli/mascli/functions/install
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ function install_noninteractive() {
NON_INTERACTIVE=true
DEV_MODE=false
LICENSE_ACCEPTED=false
BAS_PROVIDER=UDS

# Defaults
DB2_ACTION_SYSTEM=none
Expand Down
10 changes: 10 additions & 0 deletions image/cli/mascli/functions/mirror_to_registry
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Content Selection (Cloud Pak for Data):
Content Selection (Other Dependencies):
--mirror-cfs Mirror images for IBM Cloud Pak Foundation Services
--mirror-uds Mirror images for IBM User Data Services
--mirror-dro Mirror images for IBM Data Reporter Operator
--mirror-sls Mirror images for IBM Suite License Service
--mirror-tsm Mirror images for IBM Truststore Manager
--mirror-mongo Mirror images for MongoDb Community Edition
Expand Down Expand Up @@ -84,6 +85,7 @@ function mirror_to_registry_noninteractive() {
MIRROR_CATALOG=false
MIRROR_COMMONSERVICES=false
MIRROR_UDS=false
MIRROR_DRO=false
MIRROR_SLS=false
MIRROR_TRUSTSTOREMGR=false
MIRROR_MONGOCE=false
Expand Down Expand Up @@ -188,6 +190,9 @@ function mirror_to_registry_noninteractive() {
--mirror-uds)
MIRROR_UDS=true
;;
--mirror-dro)
MIRROR_DRO=true
;;
--mirror-sls)
MIRROR_SLS=true
;;
Expand Down Expand Up @@ -324,6 +329,7 @@ function mirror_to_registry_interactive() {
MIRROR_CATALOG=true
MIRROR_COMMONSERVICES=true
MIRROR_UDS=true
MIRROR_DRO=true
MIRROR_SLS=true
MIRROR_TRUSTSTOREMGR=true
MIRROR_MONGOCE=true
Expand Down Expand Up @@ -351,6 +357,7 @@ function mirror_to_registry_interactive() {

prompt_for_confirm_default_yes "IBM Foundational Services" MIRROR_COMMONSERVICES
prompt_for_confirm_default_yes "IBM User Data Services" MIRROR_UDS
prompt_for_confirm_default_yes "IBM Data Reporter Operator" MIRROR_DRO
prompt_for_confirm_default_yes "IBM Suite License Service" MIRROR_SLS
prompt_for_confirm_default_yes "IBM Truststore Manager" MIRROR_TRUSTSTOREMGR
prompt_for_confirm_default_yes "MongoDb Community Edition" MIRROR_MONGOCE
Expand Down Expand Up @@ -430,6 +437,7 @@ function mirror_to_registry() {
export MIRROR_CATALOG
export MIRROR_COMMONSERVICES
export MIRROR_UDS
export MIRROR_DRO
export MIRROR_SLS
export MIRROR_TRUSTSTOREMGR
export MIRROR_MONGOCE
Expand All @@ -451,6 +459,7 @@ function mirror_to_registry() {
if [[ "$MIRROR_CATALOG" == true ||
"$MIRROR_COMMONSERVICES" == true ||
"$MIRROR_UDS" == true ||
"$MIRROR_DRO" == true ||
"$MIRROR_SLS" == true ||
"$MIRROR_TRUSTSTOREMGR" == true ||
"$MIRROR_MONGOCE" == true ||
Expand Down Expand Up @@ -526,6 +535,7 @@ function mirror_to_registry() {
echo_h4 "Content Selection (Other Dependencies)" " "
show_mirror_status "IBM Cloud Pak Foundation Services ..." $MIRROR_COMMONSERVICES
show_mirror_status "IBM User Data Services .............." $MIRROR_UDS
show_mirror_status "IBM Data Reporter Oerator ..........." $MIRROR_DRO
show_mirror_status "IBM Suite License Service ..........." $MIRROR_SLS
show_mirror_status "IBM Truststore Manager .............." $MIRROR_TRUSTSTOREMGR
show_mirror_status "MongoDb Community Edition ..........." $MIRROR_MONGOCE
Expand Down
6 changes: 5 additions & 1 deletion image/cli/mascli/functions/pipeline_config
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,13 @@ function pipeline_config() {
SLS_ENTITLEMENT_FILE="/workspace/entitlement/$(basename $SLS_LICENSE_FILE_LOCAL)"
fi

echo
# Check for DRO support in MAS
# ---------------------------------------------------------------------------
echo ""
uds_dro_selection
echo_h2 "Configure UDS"
prompt_for_input "UDS Contact Email" UDS_CONTACT_EMAIL
prompt_for_input "UDS Contact First Name" UDS_CONTACT_FIRSTNAME
prompt_for_input "UDS Contact Last Name" UDS_CONTACT_LASTNAME

}
9 changes: 9 additions & 0 deletions image/cli/mascli/functions/uninstall
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ function deps_prompt_conditions() {
false
fi
;;
DRO_ACTION)
if [[ ${IBM_CATALOGS_ACTION} == "uninstall" ]] || [[ ${COMMON_SERVICES_ACTION} == "uninstall" ]]; then
true
else
false
fi
;;
CERT_MANAGER_ACTION)
if [[ ${IBM_CATALOGS_ACTION} == "uninstall" ]] || [[ ${COMMON_SERVICES_ACTION} == "uninstall" ]]; then
true
Expand Down Expand Up @@ -132,6 +139,7 @@ function prompt_for_deps_to_uninstall() {
validate_action_param "Uninstall IBM Common Services?" COMMON_SERVICES_ACTION
validate_action_param "Uninstall IBM Cert Manager?" CERT_MANAGER_ACTION
validate_action_param "Uninstall IBM User Data Services?" UDS_ACTION
validate_action_param "Uninstall IBM Data Reporter Operator?" DRO_ACTION
validate_action_param "Uninstall MongoDB?" MONGODB_ACTION
validate_action_param "Uninstall IBM Suite Licensing Service?" SLS_ACTION
}
Expand All @@ -156,6 +164,7 @@ function review_uninstall_settings() {
echo_reset_dim "IBM Common Services ............. Action: ${COLOR_MAGENTA}${COMMON_SERVICES_ACTION}"
echo_reset_dim "IBM Cert Manager ................ Action: ${COLOR_MAGENTA}${CERT_MANAGER_ACTION}"
echo_reset_dim "IBM User Data Services .......... Action: ${COLOR_MAGENTA}${UDS_ACTION}"
echo_reset_dim "IBM Data Reporter Operator....... Action: ${COLOR_MAGENTA}${DRO_ACTION}"
echo_reset_dim "MongoDB ......................... Action: ${COLOR_MAGENTA}${MONGODB_ACTION}"
echo_reset_dim "IBM Suite Licensing Service ..... Action: ${COLOR_MAGENTA}${SLS_ACTION}"

Expand Down
16 changes: 16 additions & 0 deletions image/cli/mascli/functions/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,22 @@ function upgrade() {
# Replace ALL environment variables in templates
eval "echo \"$(cat $CLI_DIR/templates/pipelinerun-upgrade.yaml)\"" > $CONFIG_DIR/pipelinerun-$MAS_INSTANCE_ID-upgrade.yaml

# Check for UDS presence
SUBNAME=$(oc get subscription ibm-user-data-services-operator -n ibm-common-services --no-headers | awk -F" " {'print $1'})
#echo $SUBNAME
UDS=ibm-user-data-services-operator
if [[ "$SUBNAME" == "$UDS" ]]; then
#echo "UDS Installed"
uninstallUDS=y
DRO_ACTION="install"
prompt_for_input "UDS installation exist, do you want to unistall UDS and install DRO (y/N)" uninstallUDS
if [[ "$uninstallUDS" == "y" ]]; then
UDS_ACTION="uninstall"
fi
else
echo "UDS not installed"
fi

# Start pipeline execution
oc -n mas-$MAS_INSTANCE_ID-pipelines create -f $CONFIG_DIR/pipelinerun-$MAS_INSTANCE_ID-upgrade.yaml &>> $LOGFILE || exit 1
echo -e "${COLOR_GREEN}Upgrade started successfully${COLOR_RESET}"
Expand Down
5 changes: 5 additions & 0 deletions image/cli/mascli/templates/pipelinerun-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ spec:
- name: uds_action
value: '$UDS_ACTION'

# Dependencies - DRO (Required, no defaults)
# -------------------------------------------------------------------------
- name: dro_action
value: '$DRO_ACTION'

# Dependencies - AppConnect
# -------------------------------------------------------------------------
- name: appconnect_entitlement_username
Expand Down
2 changes: 2 additions & 0 deletions image/cli/mascli/templates/pipelinerun-uninstall.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ spec:
value: "$SLS_ACTION"
- name: uds_action
value: "$UDS_ACTION"
- name: dro_action
value: "$DRO_ACTION"
1 change: 1 addition & 0 deletions tekton/generate-tekton-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
- sls
- turbonomic
- uds
- dro

# 3. Generate Tasks (FVT)
# -------------------------------------------------------------------------
Expand Down
11 changes: 10 additions & 1 deletion tekton/src/params/install.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -240,20 +240,29 @@
# -----------------------------------------------------------------------------
- name: uds_contact_email
type: string
default: ""
- name: uds_contact_firstname
type: string
default: ""
- name: uds_contact_lastname
type: string
default: ""
- name: uds_event_scheduler_frequency
type: string
default: ""
- name: uds_action
type: string
default: "install"
default: ""
- name: mas_segment_key
type: string
default: ""

# Dependencies - DRO
# -----------------------------------------------------------------------------
- name: dro_action
type: string
default: ""

# Dependencies - AppConnect
# -----------------------------------------------------------------------------
{{ lookup('template', params_src_dir ~ '/install-appconnect.yml.j2') }}
Expand Down
5 changes: 5 additions & 0 deletions tekton/src/pipelines/fvt-manage-regr.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ spec:
runAfter:
- common-services

# 2.6 DRO
{{ lookup('template', 'taskdefs/dependencies/dro.yml.j2') | indent(4) }}
runAfter:
- common-services


# 3. Other Dependecies
# -------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions tekton/src/pipelines/install-with-fvt.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ spec:
runAfter:
- common-services

# 2.6 DRO
{{ lookup('template', 'taskdefs/dependencies/dro.yml.j2') | indent(4) }}
runAfter:
- common-services

# 3. Cloud Pak for Data
# -------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions tekton/src/pipelines/install.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ spec:
runAfter:
- common-services

# 2.6 DRO
{{ lookup('template', 'taskdefs/dependencies/dro.yml.j2') | indent(4) }}
runAfter:
- common-services

# 3. Cloud Pak for Data
# -------------------------------------------------------------------------
Expand Down
34 changes: 34 additions & 0 deletions tekton/src/pipelines/taskdefs/dependencies/dro.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
- name: dro
params:
{{ lookup('template', 'taskdefs/common/cli-params.yml.j2') | indent(4) }}
- name: devops_suite_name
value: dependencies-dro

- name: mas_instance_id
value: $(params.mas_instance_id)

- name: dro_action
value: "$(params.dro_action)"

- name: dro_contact_email
value: "$(params.uds_contact_email)"
- name: dro_contact_firstname
value: "$(params.uds_contact_firstname)"
- name: dro_contact_lastname
value: "$(params.uds_contact_lastname)"
- name: custom_labels
value: $(params.custom_labels)
- name: ibm_entitlement_key
value: $(params.ibm_entitlement_key)
when:
- input: "$(params.dro_action)"
operator: in
values: ["install"]
taskRef:
kind: Task
name: mas-devops-dro
workspaces:
- name: configs
workspace: shared-configs
- name: pod-templates
workspace: shared-pod-templates
6 changes: 4 additions & 2 deletions tekton/src/pipelines/taskdefs/dependencies/uds.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

- name: uds_action
value: "$(params.uds_action)"

- name: uds_contact_email
value: "$(params.uds_contact_email)"
- name: uds_contact_firstname
Expand All @@ -20,11 +19,14 @@
value: "$(params.uds_event_scheduler_frequency)"
- name: uds_storage_class
value: $(params.storage_class_rwo)

- name: mas_segment_key
value: $(params.mas_segment_key)
- name: custom_labels
value: $(params.custom_labels)
when:
- input: "$(params.uds_action)"
operator: in
values: ["install"]
taskRef:
kind: Task
name: mas-devops-uds
Expand Down
21 changes: 21 additions & 0 deletions tekton/src/pipelines/uninstall.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ spec:
type: string
description: Optional. Used to uninstall UDS
default: "none"
- name: dro_action
type: string
description: Optional. Used to uninstall DRO
default: "none"

tasks:
# Content
Expand Down Expand Up @@ -308,6 +312,23 @@ spec:
runAfter:
- uninstall-mongodb

# 4. Uninstall Data Reporter Operator
# -------------------------------------------------------------------------
- name: uninstall-dro
params:
- name: image_pull_policy
value: $(params.image_pull_policy)
- name: dro_action
value: $(params.dro_action)
taskRef:
kind: Task
name: mas-devops-dro
when:
- input: "$(params.dro_action)"
operator: in
values: ["uninstall"]
runAfter:
- uninstall-mongodb

# 6. Uninstall IBM Cert Manager
# -------------------------------------------------------------------------
Expand Down
Loading