How to install Linux on Windows 10 machine?

Introduction

This blog will show you how to install Linux on Windows 10 machine without dual boot option and partitioning your hard drive. In this method we will be using a software called Virtualbox from Oracle. It will allow you to run other operating systems on top of your current OS.  You can use any version of Linux. I will be using Ubuntu 16.04.2.

Following are the high level steps required to install Linux on Windows 10.

Steps Required To Install Linux On Windows 10

Step 1 - Downloads

  • Download Oracle Virtualbox and virtual box extension pack and install from here.
  • Download Linux from here

Step 2 - Creating Ubuntu virtual machine within Oracle Virtual box. 

Install Virtualbox and create a Ubuntu virtual machine

  • Click on the "New" option on the toolbar
  • Enter a descriptive name into the "Name" box
    • Select Linux as the "Type"
    • Choose Ubuntu as the "Version".
    • Click "Next" to continue.

Note:
Choose a correct version of UBUNTU i.e 32 or 64 bit.
If VirtualBox is only showing 32 bit versions in the Version list make sure:
▪ Your Host OS is 64-bits
▪ Intel Virtualization Technology and VT-d are both enabled in the BIOS
▪ The Hyper-V platform is disabled in your Windows Feature list.

  • Allocate Memory to the virtual machine. For Ubuntu16.04.2 2 GB is sufficient but you can allocate more if you have sufficient memory.
  • Create a virtual hard drive. Select default VDI as the hard drive type. Also while selecting physical disk, you can select fixed size or dynamically allocated size. Note that there is no partitioning on your actual hard disk. All that happens is that a file is created on your computer which acts as the hard drive.

Step 3 - Install Ubuntu within Virtual box

Start the Virtual Machine. The first boot requires you to select a start-up disk. You can mount the iso file downloaded earlier. Follow step by step process of installing. I will not cover the details of installing here.

Step 4 - Install Vbox Guest edition(optional)
Download and install Virtualbox Guest Additions
Installing guest editions will help you scale Ubuntu properly in full screen mode.

How to Measure DevOps Success?

How do you measure DevOps success ?

You may not know if you are achieving success with your DevOps implementation unless you measure it and also manage it continuously to keep the key performance indicators (KPI) in right balance.

Following are the few KPIs that help in measure DevOps success.

  • KPI 1 Quality
  • KPI 2 Speed
  • KPI 3  Application Performance
  • KPI 4 Customer experience
  • KPI 5 Business Success

Quality

Underline principle of DevOps is faster and better software delivery.

Shorter development cycles and close collaboration under a DevOps approach mean you catch problems before they go to production, and so spend less time fixing them.

Software quality is directly correlated to customer- impacting issues, so it pays to invest time and energy into addressing quality issues earlier in the cycles. Anyways you do not want customers to be the ones discovering your issues.

Following metrics  can help track and quantify the quality of  your software’s overall continuous improvement efforts:

  • Deployment success/failure  rate
  • Application error rates
  • Issue severity
  • Outstanding bugs

Since many quality issues do not appear until the software hits production, the ability to compare all metrics pre/post deploy is extremely helpful in understanding the impact of a specific release. This approach also allows teams to respond quickly and rollback a release or provide a quick resolution to any incidents that have occurred.

Speed

DevOps teams need to focus on the speed of development, delivery, and response to issues that occur in production. Metrics to consider for helping to track progress and success in this area include:

  • Lead time for changes
  • Frequency of code releases
  • Mean time to resolution

Application Performance

Catching performance problems before they manifest requires tracking number of performance metrics like

  • Up-time (availability)
  • App response time
  • Database response time
  • % of transaction time spent in database
  • Slow SQL queries
  • Resource usage

Customer experience

A poor application performance will result in bad customer experience. Customer experience KPI is directly related to Application performance.  Following are the few metrics that can help measure customer experience.

  • Response time of key transactions
  • Frequency of key transactions
  • Number of visits per user/per week
  • User growth rates
  • Amount of time spent in app

Business Success

Business success can be measured by measuring goals that are important for the company. For example a software can be valuable to the company when it helps grow the customer base, increase revenue, reduce customer service costs,  or some other objectives.

These objectives can be identified by talking to the business stakeholders and understand their business goals and how they will be impacted by delivering the software quickly.

Measure DevOps Success Picture

In a nutshell, all the KPIs are interrelated to each other and impact each other. If we have quality  and or Speed issues on production it will result in bad customer experience which in turn will lead to reduced business success. So, if we measure the 5 KPIs we can find out if our DevOps implementation is resulting in Business success.

KPIMetrics
Quality1. Deployment success/failure rate
2. Application error rates
3. Issue severity
Outstanding bugs
Speed1. Lead time for changes
2. Frequency of code releases
3. Mean time to resolution
Application Performance1. Uptime (availability)
2. App response time
3. Database response time
4. % of transaction time spent in database
5. Slow SQL queries
6. Resource usage
Customer Experience1. Response time of key transactions
2. Frequency of key transactions
3. Number of visits per user/per week
4. User growth rates
Amount of time spent in app
Business SuccessDepending on Business Goals.

