The purpose of this blog is to get the dev aware of how the PowerShell can be used to connect to MySQL db and insert a sample record.
With the increase of automation in industry, powershell is made responsible for doing many more things including inserting a new record in MySQL database.
The script flow start at line 28 by setting bthe username/ password/ database name, server name of the MYSQL database. By Default the port to connect db is 3306.
$query parameter of powershell need to be set for correct insert DML statement.
Next is Powershell function call which takes username, password, server, database, query as parameter. Line 1 to 26 is PowerShell function which handles this.
For this function to work perfectly it necessary for[reflection.assembly]::LoadFrom(“C:\abc\MySql.Data.dll”)
Statement to execute with success. What this statement do is load MySQL.data.dll assembly in script.
Its >net and MySQL connector Dll. You can get this dll by creating a new project in .Net Visual studio and add a new package by searching ‘MySQL’. Make sure you correctly set this DLL path in script.
This function takes care of establishing the connection with MySQL, Open the connection, execute the SQL DML query and return the response.
I tested this script in Windows 10, Powershell 4 and MySQL 8.4.5 and works fine.
$path = “<local computer path\>"
$setup = "Jenkins.msi"
$program = $path + $setup
Start-Process -FilePath $program -ArgumentList "/quiet"
This script is tested on Jenkins build 1.646 and works perfect.
DSC stands for Desired State Configuration. Its a declarative language that works on top of PowerShell.
DSC was introdcured in Powershell 4.0.
It can do system configuration, software deployment, Configuration validation, enforce compliance activities for you.
Not only the Windows O/s configuration DSC can do the Linux machine configurations for you. Further more these configuration may be used in conjunction with Automation frameworks like Chef, puppet, azure etc..
Is it possible to deploy Farm based TFS Server deployment?
Answer is Yes, you can do the Basic, Standard or even advanced setup installation and configuration of TFS unattended.
look for tfsconfig command for details. This exe is available at :
C:\Program Files\Microsoft Team Foundation Server X.0\Tools\
X is your TFS version number. For example for TFS 2013 it would be 12.
The whole installation and deployment is very quick.
You get the complete control over options to configure something similar you do using wizard.
Cool feature and very – very handy for TFS Admin..
Docker, is a new container technology.
Docker is being adopted by companies at enormous rate, particularly the BFSI IT companies.
Docker is open source technology. Concept of containers started around year 2000.
It makes it possible to get far more apps running on the same old servers and it also makes it very easy to package and ship programs.
If you want your server to run most application instances executing on least amount of hardware, Docker is the fit case to be used there.
However if the need is to run multiple applications on different operating systems on same hardware, Docker is not the tool to be used.
Leaving these apart Docker pack/ ship and run any application that can virtually run anywhere.
What this blog cover:
Basic definition of DevOps
Basic definition of Agile
DevOps vis a vis Continuous Deployment
DevOps vis a vis Continuous Integration
DevOps vis a vis Agile Development
DevOps vs Development Agile
Basic Definition of DevOps
DevOps (development and operations) is an enterprise software development phrase used to mean a type of agile relationship between Development and IT Operations. The goal of DevOps is to change and improve the relationship by advocating better communication and collaboration between the two business units. (Courtesy http://www.webopedia.com/TERM/D/devops_development_operations.html)
Q1) is it a new Tool?
It’s Dev + Ops working together to deliver solutions quickly & reliably.
Q2) why do we need DevOps?
By the time a new IT solution is deployed, it no longer maps to what business owner needs. Businesses are evolving FAST … be it BFSI, Gaming, Travel, FMCG etc.…
Basic Definition of Agile
Dictionary meaning of Agile is: quick and well-coordinated in movement
Agile methodology is an alternative to traditional project management, typically used in software development. It helps teams respond to unpredictability through incremental, iterative work cadences, known as sprints. Agile methodologies are an alternative to waterfall, or traditional sequential development. (Courtesy
DevOps vs CD/ CI/ Agile Development
If we see the diagram, the Agile Development ends by Test phase of the lifecycle. This means DevOps is not a good candidate to extend Agile (Development) up to. However said that Since Agile is a methodology so it can be introduced within the IT Operations.
DevOps vs Agile
DevOps is a small areas of intersection of 3 areas of IT: Development, QA, Operations. It’s small in size, means small set of activities of that area of IT, out of whole activities of that area actually fall under DevOps.
Agile cycle currently embrace the IT/QA (which current Agile methodology covers).
Some of the activities that are common to Development and QA and need support from Operations are:
- Infrastructure access
- Product Deployment
- Product Configuration
- Ticket Resolution (application specific)
- Application Performance and Tuning
- Application security
And so for these set of activities only Agile can be extended for IT Operations team.