Monday, June 22, 2015

Using Azure at Command Line - Getting Started

Part 1.   Account Download.

at command line do azure account download

[root@ebscloud ~]# azure account download
info:    Executing command account download
info:    Launching browser to http://go.microsoft.com/fwlink/?LinkId=254432
help:    Save the downloaded file, then execute the command
help:      account import
info:    account download command OK
[root@ebscloud ~]#

Open a browser and you will see

A download file for a .publishsettings  link will appear at the bottom; copy it and move it to the location of the Azure CLI 

[root@ebscloud ~]# azure account import ./.publishsettings
info:    Executing command account import
info:    account import command OK
[root@ebscloud ~]#


Now when you do Azure account list you will see some rows ! 



Installing Azure CLI on Oracle Enterprise Linux - part 1 - dependencies



First thing we need is NPM

NPM is not part of the standard OEL distribution, so we need to get EPEL

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

[root@ebscloud ~]# yum -y install epel-release-latest-6.noarch.rpm
Setting up Install Process
Examining epel-release-latest-6.noarch.rpm: epel-release-6-8.noarch
Marking epel-release-latest-6.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:6-8 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================
 Package                                      Arch                                   Version                             Repository                                                     Size
=============================================================================================================================================================================================
Installing:
 epel-release                                 noarch                                 6-8                                 /epel-release-latest-6.noarch                                  22 k

Transaction Summary
=============================================================================================================================================================================================
Install       1 Package(s)

Total size: 22 k
Installed size: 22 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : epel-release-6-8.noarch                                                                                                                                                   1/1
  Verifying  : epel-release-6-8.noarch                                                                                                                                                   1/1

Installed:
  epel-release.noarch 0:6-8

now yum -y install NPM works.


nstalled:
  npm.noarch 0:1.3.6-5.el6


now  npm install azure-cli -g


results in lots of output 

now running azure -h results in lots of output ! 

So thats' it installed. let#s move on.. 




Friday, June 19, 2015

Upgrading to Cloud Control Part II



OK I had left you upgrading cloud control

THis took approximately 2.5 hours to run through all the steps, but eventually



[root@ebscloud oms]# ./allroot.sh

Starting to execute allroot.sh .........

Starting to execute /u01/oracle/oms12105/oms/root.sh ......
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/oracle/oms12105/oms

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
/etc exist
/u01/oracle/oms12105/oms
Finished execution of  /u01/oracle/oms12105/oms/root.sh ......


[root@ebscloud oms]#


OK so that is all fine. 

Points to remember :  the details above can be found in OMS_HOME/install/setupinfo.txt. 

So let's try and log on to the new cloud control 



we can see we now have 12.1.0.5 

Finally edit our start environment script 

export ORACLE_BASE=/u01/oracle/
export ORACLE_HOME=/u01/oracle/oms12105/oms
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=EMREP

and we are done.   In a later blog we will looking at updating agents and all the other boring tedium of finishing out the upgrade. 





Thursday, June 18, 2015

Upgrading to Oracle Cloud Control 12.1.0.5 Cloud Control


OK so we'll do a few posts on running the upgrade process

So go to http://www.oracle.com/technetwork/oem/enterprise-manager/downloads/index.html

and download the software ( this will be on Linux 64 bit )


You download three large zip files ; create a directory and unzip them all into it.  You will end up with the typical large Oracle staging directory tree.

...  so run the Installer



As usual we do not want to receive security updates at this point so deselect the option and remain "uninformed". 

We also wish to skip software updates as this is a brand new product 
It now runs some checks to see if it is a supported system platform 

If it turns out that ulimit is needing fixing then don't forget to look in a: limits.conf and b : limits.d - this is a recent EL change in how userlimits are broken out.  ( limits.conf now takes a back seat ) 
Note that if you do need to do this in a vnc window you'll need to exit the installer, kill VNCserver and restart it to make the env change be picked up, but this should be a fairly quick change 


Now everything works 
In the next screen we want to do a 1-system upgrade ( that is all that is supported, we see the existing OMS in the list below ) 


