In this article, I will show you how to install ‘Ansible’ on RHEL/CentOS 7/6. Like other configuration management tools like puppet, chef and CFEngine, server software is installed on one machine and client machines are managed through the agent. Wherein Ansible, the nodes are managed by controlling machine (Ansible server) over SSH, so there won’t be any agent running on node machines.

Base Requirements    :  

  1. Controlling Machine , 
  2. Client Nodes , 
  3. Required Packages

Software Prerequisites      :  

  1. Operating System: RHEL/CentOS/Fedora and Ubuntu/Debian/Linux Mint
  2. Jinja2: A modern, fast and easy to use stand-alone template engine for Python.
  3. PyYAML: A YAML parser and emitter for the Python programming language.
  4. parmiko: A native Python SSHv2 channel library.
  5. httplib2: A comprehensive HTTP client library.
  6. sshpass: A non-interactive ssh password authentication.
Note: Use yum for installation because it will install all dependencies automatically.

My Controlling Machine and Nodes   : 

  • 192.168.87.145    server.gekvplabs.com    server
  • 192.168.87.146    node1.gekvplabs.com    node1    
  • 192.168.87.147    node2.gekvplabs.com    node2

Installation of  Ansible on On RHEL/CentOS :

  1.  Run yum update  for updating all existing packages
    1. yum update -y
  2.  Install EPEL repo 
    1. yum install epel-release
  3.  After configuring epel repository, you can install Ansible using following command
    1. sudo yum install ansible -y
  4. After installed successfully, you can verify the version by executing below command.
    1. ansible --version 

The Salesforce.com Certified Administrator exam is intended for an individual who has experience performing as a Salesforce Administrator. Here are examples of the concepts you should understand to pass the exam:

Please find links to download SFDC Admin Exam dumps:


Books: 


It's always good to refer latest release notes before going to exam

And For additional reference you may want to refer below sites

http://www.oyecode.com/
http://www.jitendrazaa.com/blog/
http://cloudyworlds.blogspot.in/
http://saramorgan.net/category/visualforce-2/
http://www.sfdc99.com/
http://www.verticalcoder.com/

Please let me know if I can help you for anything

In first post we have learned about collecting Federation Service Identifier and Export the “Token-Signing” certificate from microsoft's active directory federation server (adfs). In this post we will look at ServiceNow SAML 2.0 Settings

ServiceNow SAML 2.0 Settings:

1. Log into Service-Now with Admin privileges
2. Browse to “SAML 2 Single Sign On” and select Properties from application Navigator section

Note:
If SAML 2 is not listed, you will need to contact Service-Now from Hi portal to have it enabled 



3. The correct settings for this example explain below

Identity Provider properties:

#The Identity Provider URL which will issue the SAML2 security token with user info.
We have to place Identity Provider URL which collected earlier. Please refer article 1
Example: http://domain/adfs/services/trust

#The base URL to the Identity Provider's AuthnRequest service. The AuthnRequest will be posted to this URL as the SAMLRequest parameter

We have to place The base URL to the Identity Provider's
Example: ht/tp://domain/adfs/services/trust/ls

#Sign AuthnRequest.

Leave default

#The base URL to the Identity Provider's SingleLogoutRequest service. The LogoutRequest will be posted to this URL as the SAMLRequest parameter

