Wednesday 30 April 2014

UCCX7 db write in MYSQL

By default, the user that is used to connect remotely to MYSQL server is only allowed to use “select” query.
To update or insert values to the database, we have to change the privileges of the user.
Click the user that is currently used for connection. Add update and insert rights for modification of the specific DB
Back to script editor, drag db_write set to the editing panel.  In the test tab, try the below sql command to insert an entry of data
INSERT INTO `books`.`books` (`BOOK_ID`, `BOOK_NAME`, `AUTHOR_NAME`, `BOOK_ISBN`, `PUBLISH_YEAR`) VALUES ('12349', 'HELLO PYTHON', 'GEORGIAN', '6458958', '2008');
It will return Boolean value = 1 to tell you that this command is okay to running

In the SQL tab, put the insert command
Test this script
After testing, go back to MYSQL server to check if a new entry is added







The Migration Steps from CUCM7.1.5(MCS) to CUCM10.0(Exsi)

This is a migration from CUCM7.1.5(MCS server) to CUCM10(EXSI)

The prerequisites before the change:

  1. Please make sure if the current the version of CUCM is able to be upgraded to 10.0. The document: “Cisco Unified Communications Manager Software Compatibility Matrix”
  2. Note the latest version of CUCM (10.0) is not available in mentioned document. Please check another document here:
“Compatibility Information Cisco Unified Communications Manager 10.x”
  1. Download the attachment from “Upgrading Cisco Unified Communications Manager (CUCM) to Version 9.1 (Drive to 9)”


Detail steps of upgrading:
1.
In the OS management page, click show > software , and then download all active firmwares

2.
Build DRS backup for current version (CUCM 7.1.5)

3.
Install a brand-new CUCM7.1.5 in virtual machine. Btw install image is able to be download from cisco, and make it bootable.

Note: to make sure backup file is recoverable after imported, there are following settings that is needed to be the same:
  1. Ip address
  2. Hostname
  3. NTP server
  4. Two administration passwords – login configurations web, and one is for os.
  5. Password for database

4.
Install all firmware that downloaded from MCS to the CUCM in the virtual machine

5.
Restore DRS in the CUCM in the virtual machine

6.
Install ciscocm.refresh_upgrade_v1.3.cop.sgn in CUCM , the version is at least V1.2 or above

Note: this is mandatory install file for upgrading

Note:
  1. This is a document for upgrading between “restricted” version. If you have “unrestricted” version, there is a need to install different files.
  2. We use restricted version very often. But how do we recognize if it is a restricted or unrestricted version?:
    1. unrestricted version,
it will announce it’s an unrestricted version after red line .
    1. also, the name of install image will tell you it’s an unrestricted version




7.
Update version to CUCM10 in virtual machine.
Because of a big leap of migration, the console screen on the server will turn into blue background rather than the process of web upgrading. It will take roughly three and a half hours to upgrading.

Note:
When upgrading, SFTP server is needed. if the path, username and password are correct, upgrade file is unable to find. It’s could be the wrong file name of the file for uploading. Be sure the name must be the beginning of “UCSInstall”.

8.
After the upgrading, login in the console page, but you may find the version is still not changed.
Please check show > software in the OS configuration page, and then you will find that there is an 10.0 version that is in the inactive state. Please click “switchover” and restart the server.