On the next screen you are ( really confusingly ) asked to select a middleware home.  It does not tell you if this is an existing one or a new one ( since it is an upgrade process you do not know ) .  We will hope it is a new one.    Reading the documentation does not make it any clearer. 



We will try for a new directory as it does not seem to like the old one 


On the next screen enter the sys password for the DB :: 



You will get a warning to apply some possibly mandatory patches. 


These may not be mandatory ( e.g 11.2.0.4 ) 



If you have checked and they are OK , click OK and next  

OK now we are warned about emkey not being copied : 

OK so we can fix this by 
oracle@ebscloud ~]$ source oms_home.sh
[oracle@ebscloud ~]$ emctl config emkey -copy_to_repos -sysman_pwd xxxxxx
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
The EMKey has been copied to the Management Repository. This operation will cause the EMKey to become unsecure.
After the required operation has been completed, secure the EMKey by running "emctl config emkey -remove_from_repos".
[oracle@ebscloud ~]$

OK Let's try again 

click back through the last two screens and now 
Click YES 


We get some warnings, let's fix them .. first one should be easy by running utlrp on the database to recompile the brokens 


so this leaves the EM triggers problem 


Looking in Metalink doesn't help.   Searching the logs in emdbprereqs shows some SQL which if we run it 


select trigger_name, trigger_type, table_name from (select trigger_name, trigger_type, table_name from DBA_TRIGGERS where table_owner ='SYSMAN'  and status = 'DISABLED');

TRIGGER_NAME                   TRIGGER_TYPE     TABLE_NAME
------------------------------ ---------------- ------------------------------
EM_ASSOC_INS_TRIG              AFTER EACH ROW   MGMT_ASSOC_INSTANCES
EM_ASSOC_DEL_TRIG              AFTER EACH ROW   MGMT_ASSOC_INSTANCES

SQL>

Interesting.  Why are they disabled; a search in Metalink shows someone else has had the problem but no fix was ever done.  Let's enable them and see what happens 

SQL> alter trigger EM_ASSOC_INS_TRIG  enable;

Trigger altered.

SQL> alter trigger EM_ASSOC_DEL_TRIG enable;

Trigger altered.

SQL> select trigger_name, trigger_type, table_name from (select trigger_name, trigger_type, table_name from DBA_TRIGGERS where table_owner ='SYSMAN'  and status = 'DISABLED');

no rows selected

SQL>


OK let's have another go at the above

Press Cancel, then Next 

It still recurs; I think there is a bug here .  even though there are no triggers disabled ( there are SYS triggers yes, but there is a  specific note from metalink NOT to enable them ) 

so just press OK 



These are OK so press Next 


We don't need any of these extra plugins 
now its time to stop the OMS 

[oracle@ebscloud ~]$ emctl stop oms -all
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
Oracle Management Server is Down
Stopping BI Publisher Server...
BI Publisher Server Successfully Stopped
AdminServer Successfully Stopped
BI Publisher Server is Down
[oracle@ebscloud ~]$



On this second last picture we just enter our weblogic admin password and review the port - 7103 is fine. 


finally we review the above information ... and press install. 

THis is likely to take some time so we will end this blog post here and have another one for the trials encountered during the upgrade. 







Oracle Cloud Control 12.1.0.5 has been released

https://blogs.oracle.com/oem/entry/new_enterprise_manager_release_allows


In the coming days I will be blogging about using upgrading to and using 12.1.0.5


Wednesday, January 28, 2015

Adding a Database Target in Oracle Cloud Control


Log into Cloud Control

Top Right Hand Side/Add Target/Add Targets Manually

Add Using Guided Process

On the next box select the search glass




Select the host that runs the database you want to add

Click Select and Next 

you get a Target Discovery In Progress 


In the list below we want to select EMREP 


Tick box beside EMREP. fill in dbsnmp password ( note it is normally a locked account ) 
and click Test Connection



Click OK, and Next

Finally, click Save


Now Click at the Top Left
Targets/Databases/Search List


We can see the newly added EMREP
and we can see its performance metrics