What is DevOps

What is DevOps?

DevOps is a term used to refer a set of practices that emphasize the collaboration and communication of software developers and Information technology(IT) professional while automating the process of software delivery and infrastructure changes. It aims at establishing a culture and environment where building. Testing and releasing software  can happen at a high velocity and more reliably.

Note that it does not comprises of any one tool neither it excludes any one activities that we do in traditional delivery model.

One of the goal of DevOps is to having an environment where releasing more reliable application can happen more frequently.

To implement DevOps we may need many tools. Many of the tools we already used in one or the other activities.

Under a DevOps model, development and operations teams are no longer “siloed.” Sometimes, these two teams are merged into a single team where the engineers work across the entire application lifecycle, from development and test to deployment to operation. Testing/QA  and security teams also become more tightly integrated with development and operations. They use different set of tool which help them operate and evolve applications quickly and reliably. These tools also help engineers independently accomplish tasks (for example, deploying code or provisioning infrastructure)

Benefits of DevOps

  • Shorter time to Market
  • Speed
  • Rapid Delivery
  • Reliability
  • Scale
  • Improved collaborations
  • Security

Transitioning to DevOps requires a change in culture and mindset. At its simplest, DevOps is about removing the barriers between two traditionally siloed teams, development and operations. In some organizations, there may not even be separate development and operations teams; engineers may do both. With DevOps, the two teams work together to optimize both the productivity of developers and the reliability of operations. They strive to communicate frequently, increase efficiency, and improve the quality of services they provide to customers.

 

What are DevOps essential practices?

  1. Frequent but small updates
  2. Continuous integration
  3. Continuous Deployment/Delivery
  4. Microservices
  5. Infrastructure as a Code
  6. Configuration management
  7. Policy as a code
  8. Monitoring and Logging
  9. Communication and collaboration

 

DevOps tool set

There are no single tools that can achieve all practices. We need different set of tools. Some of the tool categories are listed below.

  1. Code — Code development and review, version control tools, code merging [ eg: GitHub, TFS ]
  2. Build — Continuous integration tools, build status [ eg: TFS, Jenkins]
  3. Test — Test and results determine performance [ eg: TFS test tools, Selenium etc]
  4. Package — Artifact repository, application pre-deployment staging
  5. Release — Change management, release approvals, release automation
  6. Configure — Infrastructure configuration and management, Infrastructure–as–Code tools [Eg: Docker, Puppet, Vagrant ]
  7. Monitor — Applications performance monitoring, end–user experience [ eg: NewRelic, Azure Application Insights]

For more details on DevOps refer the following sites.

Make your own Li-ion power bank

Introduction

There are many ways to make a Li-ion power bank. We will here use 3.7v Li-ion rechargeable battery and few other modules. You can purchase the battery from ebay or Aliexpress or extract from your old laptop battery. This power bank can be used for charging smartphones.

What all you need ?

Following are the components/module required to make your own Li-ion power bank. In the below project I have used only one battery of capacity 2600 mAH. You can add more battery in parallel to increase the capacity of your Li-ion power bank.

  1. Li-ion 3.7 volt battery of type 18650 and 2600mAh
  2. 5V Mini MICRO USB 1A TP4056 Lithium Battery Charging Charger ModuleCharger_module
  3. DC-DC Boost Converter Step Up Module 1-5V to 5V Booster_module
  4. A case of your choice
  5. USB connectors

Assembly

  • Connect Li-ion battery positive and negative to charger module B+ and B- respectively. The charging module has mini usb connector which can be used as input 5 v charging voltage. You can also connect In+ and In- to Solar panel (optional)
  • Connect DC-DC boost converter to Battery via a switch. IN+ and IN- of boost converter should be connected to battery.
  • Connect Ground and 5v to USB connector as output.

The battery charger module, is designed around a dedicated lithium-ion battery charger TP4056 chip. The onboard charge controller chip handles BATT.1 charging operation by processing the 5V DC input supply received through the USB socket (or through IN+ and IN- terminals). Output terminals (BAT+ and BAT-) can be directly connected to BATT.1. Two onboard SMD LEDs located on top of the circuit board provide charging-status indications.

BATT is used as the power reservoir. Since only 3.7V DC supply is available from BATT, DC-DC boost converter is used to cater to the stable 5V DC supply at output. If input voltage of 0.9V to 5V DC is available, this converter gives stable 5V DC output through its USB socket. When the battery is fully charged, a blue-coloured LED will turn on. You may remove the charger connected at USB-IN.

Li-ion power bank

Effective time management tips