9.
After booting 10.0 cucm, you will find there is an error message as below: F:\qq\121112666\Image\LEN9VDEB4)]~$JHG$9A]U`5.jpg
error-unsupported: partitions unaligned
it’s an error of hard drive. But you still can use the server as usual.
According to cisco document, we need a DRS backup of current CUCM, and then install a new CUCM 10.

In CUCM 10, there is a software to manage licenses called  Prime Licensing Manager (PLM),
However, the admin has to set password for login.

In the CLI:
license management list users
license management change user name
license management change user password

if you wish to change the password, please refer to “Cisco Prime License Manager User Guide, Release 10.0(1)”










Ciso Virtual Port Channel (VPC) Configuration Sample

Table of Contents
Transport   
1    Document Purpose   
2    Owner of Standard   
3    Intended Audience   
4    Principles   
4.1    Revision History   
4.2    Key Feature Changes   

download topology for this document
https://drive.google.com/file/d/0B5tzzJsbkWkIbXhlVVZGdEJCdGc/edit?usp=sharing

                  1. Best Practices

    1. Nexus 5K/2K Downstream vPC Configuration


Although there are serveral vPC configuration options for the Nexus5000 & Nexus2000 combined, currently, CATE Engineering will support the following “active-active” mode vPC configuration only.

Note: Its extremely important that the keep alive path absolutely never cross a virtual port channel. We're going to use the mgmt0 interfaces for vpc keep alive in a simple back to back configuration with crossover. It is in a different vrf by default (management) and we wont be using it otherwise.

Sample configuration for device Nexus5k-01:
!
hostname Nexus5k-01
!
! enable these features
!
feature lacp
feature vpc
feature fex
!
! its extremely important that the keep alive path absolutely never cross
! a virtual port channel. So, we're going to use the mgmt0 interfaces for vpc
! keep alive in a simple back to back configuration with crossover
! its in a different vrf by default (management) and we wont be
! using it otherwise.
!
interface mgmt0
 vrf member management
 ip address 1.1.1.1/30
!
! this assumes the sister 5K has 1.1.1.2/32 as its mgmt0 address
!
vpc domain 100
 peer-keepalive destination 1.1.1.2
!
! this associates the max of 12 FEX to the 5K the number range is 101-199
! give them clean descriptions so they can be (i.e. rack location).
!
fex 101
 description FEX0101
!
fex 102
 description FEX0102
!
fex 103
 description FEX0103
!
fex 104
 description FEX0104
!
fex 105
 description FEX0105
!
fex 106
 description FEX0106
!
fex 107
 description FEX0107
!
fex 108
 description FEX0108
!
fex 109
 description FEX0109
!
fex 110
 description FEX0110
!
fex 111
 description FEX0111
!
fex 112
 description FEX0112
!
! configure VLANs for the vPCs
!
vlan 101-104
!
! vPC peer-link configuration
! it's easiest to match the vpc domain to the peer link port-channel;
! all vlans present on the downstream FEX need be allowed
! this assumes four vlans in the example.
!
interface port-channel100
 switchport mode trunk
 switchport trunk allowed vlan 101-104
 spanning-tree port type network
 vpc peer-link
!
! the peer link needs physical ports
!
interface Ethernet1/39
 switchport mode trunk
 switchport trunk allowed vlan 101-104
 channel-group 100 mode active
!
interface Ethernet1/40
 switchport mode trunk
 switchport trunk allowed vlan 101-104
 channel-group 100 mode active
!
! The following are the vpc's that face the FEXs;
! its easier to line up the port-channel, vpc, and fex numbers together;
! the max number of FEX is 12 and this assumes 12.
!
! Since the FEX number is confined to <100-199>; it is recommended to reserve
! VPC, port-channel numbers range from 100-199 just for FEX related purpose
!
interface port-channel101
 switchport mode fex-fabric
 vpc 101
 fex associate 101
!
interface port-channel102
 switchport mode fex-fabric
 vpc 102
 fex associate 102
!
interface port-channel103
 switchport mode fex-fabric
 vpc 103
 fex associate 103
!
interface port-channel104
 switchport mode fex-fabric
 vpc 104
 fex associate 104
!
interface port-channel105
 switchport mode fex-fabric
 vpc 105
 fex associate 105
!
interface port-channel106
 switchport mode fex-fabric
 vpc 106
 fex associate 106
!
interface port-channel107
 switchport mode fex-fabric
 vpc 107
 fex associate 107
!
interface port-channel108
 switchport mode fex-fabric
 vpc 108
 fex associate 108
!
interface port-channel109
 switchport mode fex-fabric
 vpc 109
 fex associate 109
!
interface port-channel110
 switchport mode fex-fabric
 vpc 110
 fex associate 110
!
interface port-channel111
 switchport mode fex-fabric
 vpc 111
 fex associate 111
!
interface port-channel112
 switchport mode fex-fabric
 vpc 112
 fex associate 112
!
! this associates the physical 10GE's to the port-channels and to the FEX's
! this assumes two ports on each 5K to the FEX it can be one port
!
interface Ethernet1/1
 fex associate 101
 switchport mode fex-fabric
 channel-group 101
!
interface Ethernet1/2
 fex associate 101
 switchport mode fex-fabric
 channel-group 101
!
interface Ethernet1/3
 fex associate 102
 switchport mode fex-fabric
 channel-group 102
!
interface Ethernet1/4
 fex associate 102
 switchport mode fex-fabric
 channel-group 102
!
interface Ethernet1/5
 fex associate 103
 switchport mode fex-fabric
 channel-group 103
!
interface Ethernet1/6
 fex associate 103
 switchport mode fex-fabric
 channel-group 103
!
interface Ethernet1/7
 fex associate 104
 switchport mode fex-fabric
 channel-group 104
!
interface Ethernet1/8
 fex associate 104
 switchport mode fex-fabric
 channel-group 104
!
interface Ethernet1/9
 fex associate 105
 switchport mode fex-fabric
 channel-group 105
!
interface Ethernet1/10
 fex associate 105
 switchport mode fex-fabric
 channel-group 105
!
interface Ethernet1/11
 fex associate 106
 switchport mode fex-fabric
 channel-group 106
!
interface Ethernet1/12
 fex associate 106
 switchport mode fex-fabric
 channel-group 106
!
interface Ethernet1/13
 fex associate 107
 switchport mode fex-fabric
 channel-group 107
!
interface Ethernet1/14
 fex associate 107
 switchport mode fex-fabric
 channel-group 107
!
interface Ethernet1/15
 fex associate 108
 switchport mode fex-fabric
 channel-group 108
!
interface Ethernet1/16
 fex associate 108
 switchport mode fex-fabric
 channel-group 108
!
interface Ethernet1/17
 fex associate 109
 switchport mode fex-fabric
 channel-group 109
!
interface Ethernet1/18
 fex associate 109
 switchport mode fex-fabric
 channel-group 109
!
interface Ethernet1/19
 fex associate 110
 switchport mode fex-fabric
 channel-group 110
!
interface Ethernet1/20
 fex associate 110
 switchport mode fex-fabric
 channel-group 110
!
interface Ethernet1/21
 fex associate 111
 switchport mode fex-fabric
 channel-group 111
!
interface Ethernet1/22
 fex associate 111
 switchport mode fex-fabric
 channel-group 111
!
interface Ethernet1/23
 fex associate 112
 switchport mode fex-fabric
 channel-group 112
!
interface Ethernet1/24
 fex associate 112
 switchport mode fex-fabric
 channel-group 112
!
! you should now have interfaces of
! Ethernet101/1/1-48
! Ethernet102/1/1-48
! Ethernet103/1/1-48
! Ethernet104/1/1-48
! Ethernet105/1/1-48
! Ethernet106/1/1-48
! Ethernet107/1/1-48
! Ethernet108/1/1-48
! Ethernet109/1/1-48
! Ethernet110/1/1-48
! Ethernet111/1/1-48
! Ethernet112/1/1-48
!
! they can be configured like any other interface;
! however since the FEX is connected to two different 5K's
! the port can't be unshut until the same config is added to BOTH of the
! 5K's.  This is manual.  there is no config exchange.
! examples:
!
! Server A connecting in port channel mode
! All links of the port-channel must be homed to the same FEX.
!
interface Ethernet101/1/8
 description to Server A
 switchport access vlan 102
 channel-group 1001 mode active
!
interface Ethernet101/1/9
 description to Server A
 switchport access vlan 102
 channel-group 1001 mode active
!
interface port-channel1001
 description Server A
 switchport access vlan 102
!
! Server B dual-home to two FEXs in active/standby mode
!
interface Ethernet101/1/1
description to server B
switchport mode access
switchport access vlan 101
!
interface Ethernet102/1/1
description to server B
switchport mode access
switchport access vlan 101
!
! Server C connecting to FEX 102
!
interface Ethernet102/1/2
 description to Server B
 switchport access vlan 103
!
! due to how vPC works, the best practice is to have vPC's facing up
! toward the distribution if you have any facing down toward hosts or FEX
! this example assumes a trunk with four vlans
!
interface port-channel 201
 description to DIS01 Router
 switchport mode trunk
 switchport trunk allowed vlans 101-104
 vpc 201
!
interface port-channel 202
 description to DIS02
 switchport mode trunk
 switchport trunk allowed vlans 101-104
 vpc 202
!
! now associate the physical ports
!
interface Ethernet1/37
 switchport mode trunk
 switchport trunk allowed vlan 101-104
 channel-group 201 mode active
!
interface Ethernet1/38
 switchport mode trunk
 switchport trunk allowed vlan 101-104
 channel-group 202 mode active
!
! note:
! the Nexus products only support LACP for port-channels
! and only support 802.1q for trunking
!
end