Monday, July 27, 2020

MS Azure - Fundamentals (Udemy)



Resources and Resource Group


When creating a resource, Azure prompts for a Region for a resource. The region is the location where you want to host the product/ service. Where you host it matters. See the figure below. If all your customers are located in Aus and are going to access the service (which is located in the West USA), then there will be latency. 


  • There are services in place in azure (Content network delivery service) that allow distributing and data and traffic across multiple regions. 
  • Products by region - list of all products/services per region. 
  • Not every service is available in every region. 
  • Commonly used services - are available in all regions. But for others, you need to ensure they are available. (e.g. Azure cognitive search is not available in the Canada region).


Azure Subscriptions

All Azure resources get billed against a particular Subscription
  • An Azure subscription is a logical container used to provision resources in Azure. It holds the details of all your resources like virtual machines (VMs), databases, and more. When you create an Azure resource like a VM, you identify the subscription it belongs to



  • You may have several departments in your organization that could have differing needs for the resources. Thru subscriptions, you can keep track of the billing for each. 
Azure Subscription Types


The Virtual Machine Service

  • You don't need to manage the underlying physical server.
  • No need for capital for physical server
  • Pay for only running cost of the server provided by Azure
  • You can pay as you go, terminate the virtual server when you don't need
  • Host different types of workloads on the server
  • You can deploy both Windows as well as Linux based servers. 


Resources deployed along with a Virtual Machine (VM)


  • VM sits on a virtual disk, and is provided a private and public IP. The traffic is routed thru a virtual NIC. 
  • All of this resides in a Virtual Network
  • NSG- network security group is a kind of security firewall (decides what kind of traffic flow into and out of the virtual machine).








Thursday, July 23, 2020

API and Web Services (Udemy)

[Mulesoft]

API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. Each time you use an app like Facebook, send an instant message or check the weather on your phone, you’re using an API. 

Example - Online travel service that interacts with several other websites to collect data...

  • API also provides a layer of security. Your phone's data is never fully exposed to the server, and likewise, the server is never fully exposed to your phone. Each communicates in small packets with only what is necessary - like ordering a takeaway. 

Windows Powershell

  • Go to Windows PowerShell UI
  • Get-ExecutionPolicy
           Remote Signed. You can run your own scripts or scripts signed by a trusted developer.
           Restricted - No scripts allowed. 
           Assigned - Run scripts signed by a trusted developer
           Unrestricted - You can run any script you want.                                                 
  • cmdlet
    • A PowerShell command with a predefined function. 
    • Are case insensitive 
  • Cmdlet format
    • Get - To get something
    • Set - To set something
    • Start - To start something
    • Stop - To stop something that is running
    • Out - To output something
    • New - To create something new
Example

Get-Process
Get-Service
Get-Content

Introduction to Cloud Computing (Udemy, Microsoft)

What is Cloud Computing?

Microsoft Definition: Cloud Computing is the delivery of computing services - including servers, storage, databases, networking, software, analytics, and intelligence - over the Internet (The cloud) to offer faster innovation, flexible resources, and economies of scale. 

Service Models of Cloud

  • Cloud, Cloud computing is NOT a buzzword (Unlike Web 2.0 / 3.0, IOT)
  • NIST Definition [National institute of standards and technology] - PDF document
The service provider is responsible for the physical h/w required to execute your work and for keeping it up to date. The computing services offered typically include:

Compute power - such as Linux servers or web applications used for computation and processing tasks
Storage - such as files and databases
Networking - such as secure connections between the cloud provider and your company. 
Analytics - such as visualizing telemetry and performance data.

IAAS is used in the following scenarios:

    • Migrating workloads
      • IAAS facilities are managed in a smilar was as on premise infra. 
      • Provides an easy migration path from on premise to cloud. 
    • Test and development
      • IAAS makes scaling dev and test environments fast and economical. 
    • Storage, backup and recovery
      • aaS is useful for managing unpredictable demand and steadily growing storage needs. IaaS can also simplify the planning and management of backup and recovery systems.