Time management has become absolute necessity in todays world. Its well know now that we are probably busier than we ever have been. We have started using lot of time saving devices from vacuum cleaners to microwave ovens to computers. But what technology gives also takes away.  As we have increased the numbers of time saving devices and products to make our lives easier we have found ways to fill the time.

And a chronic lack of time leads to stress.

There are ways to mange your times effectively. Some of the time management tips to manage time effectively are listed below.

Make a time diary

This is very simple. Note down time spent each day in a week. Be honest and note each any every time. If you are watching 10 hours TV in a week mention it. Try to detail out each activity of the day like gym time, driving/commuting time, eating time, meeting time etc. Most of the time you will find out where you are spending more time. Next action will be strike off those activities where you should stop spending time. For example you may be spending 2-3 hours daily chatting with others.

Learn to say “NO”

When someone asks you to do something that you really don’t have time to do, say so, politely, but firmly. And don’t allow yourself to feel guilty. One reason we are feeling so busy all the time is that we are worse at setting personal boundaries around what we’ll say ‘no’ to. You should focus on your goals. Your time diary can help in this regard. Once you’ve blocked time for important, but often not scheduled activities, sign on for only those things that are important, family, friends and health. Once you know exactly what you have time to do, turning down things that don’t fit into your priorities is easier.

Time based to-do list

Create a to-do list that includes how much time you will spend on each item on the list. Lists are very helpful and helps prioritize on how you should go about the tasks. When you prioritize tasks you naturally focus on those that you can do immediately.

Multitask

We all combine several activities into one all the time. Some multitasking is dangerous. Talk on the phone while driving and your chances of being involved in traffic accident is high. But there are lots of activities that can be effectively combined Listen to books while commuting, paying bills when watching television.

Don not be a perfectionist

There is nothing wrong with being ordinary. Perfectionism, otherwise known as paying excessive attention to every detail, important or not, is a kind of procrastination. Set rational goals for yourself. It is a fine thing to strive to be your best. It is  counter productive to try to be the very best. Setting unattainable expectations of yourself just adds stress to your life.

Reward yourself

Finally do not let any progress however small go unrewarded.

In nutshell  – Use your time diary to make decisions about how you want to organize your time better. As you make progress in prioritizing and saying ‘no,’ let yourself enjoy that. It does not have to be a big reward, maybe it can be as simple as spending some time by yourself or getting a massage. It is important to acknowledge and enjoy your success.

 

Microphone pre amplifier using LM358

Pre amplifier using LM358

microphone pre amplifier using LM358

Components

  1. LM358
  2. R1 – 10k
  3. R2 – 47k
  4. R3 – 10k
  5. R4 – 10k
  6. 1M POT
  7. C1 -4.7 μf
  8. C2 – 10 μf

This is a simple mic pre amplifier using LM358. The circuit is self explanatory and is based on LM358 op-amp.

The main function of a pre amplifier is to amplify small and weak signals. The pre amplifier amplifies signal with very high gain but does not have the drive current or current gain to drive the output. hence the boasted signal from pre amplifier is given to power amplifier where the current is amplified. You can connect to amplifier using LM386 described in my previous post or any other amplifier that you have.

 

Simple 2 minute Timer Circuit for your DIY

In this post, a simple timer circuit switch for light is designed that will turn on a high power LED for a particular duration.

Timer is a switch that is operated by a timer system. The switch is turned on or off by the timer only after the preset time. One of the best examples of a timer switch is the sleep mode in televisions and computers. If no key is pressed for a particular duration, the television or computer will automatically go to sleep mode where the device enters a low power consumption mode or may even be switched off.

Circuit Idea

timer circuit

Components Required

  1. T1 – BC337
  2. T2 – BC547
  3. D1 – 1N4007
  4. LED
  5. R1-270 Ω
  6. R2 -12 k
  7. R3 -10k
  8. R4 -220Ω
  9. R5 -1k
  10. VR1 -100k pot
  11. C1 -1000 μf
  12. Push switch

Circuit Design

It’s a transistor based electronic timer. The design of the timer switch is very simple. A push switch  triggers the light. The timer is based on the charging and discharging of the capacitor in the RC network. The circuit is very simple and self-explanatory.

How it works

When the switch is closed, the transistor BC547 is turned on. The 1000µF capacitor will charge at the same time through 220Ω resistor.

As BC547 is turned on and its emitter is connected to the base of BC337 through 12K resistor, it will trigger BC337 and it starts conducting.

As the LED is connected to collector of BC337, it is turned on. R1 acts as the current limiting resistor for the LED. When the switch is opened or button is released, BC547 will stay turned on due to the charge from the capacitor. The time of discharge of capacitor through 10KΩ resistor and 100KΩ POT can be set by adjusting the variable resistor.

A 1KΩ resistor acts as a protection resistor when the resistance of variable resistor is completely reduced.

The timer switch in this project will keep the LED turned on for a maximum of approximately 2 minutes.