So all done !

More later... 


Sunday, January 18, 2015

Applying the latest Plugins to Cloud Control



If we want to play with DBAAS (see note 1549855.1)  we need to have the latest plugins. 

OK so into Cloud Control/Extensibililty/Plugins we go 



We can see there's a later plugin for the database than the one we have *.06 so we need to get 12.1.0.7 

We can see the same for the CLoud Plugin which is at 12.1.0.8 and we need 12.1.0.9 

and the same for the storage management framework. 


We need to deploy on the OMS server first and then roll out the agent side changes. 

OMS Server

Downloading the Plugins 


OK so those plugins are not downloaded so we need to download them before we can deploy them. 
CLick into 

For each plug in listed above, click into Setup/Extensibility/Self Update, then scroll down to Plugins, 

For each plugin listed above, click Download , then Select Immediately

Wait for 5 minutes or so for all the plugins to be downloaded  ( note that the DB plugin alone is 630 MB ... You wonder what they are doing with all that ! ) 

Now we can apply them to the relevant places. 
  Go back to Setup/Extensibility/Plugins and we can see the plugins are now available



Ok now go to Deploy On/Management Server in the buttons above the plugins

Click Add, and select each of the 4 plugins we have just downloaded

Click Next.  Unfortunately we now get a warning that we need the latest virtualization plugin as well
so back to extensibility/selfupdate/plugins we go 

Select the 12.1.0.7 Plugin and Download .  This should only take a short time 
Now go back to the plugins page and 12.1.0.7 virtualization should be available  ( note you will need to repeat this process for Fusion Middleware currently 12.1.0.7 
Once you've done that you eventually get a progress bar checking the prerequisites ! 

]
These failed because we need more swap ( the Azure VM has no swap in it ). 
Step out, add swap,  retry 
if all is well the plugin prereq check should succeed 

Click Next 
On this window decide on your REPO back up strategy ( recommended ) and enter a SYSDBA credential for the repo database 
Click Next. 
you will now see an OMS downtime warning so ensure you know what this means ( no system monitoring while it is down ) 

If all is well and you wish to proceed, Click Deploy 
a final confirmation window opens...

Click OK 

We can step out and watch with emctl status oms -details -sysman_pwd 
Plug-in Name         : Oracle Virtualization
Version              : 12.1.0.7.0
ID                   : oracle.sysman.vt
Content              : Plug-in
Action               : Deployment
Status               : Deploying
Steps Info:
---------------------------------------- ------------------------- ------------------------- ----------
Step                                     Start Time                End Time                  Status
---------------------------------------- ------------------------- ------------------------- ----------
Submit job for deployment                1/18/15 11:54:42 AM EST   1/18/15 11:54:42 AM EST   Success

Initialize                               1/18/15 11:54:44 AM EST   1/18/15 11:54:53 AM EST   Success

Install software                         1/18/15 11:54:53 AM EST   1/18/15 11:54:59 AM EST   Success

Validate plug-in home                    1/18/15 11:55:01 AM EST   1/18/15 11:55:03 AM EST   Success

Perform custom preconfiguration          1/18/15 11:55:03 AM EST   1/18/15 11:55:03 AM EST   Success

Check mandatory patches                  1/18/15 11:55:03 AM EST   1/18/15 11:55:03 AM EST   Success

Generate metadata SQL                    1/18/15 11:55:03 AM EST   1/18/15 11:55:03 AM EST   Success

Preconfigure Management Repository       1/18/15 11:55:03 AM EST   1/18/15 11:55:04 AM EST   Success

Preregister DLF                          1/18/15 11:55:04 AM EST   1/18/15 11:55:04 AM EST   Success

Stop management server                   1/18/15 11:55:05 AM EST   N/A                       Running

---------------------------------------- ------------------------- ------------------------- ----------


we can see lots of stuff happening 

After about 90 minutes this clears up and we can log back in again !
Don't forget, though, we still need to roll out the plugins to the environments we want to deploy to or manage from.

In later posts we will look at the differences between all the plugins and the proper usage of all these.