Wednesday, March 30, 2016

What is DevOps ?

This website might help someone :
https://usvisastampinginmexico.wordpress.com/

DEVOPS( DEVELOPMENT & OPERATIONS)

Different Definitions about DevOps:
- DevOps is a movement of people who think it's time to change in the IT Industry - Time to stop 
  wasting money & start delivering great software and building systems that scale and last long.
- DevOps is a Cultural Shift or Movement or practice that emphasizes the Collaboration and  
  Communication of both Software Developers and Operations teams while automating the process of   software Delivery and Infrastructure changes.
- DevOps is the blending of tasks performed by a company's application development and Systems
  Operations teams.
- DevOps is all about trying to avoid that epic failure and working smarter and more efficiently at the   same time. It is framework of ideas and principles designed to foster cooperation, learning and  
  coordination between development and operational groups.

What Does Development team wants ? What Does Operations Team wants ?
Development team wants Changes to be pushed to Higher Environments.
Operations teams wants Stability of the Environments.
For Deployment of any software, we need the Dev & Ops teams to work together.


DevOps Life Cycle?
DevOps starts with requirements from Customers regarding New Functionality, any change or upgrade needed.
Business Owners: 
Business Owners wants to Provide the Developers with the Changes or Upgrades the customers wants or that helps their business to develop by new features or functionalities to the softwares or websites.
Development:
Development teams works on writing new code/ new changes/ changes to existing code and pushing the changes to SCM & Later Build and Deploy to target higher Environments.
Testing:
Testing teams works on finding out bugs, errors associated with the Deployed Code to the higher environments like Integration, UAT, Perf etc., - All these tests are automated by using different automation softwares such as JUnits for Unit Testing, Web browser automation testing using Selenium etc., Stress Testing using HP Load Runner, Gatling etc.,


Some Video Links about DevOps:

Tuesday, March 29, 2016

SonarQube for Android App & Jenkins

This website might help someone :
https://usvisastampinginmexico.wordpress.com/


SonarQube Code Quality Analysis for Android App & Integration with Jenkins

1) Install Andriod Plugin, Java Plugin will be installed by Default which is also needed.

To install the Plugin - You need to have Administration rights in SonarQube to Install any Plugins. 
Follow these below steps for Installation.
You need to Click : Administration -> System -> Update Center
2) Click on Available Option and Search for "Android" Plugin and Install it by Clicking Install.
Once the plugin is installed - Restart SonarQube
Note : Android Plugin is also called as "Android Lint" Plugin these days.
3) Click on Quality Profiles after the Android Plugin Installation - and you can see the below Info.
4) Android Plugin is a free version, 
5) In Jenkins - Create a Job
7) In Jenkins Job : Pull the Code from SCM, whether it's from github, gitlab, Git Server , SVN etc,.
8) Build Step : Click Invoke "Standalone SonarQube Analysis" and provide the details as below.




SonarQube 4 IOS App(Swift Language) & Jenkins

This website might help someone :
https://usvisastampinginmexico.wordpress.com/

SonarQube Code Quality Analysis for IOS App(Swift Language) & Integration with Jenkins

1) Install Swift Language Plugin in SonarQube If your IOS Application is written in Swift Language.

To install the Plugin - You need to have Administration rights in SonarQube to Install any Plugins. 
Follow these below steps for Installation.
You need to Click : Administration -> System -> Update Center

2) Click on Available Option and Search for "Swift" Plugin and Install it by Clicking Install.
Once the plugin is installed - Restart SonarQube
3) Click on Quality Profiles after the Swift Installation - and you can see the below Info.






4) Basically Swift Plugin is not a free version, so i went to sonarsource website and requested
 for a trail license key for swift plugin by providing my company details and my details - 
within 2-3 days i got response from sonarsource team with Trail License Key for 14 days.
5) I provided that Trail License Key in SonarQube URL at the below location.
Click on Administration -> Licenses - Swift - provide the Key there & Click Save License Settings.
8) Build Step : Click Invoke "Standalone SonarQube Analysis" and provide the details as below.


Tuesday, March 15, 2016

Learning GIT

This website might help someone :
https://usvisastampinginmexico.wordpress.com/

Learning GIT
- GIT is a Distributed Version Control System.
- Version Control is a System that records the changes to a file or set of files overtime
   so that you can recall specific version later.