PAAS is used in the following scenarios

    • Development framework: PaaS provides a framework that developers can build upon to develop or customize cloud-based applications. Just like Microsoft Excel macro, PaaS lets developers create applications using built-in software components. Cloud features such as scalability, high-availability, and multi-tenant capability are included, reducing the amount of coding that developers must do.
    • Analytics and busienss intelligence: PaaS tools allow organizations to analyse and mine their data to find insights and patterns and predict outcomes that will help in business outcomes. 

Traditional Models

  • Applications - Your applications in the organization
  • Data - databases
  • Runtime  - Java / .NET runtime
  • Middleware - Service Bus, EAI, etc.
  • O/S - Windows, Linux, Oracle
  • Virtualisation - VMWare, etc.
  • Servers - physical servers
  • Storage - storage disks
  • Networking -  cables for routing data

IAAS

Blue - You manage
Grey - Things that are delivered by the service provider
Example - MS Azure, and Amazon Web Services (AWS), Rack Space, etc. 
  • [MS/Amazon manages] When we subscribe to AWS or Azure we get -- 
    • Networking, storage, servers, virtualization, and part of the OS --- Basically, you are going to get the Data Centre + a virtualized machine (e.g. a Windows machine that you can remote-desktop into).  
  • [You manage] On top of that, you can deploy -- 
    • OS management services like antivirus, backups that you will have to handle yourself.
    •  Middleware if you need
    • Runtime - install java runtime for e.g.
    • Data - spin up a virtual machine and install a database on that. 
    • Deploy your own applications.
    • You don't get to play in the service space (Part of OS, virtualization, servers, storage, and networking). 
    • Amazon calls the above undifferentiated heavy lifting meaning they will do all that stuff for you, and you basically deal with your stuff (that differentiates you from your competitors and in the marketplace) from applications all the way up to OS management services.  

PAAS

  • Service provider now manages the whole of the OS (patch management, backups, etc.), handling middleware, runtime.
  • You will add your applications and data
  • Example - AWS managed d/b, managed message queues, managed storage. Azure has a similar lineup. Also SalesForce, which branches out into SAAS as well. 
    • You only manage say an oracle stack. data schemas, stored procs, etc. + Applications
    • Rest is managed by the service provider

SAAS

  • The entire stack is managed by the service provider.
  • Can do some level of configuration.
  • Example Gmail, SalesForce CRM (Also branches out into PAAS)


IAAS-PAAS-SAAS ROI / Cost Efficiency


  • SAAS gives a better value for money...

Cloud Computing Characteristics

  1. On-demand self-service
    • Service can be provided as needed automatically without human intervention. Provisioning needs to be automatic; only then it's cloud computing. Automation is the key.
  2. Broad network access
    • Service is provisioned (via an Automated Process) over the network and accessible via mobiles, tablets, desktops - fairly any device over the network. 
  3. Resource pooling
    • The service provider has an enormous pool of resources (physical and virtual)
    • Serves multiple customers
    • Multi-tenanted model
    • Different physical and virtual resources dynamically assigned on demand.
      • Location-independent (customer has no idea where the infra is)
  4. Scalable
    • Scale-up and down (expand or contract) on demand; provisioned and released automatically
      • Vertical scaling: known as scaling up. is the process of adding resources to increase the power of an existing server. e.g. Add more CPUs, adding more memory. 
      • Horizontal scaling: Known as scaling out. is the process of adding more servers that function together as a single unit. e.g. you have more than one server processing incoming requests. 
  5. Rapid elasticity
    • Automatic addition or removal of resources based on demand (spike). e.g. adding more computing resourcse to a spiked website traffic and likewise removing resources when there is a flip. Another example is adding more resources for employees to access an application during work hours.   
  6. Measured service (therefore costeffective)
    • Monitored - Users can monitor their spending/utilization thru monitoring (graphs etc.). Once measured, the usage can be controlled. 
    • Controlled - Users can upscale or downscale the resources based on the monitored, measured service consumption. 
    • Reported - Reports are generated based on the usage. 
  7. Reliable
    • Offers data backup, disaster recovery, data repilcation services, therefore is reliable. 
    • Redundancy is built up into the service. If one component fails, another takes over.
  8. Global
    • Cloud providers have fully redundant datacenters located in various regions all over the globe. This gives you a local presence close to your customers to give them the best response time possible no matter where in the world they are.
  9. Secure
    • Cloud providers offer a broad set of policies, technologies, controls, and expert technical skills that can provide better security than most organizations can otherwise achieve. The result is strengthened security, which helps to protect data, apps, and infrastructure from potential threats.

