Remove T3/T3S Configuration

Remove the custom T3/T3S channels and their NodePort services from the Administration Server and managed servers.

The managed-server steps remove the custom channels created in Expose T3/T3S for Managed Servers.

Administration Server

  1. Create t3_admin_delete.py with the following content:
    admin_pod_name = sys.argv[1]
                            admin_port = sys.argv[2]
                            user_name = sys.argv[3]
                            password = sys.argv[4]
                            AdminServerName = sys.argv[5]
                            channelType = sys.argv[6]
                            print('custom admin_pod_name : [%s]' % admin_pod_name);
                            print('custom admin_port : [%s]' % admin_port);
                            print('custom user_name : [%s]' % user_name);
                            print('custom password : ********');
                            connect(user_name, password, 't3://' + admin_pod_name + ':' + admin_port)
                            edit()
                            startEdit()
                            cd('/')
                            cd('Servers/%s/' % AdminServerName )
                            if channelType == 't3':
                            delete('T3Channel_AS','NetworkAccessPoint')
                            elif channelType == 't3s':
                            delete('T3SChannel_AS','NetworkAccessPoint')
                            else:
                            print('channelType [%s] not supported',channelType)
                            activate()
                            disconnect()
                        
  2. Copy t3_admin_delete.py to the domain home in the Administration Server pod.

    For example, copy the script to /u01/oracle/user_projects/domains/soainfra in the soainfra-adminserver pod in the soans namespace:

    kubectl cp t3_admin_delete.py soans/soainfra-adminserver:/u01/oracle/user_projects/domains/soainfra
                        
  3. Use kubectl exec to run wlst.sh t3_admin_delete.py in the Administration Server pod.

    Use the following command syntax:

    kubectl exec -it <Administration Server pod> -n <namespace> -- /u01/oracle/oracle_common/common/bin/wlst.sh  <domain_home>/t3_admin_delete.py <Administration Server pod>  <Administration Server port>  weblogic <password for weblogic> <AdminServerName> <protocol t3 or t3s>
                        

    The following example uses these parameter values:

    admin_pod_name
    soainfra-adminserver: The Administration Server pod.
    admin_port
    7001: The Administration Server port.
    user_name
    weblogic.
    password
    Welcome1: The example WebLogic password.
    AdminServerName
    AdminServer: The Administration Server name.
    channelType
    t3: The channel protocol.
    kubectl exec -it soainfra-adminserver -n soans -- /u01/oracle/oracle_common/common/bin/wlst.sh /u01/oracle/user_projects/domains/soainfra/t3_admin_delete.py soainfra-adminserver 7001 weblogic Welcome1 AdminServer t3
                        
  4. Delete the NodePort service for port 30014:
    kubectl delete -f t3_admin_svc.yaml
                        

Managed servers

  1. Create t3_ms_delete.py with the following content:
    admin_pod_name = sys.argv[1]
                            admin_port = sys.argv[2]
                            user_name = sys.argv[3]
                            password = sys.argv[4]
                            managedNameBase = sys.argv[5]
                            ms_count = sys.argv[6]
                            channelType = sys.argv[7]
                            print('custom host : [%s]' % admin_pod_name);
                            print('custom port : [%s]' % admin_port);
                            print('custom user_name : [%s]' % user_name);
                            print('custom password : ********');
                            connect(user_name, password, 't3://' + admin_pod_name + ':' + admin_port)
                            edit()
                            startEdit()
                            for index in range(0, int(ms_count)):
                            cd('/')
                            msIndex = index+1
                            cd('/')
                            name = '%s%s' % (managedNameBase, msIndex)
                            cd('Servers/%s/' % name )
                            if channelType == 't3':
                            delete('T3Channel_MS','NetworkAccessPoint')
                            elif channelType == 't3s':
                            delete('T3SChannel_MS','NetworkAccessPoint')
                            else:
                            print('Protocol [%s] not supported' % channelType)
                            activate()
                            disconnect()
                        
  2. Copy t3_ms_delete.py to the domain home in the Administration Server pod.

    For example, copy the script to /u01/oracle/user_projects/domains/soainfra in the soainfra-adminserver pod in the soans namespace:

    kubectl cp t3_ms_delete.py soans/soainfra-adminserver:/u01/oracle/user_projects/domains/soainfra
                        
  3. Use kubectl exec to run wlst.sh t3_ms_delete.py in the Administration Server pod.

    Use the following command syntax:

    kubectl exec -it <Administration Server pod> -n <namespace> -- /u01/oracle/oracle_common/common/bin/wlst.sh  <domain_home>/t3_ms_delete.py <Administration Server pod>  <Administration Server port>  weblogic <password for weblogic> <t3 port on Managed Server> <t3 nodeport> <master_ip> <managedNameBase> <ms_count> <channelType t3 or t3s>
                        

    The following example uses these parameter values:

    admin_pod_name
    soainfra-adminserver: The Administration Server pod.
    admin_port
    7001: The Administration Server port.
    user_name
    weblogic.
    password
    Welcome1: The example WebLogic password.
    managedNameBase
    soa_server: The managed server base name. For osb_cluster, use osb_server.
    ms_count
    5: The number of configured managed servers.
    channelType
    t3: The channel protocol. Use t3 or t3s.
    kubectl exec -it soainfra-adminserver -n soans -- /u01/oracle/oracle_common/common/bin/wlst.sh /u01/oracle/user_projects/domains/soainfra/t3_ms_delete.py soainfra-adminserver 7001 weblogic Welcome1 soa_server 5 t3
                        
  4. Delete the NodePort service for port 30016 (or the NodePort used when creating the Kubernetes service):
    kubectl delete -f t3_ms_svc.yaml