- GIT Stores the data as meta-data, that's the reason GIT does not occupy alot of space.
- GIT Repository has .git folder, it has all the content info such as tags, branches, version histories etc
- Distributed VCS(Version Control System) means every developer who checks out the code to
   his/her local will get complete history about the project from the Remote Project Repository.

Advantages of GIT:
- Being Distributed VCS(Version Control System) - It means every developer who checkout
   the code will have the complete history of the Project.
- Once Code is Checked out, It becomes developer local copy - also called as local repository.
- Once you have the Local Repository, even if you don't have internet connection, you can still work
  on the coding, adding files to the local repository and continue your work.
- Once you connect to Network, then you can push all your commits to the Remote Repository.
- Note : Please remember to pull the remote changes done by other developers before pushing your
  changes. (Or) Do a Fetch and Pull - Incase if there is a possibility if your team members might
  work on the same files that you are working on.
- GIT is faster compared with any other SCM Tools like Clearcase, SVN etc.,

GIT Terminology:
- Repository  = Location where the files are stored..
- .git folder    = hidden folder in which all the meta-data of the repository is stored.
- init              = Initiation of a repository.
- create         = To Create a Repository, This Repository creation means initiating the repository.
- clone          = To Clone existing remote repository into your local workspace
- local repo   = The Repository which is on your/developers machines.
- remote repo= The Repository that is available on Central GIT Server or GitHub or GitLab- which
                         all developers have access and they can collaborate all their code/files.
- bare repo    = The Repo on the Remote Central  GIT Server or github or gitlab is called bare repo
                         and it will be shared repostory, because all the developers will be able to share their
                         code with others, Note: Bare Repo does not have Working directory.
- non-bare repo = Non bare Repo is something on each developer machine, it has working directory,
                            Working directory is where you can add, edit, delete the files/code and check in to
                            your local repo.
GIT Commands:
git init                          = To initiate a repository.
git init --bare --shared = To initiate a Bare and Shared Repository.
git status                      = To know the status of the files(whether staged, committed etc.,)
git log                          = To see all the logs of commits information.
git add                         = To add the unversioned files to the Staging Index.
git commit                  = Once files added to staging index, git commit will commit the files to the
                                       local repository and this will make your working directory clean for adding                                          next files, changes.
git push                      = push command is used to push your local repo to the remote repo, so the
                                      code/ files  will be available for all other developers in your team who has                                             access to the remote repo.

\







Jenkins &Sonar Integration

This website might help someone :
https://usvisastampinginmexico.wordpress.com/

Sonar Introduction:
Quality of the code is essential for agile development environment as there can be frequent changes in requirements which lead to frequent code changes. 
So, the source code should be written in a way that it can be maintained and extended easily. 
In order to achieve this, developers should be thoroughly concerned about the coding standards and best practices.
SonarQube can be highly beneficial for developers to ensure that their code is in high quality.

SonarQube is a free and open source code quality measuring and management tool which is developed using java and maintained by sonarsource.  You can download SonarQube, install locally and use it as it is, or else you can develop a customized version by specifying your own rules.


Seven axes of quality


Jenkins and Sonar Integration
1) In Jenkins, 
    Install the required plugins for "SonarQube" in Jenkins
Click "Manage Jenkins" => "Manage Plugins" => Click on "Available" Option.    
Search for "SonarQube" plugin and Install that plugin.


2) Click "Manage Jenkins" => "Configure System" => Search for "SonarQube" in this page,

    As the plugin is installed the SonarQube options appears in this page.
    Add "SonarQube Runner" installation as per the below screenshot.












3) In the same "Configure System" page, look for "SonarQube" and 
add the values accordingly as per the below screenshot.
    Environment Variables: 
       Select this Option: Enable Injection of SonarQube Server Config" 
        -> so that all jobs uses the values provided here.
    SonarQube Installations:
       Name : Provide any name for Sonar or Simply "Sonar"
       Server URL: 
              Default URL if you are working on local host: http://localhost:9000
              Other URL : If the Sonar in installed on any server, provide that URL.,                    
      ex: http://servername:9000
SonarQube Account Login: 
      Provide the User Name to login to the above URL
SonarQube Account Password: 
      Provide the Password needed to login to the above URL
Advanced Settings:
     Provide the Database URL : It depends on your Database.
           In my case, i had used PostgreSQL Database : "jdbc:postgresql://localhost:5432/sonar"
        Provide the Database Login and Password.