# Update IAM Web Server URL in FCI System Properties
# Login as super user in FCI Kubernetes Master host (ex. 901 in SQA)
# Export current Kubernetes Config Map and save it as backup

cd /u01/fci-exports/fci-primaryds/scripts

kubectl get cm -o yaml > configmap-orig.yaml

cp configmap-orig.yaml configmap-iam.yaml

# Edit config map and change MQ and Solution ser
vi configmap-iam.yaml 

# in the yaml file locate the following entries and change them as shown
# Dev URL is shown in this example. Enter the appropriate environment url: ex. sqa.ccrs.DOMAIN.EXT, preprod.ccrs.DOMAIN.EXT
com_fci_mq_server: dev.ccrs.DOMAIN.EXT

com_fci_solution_server_rest_url: https://dev.ccrs.DOMAIN.EXT/

# Update the config map changes
kubectl apply -f configmap-iam.yaml 

# Delete Solution pod for the changes to take effect
kubectl delete pod $(kubectl get pods|grep fci-solution|awk '{print $1}')

# Wait for the pod to initialize 
# Login in to WFT URL https://dev.ccrs.DOMAIN.EXT/console (change the URL according to the environment you are in)
# and make sure the pages are displayed correctly

# login to the WFT URL as admin (Switch Role if you are already logged in)
# Go to System Properties menu
# locate the following property and make sure it is set correctly
CF.REST.APPSERVER.URL   (should be set to https://dev.ccrs.DOMAIN.EXT/ or the current environment as appropriate)