Cost of Ownership for SAAS, PASS, IAAS




Monday, July 20, 2020

DevOps Introduction (Udemy)

Old School Build & Integration

  • Software Development --->>Commit Code to GitHub/Version Control --> Continuous Integration --> Compile --> Package + Instructions --> Operations Team --> Deploy to Pre-prod / Production.
  • The whole cycle may last from a couple of weeks to a couple of months. 
  • One such cycle is called an iteration. 
  • S/W dev team till packaging + instructions is Dev, rest is Ops. 

Old School Build and Integration Painpoints


  • Integrating code
    • Manual, time-consuming and Error-prone
    • Integration happens towards the end of iteration so that's the only possible time when teams get to see the compatibility of their code with others' code. 
      • Huge risk
      • Developers might have moved to coding other modules.
      • Consume lots of time and effort to debug - recalling the logic, etc. 
    • Intermediate merges may hold up teams. 
    • Long feedback cycles for functional defects.
    • Long iterations

Continuous Build and Integration alleviates the above pain points [CI]


  • A single central repository for code. 
  • Developers check-in/commit code very frequently. 
  • The Build is triggered every time a developer checks in code. 
  • Automated functional tests run. 
  • The build is automated and fast. 
  • Build compiles the code and runs it. 
  • Failed build shows up as a top priority to the developers. 
  • Build results are communicated to all the developers. 

Old School vs. Continuous Integration


CI BUILD Pipelines





> All steps should be automated. No human intervention required in between.
> Run on a dedicated build server.

Old School Operations Model





Painpoints of the classical operations model

  • The correctness of installation instructions. (Missing some instructions; cannot be guaranteed).
  • The difference in instructions across different environments.
  • All steps are done manually by Operations. Manual tasks are error-prone. 
  • Deployments are sophisticated; high impact with downtime.

Continuous Delivery

Continuous delivery is a software development practice where software can be released to production at any time. 

Continuous Integration is a PRE-REQUISITE for Continuous Delivery

Script-based (Unix Shell Script / Windows Shell Script) automation is used to automate the deployment process.

    
Unlike continuous integration, continuous delivery need not be "fully automated". Most of the tasks in the Release pipeline are automated, but we may still have manual checks (QA checks), deployment button, etc. The final decision for deployment in the release pipeline still requires human intervention. 
  • Quick
  • Efficient
  • Less downtime

Old School Operations VS. Continuous Delivery



Entire CI-CD Pipeline



  • Some steps in CD are still manual -- manual testing & certification by QA. We already have automated UT and UI in build pipeline in the continuous build, but still, QA may want to do some manual acceptance tests.
  • Acceptance Tests can also be automated as seen below (Automated UAT - in Test Environment). 


The automation team simply maintains the automation scripts. They do not intervene manually although they are shown in the pipeline (Diagram immediately above). 

Summary


Continuous Delivery --- is a software development practice where software can  (A choice) be released to production at any time. 

Continuous Deployment  -- is a software development practice where software is automatically released to production continuously. (No choice). Deployment happens continuously as long as all the previous steps are passed.

CD -- May mean Continuous Delivery or Continuous Deployment or Continuous Delivery / Deployment. 

Note
  • Continuous Deployment is NOT COMMON. Only enterprises whose IT department has reached a very high level of maturity will go with continuous deployment. because of the risks involved. 
  • Continuous Deployments need not always be big bang deployments. You can do a phased rollout for specific geographies.


FB does 50 production releases daily, which is about 1 every half an hour!

Visualizing Next Word Prediction - How to LLMs Work?

 https://bbycroft.net/llm