Based on the URL specified logout request will be redirected
Example:Idp login(https://domain/adfs/ls/idpinitiatedsignon.aspx)
 
#The protocol binding for the Identity Provider's SingleLogoutRequest service. (Value can be either "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" or "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST".)

Leave default

#Sign LogoutRequest. Set this property to true if the Identity Provider's SingleLogoutRequest service requires signed LogoutRequest.

Leave default

#When SAML 2.0 single sign-on fails because the session is not authenticated, or this is the first login, redirect to this URL. This is the base URL where the initial SAML 2.0 AuthnRequest is sent using the SAMLRequest parameter

Leave default

#URL to redirect users after logout, typically back to the portal that enabled the SSO (e.g. http://portal.companya.com/logout)

Leave default
  

Service Provider (Service-Now) properties:

#The URL to the Service-now instance homepage.

This is Servicenow Login URL
Example:https://demo.service-now.com/navpage.do

#The entity identification, or the issuer

Example: https://demo.service-now.com

#The audience uri that accepts SAML2 token. (Normally, it is your instance URI

Example: https://demo.service-now.com

#The User table field to match with the Subject's NameID element in the SAMLResponse

This specifies the field in users table, that will be used to match the subject NameID in SAML assertion from Idp with ServiceNow user table
Example: email

#The NameID policy to use for returning the Subject's NameID in the SAMLResponse. Your SAML identity provider will have to support this by declaring the policy in its metadata. The NameID value is used to match with the specified field in the User table to lookup the user

Leave default 

#Create an AuthnContextClass request in the AuthnRequest statement.
This tells the IdP that ServiceNow requires that they present a specific login mechanism such as a form, Kerberos, etc. If the AuthnRequest doesn't specify an AuthnContextClass, the IdP will choose the most appropriate method.


Check Yes 

#The AuthnContextClassRef method that we will be included in our SAML 2.0 AuthnRequest to the Identity Provider

Leave Default

#The alias of key entry stored in SAML 2.0 SP Keystore used to sign SAML 2 requests.

Leave default

#The password of key entry stored in SAML 2.0 SP Keystore used to sign SAML 2 requests. 

Leave default

#Click SAVE

Certificate Settings: 

1. Select the  “Certificate” page from the application navigation. At the top right corner, 
2. Select the paper clip and attach the PEM certificate we created earlier. 




Sometimes the certificate’s fields such as Issue and Subject do not populate after selecting save and there may be an error on the top of the page. If this is the case, open the saves PEM formatted certificate in notepad and copy and paste the certificate in the “PEM Certificate:” field followed by clicking on “Update”. This page should have all the areas filled out.

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

In next post, we will discuss about  AD FS Relying Party Configuration and AD FS Relying Party Claim Rules
 
 

In  this is post, I have given very simple examples for learning salesforce Apex Triggers concepts.
Apex Triggers saves lots of time involving in automating complex businuess process

Examples


  1. Use case 1:

  • when account is inserted, automatically contact also created for that account.

trigger insertContact on Account (after insert)
{
Contact cont = new Contact();
cont.LastName = Trigger.new[0].name;
cont.AccountId = Trigger.new[0].ID;
insert cont;
}

  • Explanation:

Above one is a simple trigger to insert contact when you create account. the text which is mentioned in green color is trigger name. And text which is mentioned in red color is event name.

Trigger.New is a context variable. which returns a list of new records of the sobjects which we are going to insert into the database.




  1. Use Case 2:

  • Create a trigger on opportunity that throws error if Amount is less than 5000

trigger op_trigger1 on Opportunity (Before Insert, Before Update)
{
    for(Opportunity a : Trigger.New)
{
    if(a.Amount < 5000)
   a.addError('Amount can not be less then 5k');
}
}
  • Explanation:

Above one is a simple trigger which fires if Opportunity values is less than 5000 k. This is trigger triggers every time when record is created and updated



  1. Use Case 3:

  • If a New record is created, Amount should not be less than 5k If an Existing record is being updated , Amount should not be less than 3k

trigger opp_trigger2 on Opportunity (Before Insert, Before Update)
{
   for(Opportunity a : Trigger.New)
{
   if(Trigger.isInsert && a.Amount < 5000)
   a.addError('Amount can not be less than 5k');
   else if(Trigger.isUpdate && a.Amount < 3000)
   a.addError('Amount can not be less than 3k');
    }
}



4. Use Case 4:

  • Create a contact record on New Opportunity Insert
trigger opp_trigger3 on Opportunity (After Insert)
{
    Contact c = new Contact();
   for(Opportunity o : Trigger.New)
{
   c.AccountID = o.AccountID;
   c.FirstName = 'Oppertunity';
   c.LastName = 'Owner';
   insert c;
   }
}








In our previous post we have studied about cloud computing and its advantages. Today am going to Show perfect example for cloud platform!
Salesforce.com
                Salesforce.com platform is a world’s first Plat form as service (PaaS).enabling developers to develop and deploy any kind of business application in the cloud.
Technologies behind salesforce.com platform Application:

Multitenant Architecture: An application model in which all users and apps share a single, common infrastructure and code base.

Web services API: An application programming interface that defines a Web service that   provides direct access to all the data stored in the servers.

Apex: The world’s first on-demand programming language, which runs in the cloud on Force.com servers.

Visual force: A framework for creating feature-rich user interfaces for apps in the cloud

Apex is based on Java, and Visual force is a similar to HTML we can also add style sheet to the visual force page!

Simple Calculator application with force.com:
Steps:
1. Create developer account at Developerforce.com (It is a free account for learning).
2.  Create app follow bellow steps
            2.1. Click the Your Name Setup link in the top-right corner of the page (
             2.2. Go to the App Setup area on the left side of the page.
             2.3. Click the + icon to expand the Create menu, or just click the Create link.
            2. 4. Click the Apps link.
             2.5. Click New. The New Custom App wizard appears.
             2.6. In the App Label field, enter Calculator
3. Next is Develop Apex and Visual Force page for our application
4. Create new Apex class Add bellow code to it
            public class Sample 
{    
    public Double val1 {get;set;}
    public Double val2 {get;set;}
    public Double result {get;set;}
    public String func {get;set;}
    
    public Sample()
    {
    }
    
    public void find()
    {
        if(func == 'add')
        {
            result = val1 + val2;
        }
        else if(func == 'sub')
        {
             result = val1 - val2;
        }
        else if(func == 'div')
        {
             result = val1 / val2;
        }
        
    }
   
}
5. Create new Visual force page and add bellow code to the page.
<apex:page controller="Sample"&gt;

<apex:form >
   
    <apex:pageBlock &gt
;
        <ape
x:pageBlockSection >
            <apex:pageBlockSectionIt
em
&
g
t
;
  
  
   
   
   
<apex:outputLabel value="Value 1"/>
            </apex:page
Bl
oc
k
Sec
tionItem>
  
   
   
    <apex:pageBlockSectionItem >
                <apex:inputText value="{!val1}"/>
            </apex:pageBlockSectionItem&gt;                          
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Value
2"/
&g
t;
          
</a
pex
:pageBlockSectionItem>
            <apex:pageBlockSectionItem &gt
;
     
           &lt
;apex:
inputText value="{!val2}"/>
            &lt;/apex:pageBlockSectionItem>                
         
           &lt;apex:pageBlockSectionItem >
                <apex:selectRadio value="{!func}" layout="pageDirection">
                    <apex:selectOption itemValue="add" itemLabel="Add"/>
                    <apex:selectOption itemValue="sub" itemLabel="Subtract"/>
                    <apex:selectOption itemValue="div" itemLabel="Division"/>
                    <apex:selectOption itemValue="mod" itemLabel="Mod
ulo Di
vision"/>
  
      
        </apex:selectR
adio&g
t
;
   
       
</a
pex:pa
geBloc
kSectionItem>
    
        <apex:pageBlockSectionItem >               
            </apex:pageBlockSectionItem>      
 
       
     <ap
ex:pageBl
ockSectionItem >
                <apex:outputLabel value="Result"/>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
                <apex:inputText value="{!result}" id="res"/><apex:actionStatus id="sts" startText="Finding..."/>
            </apex:pageBlockSectionItem>                                      
        </apex:pageBlockSection>   
        <apex:pageBlockButtons >
            <apex:commandButton value="Find" action="{!find}" reRender="res"  status="sts"/>
        </apex:pageBlockButtons>
    </apex:pageBlock>
   
</apex:form>

</apex:page>
                          
6. Save and Run your Visual force page at url location that’s it u did simple calc app
7. Happy coding!