Uncategorized

Do I really Need DevOps and Where do I stand?

Now a days, every now and then we hear the buzz word DevOps and we are bombarded with the tools to just implement that. One may thing that do I really need DevOps in my Development Workflow and where I stand as compare to current market DevOps trends. We will be answering these questions and will be exploring why it is important to have a good DevOps Culture in place in your organization.

In this series, we discuss a brief overview of DevOps, common industries that are applying DevOps in their Development Workflow as well as we will be discussing the latest trends and how you can get best out of DevOps and scale in your organization.

Let’s start with Simple Question:

What is DevOps?

Simple put, DevOps is bringing people, processes and tools to deliver value to stack holders.

People represent different teams which are involved in your software life cycle, like Development, Operations, security and network to name a few. Process are set of rules or practices team follow to deliver better results and stack holder include the teams as well as the owner and customer of your product. With DevOps intro out of the way, let’s see what is going on in the industry.

In 2018 State of DevOps report was published, which is considered to be most widely reference source and it was compiled over 7 years, by surveying more than 30,000 technical professional around the world.

This report identifies the evolutionary journey of the DevOps. Many of us are already on DevOps train and many still in deciding phase, well early adopters see early success and then carefully developed DevOps practices and sharing, radiates through the organization and yet many of us despite early adoption don’t see the progress or failed to scale the practices to whole organization and in result still feel that we are at early stages of adopting DevOps Culture. To cover the whole journey of DevOps, Report presents five stages of DevOps evolution.

We will discuss each stage and will come back to these stages later on in this series. Let’s start with Stage 1. In the Stage 1 the first practice is, Application development team use version control. We all are pretty familiar with version control, some with git, which is distributed version control and some with centralized version control like SVN. It is important to know the continuous trend of version control systems to see the adoption and to know where we are standing, as we can see below version control system trends along with DevOps.


What is Version Control?

Simply put Version Control or source control is to manage changes to code along with history of code changes. Building strong DevOps culture starts with strong version control system and all other stages directly depend on version control. A typical version control system has following benefits:

  1. Process Enforcement

    A version control system enforces a process or workflow, every team member follows it, instead of going through their own version process.

  2. Track Changes

    Changes are tracked and version control can be used to restore changes at any time and point.

  3. Prevent Conflicts

    A version control system help team collaborate better by resolving the conflicting changes.

  4. Automation

    Version control help us automate tasks like testing, build and deployment, which in return save time and generate predicted results.

Every organization develop best practices along the way to steam line the process and get better results, some of the common best practices are listed below:

  1. Link changes to Work Item
  2. Exclude individual preference files or individual tool setting files
  3. Commit often and update often to avoid conflicting changes early
  4. Always include description along with code commits

Without going too deep into the details of the distributed and centralized version control, we will touch some best practices when to use which. Centralized version control like TFVC, CVS and perforce are best suited for large code bases where you want granular control, and distributed version control like git, Mercurial and bazaar are best suited as name suggest when you have distributed teams and want offline access to the code as the code is cloned along with history to local drive. If we look at the trend graph we can see that git is gaining traction here, it does not mean that this is the way forward or it is best suited for every situation but as git always have been aligned with open source and our current market paradigm shift toward open source and distributed systems ( Did you hear about Blockchain yet, it is also aligned on these concepts, Distributed and Open Source) so, it is usually recommended to start a new project with git now a days. See the link for more information

Stay Tuned! For Next Part.

Advertisements
Uncategorized

How to update the Entity Framework model, when changing stored procedure in Database

Solution:

All you need to do is to open your entity model diagram window, then click on Model Browser then go through each and delete the desired stored procedure artifacts in below folders and SAVE the file.

  1. Complex Types
  2. Function Imports
  3. Stored Procedures / Functions

Development, Entity Framework, Uncategorized

How to force Entity Framework to Always Load Fresh copy of Data from the Database

How to force Entity Framework to Always Load Fresh copy of Data from the Database

Solution:

There are many solution to achieve this result.

The most popular and easiest one is to dispose the existing context object and create new one

entities.Dispose();
entities = new Entities(); // DbContext

but it is not optimal you are disposing whole context which could be very expensive.

Optimal Solution:

Db.Entry(item).Reload(); // Db here means DbContext

this will only load the entity (item) you passed from the database and if you changed the item before reload, after reload the change will be overwritten by the values coming from database.

For more information Please check

Azure App Service, Development

How to serve WOFF fonts from Azure App Service

How to serve WOFF fonts from Azure App Service.

Solution:

1. Locate or create web.config

If you have asp.net application you will find the web.config but if you have hosted any other distrubution such as wordpress you can still create the web.config if this is not presented already.

2. Include/merge below code in web.config


  
    
      <mimeMap fileExtension="woff" mimeType="application/font-woff" />
      <mimeMap fileExtension="woff2" mimeType="application/font-woff" /> 
    
  

How to do it:

Go to Azure portal -> Locate your App Service -> Under Development Tools click on Advanced Tools -> click on Go link

How to serve woff font files from Azure App Service

A new tab will be opened and you will see Kudu logo, select Debug console and then CMD

Kudu click on cmd - How to serve woff font files from Azure App Service .png

Now navigate to the D:homesitewwwroot and find the web.config, if you find it then merge the code, else create it and copy paste the code mentioned in step 2.

In fact you can put any file extension you want to serve Azure App Service to serve as static file.

Merge web.config entreies - How to serve woff font files from Azure App Service.png

For more Details