Wednesday, November 13, 2019

Angular Minimal options


>> ng new --minimal --routing --style=scss my-site


>> styles.scss
>> routing.ts


Angular App Tour ( foundations)
-----------------------------------------

1) Modules >> organize the code

@Declarations

@imports

@providers

@bootstrap

2) Components

>>>> ng serve  will start the Node server locally in 4200 port


>>> Angular CLI re-complies anytime file is saved

Component contains

selecctor: 
template:
styles:


3) Routes

const routes: Routes = [
         {
              path: '  ',
              component: HomeComponenet
          },



]

Sunday, October 20, 2019

Monday, October 7, 2019

Docker and Windows 10

  1. https://hub.docker.com/editions/community/docker-ce-desktop-windows
  2. Click on Get Docket button to download Docker
  3. Docker for Windows Installer.exe  will be downloaded
  4. Docker Tool box needed for other than windows 10 Professional and Enterprise.
  5. https://docs.docker.com/toolbox/toolbox_install_windows/
  6. C:\Program Files\Docker Toolbox
    1. Docker cli client for running docker engine to create images,containers
    2. Docker machine so we can run docker commands
    3. Docker compose to run docker --compose command
    4. Kitematic --> docker gui
    5. Docker quick start
    6. Oracle VM Virtual box
  7. It creates Desktop icon for Docket Quick Start terminal
  8. Launch it
  9. run docker --version  
  10. Docker version 18.03.0-ce, build 0520e24


Coding Tips

AWS Base Architecture


WAR Remediation Steps




  • Apply Jumpstart standards to AWS Account 
  • Deploy CIS Benchmarks throughout AWS account
  • CIS Benchmark Alerts o GuardDuty
  • VPC Flow Logs
  • CloudTrail
  • CloudWatch Logs
  • S3 Buckets collecting the logs, etc.  
  • Resiliency – Utilize Route 53
  • Elastic Load Balancer and instances in Multi AZs. 
  • Monitoring - Compute resources & alerts 
  • Systems Manager – Patching, Cloud Watch Agent 


Security
Current state from 31% to 83% CIS compliant
  • SCP policies
  • GuardDuty
  • Centralize logs
  • Config rules
  • Security Hub (CIS compliance)

Identity Access Management
  • Clean up unnecessary IAM users and roles

Logging and Monitoring
  • Install  SSM Agent in the front-end instances to easily manage, patch, and run commands to multiples instances via AWS Systems Manager.
  • Installed CloudWatch agent in the front-end instances and sending the application logs to Cloudwatch
  • Configured CloudWatch Alerts and SNS Topic 
  • Monitoring the health of the front-end instances


Reliability
  • Help to define a plan for DR (disaster recovery) (RPO and RTO)
    • Potentially deploy AWS Backups to centrally manage and automate backups across AWS services
  • Provide a Network topology diagram

Cost Optimization
  • Use Reserved Instances for baseline workloads and capacity reservation
Use On-Demand Instances for short-term or unpredictable workloads

AWS - System Manager Setup (Apache LOGS)

Launch EC2 instance as ROOT

Edit the /etc/awslogs/awslogs.conf file and add the following.

  • sudo yum update -y
  • sudo yum install -y awslogs

  • vim /etc/awslogs/awscli.conf
  • sudo service awslogs start
  • sudo chkconfig awslogs on





vim /etc/awslogs/awslogs.conf

[/var/log/httpd/error_log]
datetime_format = %b %d %H:%M:%S
file = /var/log/httpd/error_log
buffer_duration = 5000
log_stream_name = {instance_id}
initial_position = start_of_file
log_group_name = /var/log/httpd/error_log

[/var/log/httpd/access_log]
datetime_format = %b %d %H:%M:%S
file = /var/log/httpd/access_log
buffer_duration = 5000
log_stream_name = {instance_id}
initial_position = start_of_file
log_group_name = /var/log/httpd/access_log

[/var/log/httpd/ssl_access_log]
datetime_format = %b %d %H:%M:%S
file = /var/log/httpd/ssl_access_log
buffer_duration = 5000
log_stream_name = {instance_id}
initial_position = start_of_file
log_group_name = /var/log/httpd/ssl_access_log

  1. Restart the awslogsd service
service awslogsd restart

AWS Click Stream Analytics with Kenisys

AWS - How to Perform EC2 Backup: Step-By-Step Guide

Sunday, November 11, 2018

Enterprise Architecture

  EA role is to lay Architecture As-Is to To-Be

 
  • What is Enterprise Architecture

    • Enterprise Architecture is a collection of Strategic information that describes a business and the information and technologies necessary to operate the business.
    • Its often broken into four domains
      • Governance
      • Business (Process and Service)
      • information ( Applications and Data)
      • Technology
  • What is the value of EA?
    • Its s strategic information asset to be used to shape the Enterprise.
    • Its key to understand the current investments in IT and efficiency planning and directing future IT investments.

Zachman Framework

  • It is the fundamental structure for Enterprise Architecture
  • Its NOT the Methodology
  • It is typically depicted in 6X6 matrix with the communication interrogatives as columns and Reification Transformation as rows
  • Interrogatives includes - What, How, When, Who, Where and Why
  • Transformations - Scope, Concepts, Logic, Physics, Technology, Product
  • It provides view for Planners, Owners, Designers, Builders, Sub contractors

TOGAF ( The Open Group Architecture Framework)


  • It is a framework for Enterprise Architecture
  • It provides a comprehensive approach to the design, planning, implementation and governance of an Enterprise Architecture
  • TOAGF models Enterprise at 4 models
    • Business
    • Application
    • Data
    • Technology
  • TOGAF includes a methodology for defining IT in terms of set of building blocks. 
  • It also contains a set of tools, vocabulary, recommended standards etc.. 
What is EA Road Map
  • EA Road map describes current and target architecture and transition plan achieve the target.

SOA



  • SOA is set of design principles for building a suite of 
    • Interoperable
    • flexible
    • Reusable services
  • Principles also includes
    • Discoverable Service contracts
    • Loose coupling
    • Service Abstraction
    • Service Re-usability
    • Service autonomy
    • Service Stateless
    • Service Composability
SOA Patterns
  • ESB
    • Provides reliable platform for messages, queues, data transformations and service broker
  • Event Driven Messaging
  • File Gateway
  • Service Callback
  • Service Grid





Enterprise Architect should be well versed with 

  • Application Architecture Principles
  • Engineering Principles
  • Technology Architecture Principles
  • Data Architecture Principles
  • Information Technology Principles
  • General Principles

Application Architecture Principles

  • Start with services, Micro Services
  • Visualize Application Services
  • Control Service Access by Policy
  • Adapt to Blurred Application Boundaries
  • Protect Data Integrity
  • Think Cloud when Designing Back-End services
  • Think Mobile when designing UI or Front End
  • Design Data Model with CAP theorem
  • Use Separation of concerns
  • Use Event Processing in the Event world
  • Automate Context Discovery
  • Use in-memory data grid  & RDBMS
  • Component reusability and simplicity
  • De-coupling interfaces
  • Adherence to functional domains

Engineering Principles

  • Testability
  • Maintainability
  • Integrity
  • External Integration well defined
  • Ethics 
  • Management

Principles that also helps to build stable enterprises includes...

  • Build What Matters
    • Engineering effort is a scarce commodity. It should only be applied to the problems that "move the needle" for the company
  • Don't Repeat yourself
    • Every piece of system, sub-system, module, process must have a single, unambiguous, authoritative representation in the entire Enterprise
  • Don't live with broken windows
    • Fix Bad Designs, Legacy, Wrong decisions and poor code when you see them
  • Clear Code beats the Clever Code
    • Don't write the code that you can't debug at 3 Am (while drunk). Never name a variable like "data" or "info" if the implementation is hard to explain.
  • Be A Scientist
    • Science is systematic enterprise that builds and organizes knowledge in the form of testable explanations and predictions about the universe.
  • Collaboration On Time
    • Encourage peer support when 20% is done instead of 80% is done that allows more meaningful collaboration
  • Don't gather requirements, dig for them
    • Requirements are rarely lie on the surface. They're buried deep beneath layers of assumptions, misconceptions and politics. To think like to User work with a User.
  • Be Open
    • Constantly share the work with teammates and stakeholders. When in doubt, follow the steps: tell people the impact you're about to make, make the impact, then tell the people you made it.
  • Empathize and Respect
    • See possibilities not just problems. Respect humans not just the code.
  • Have a conviction
    • Great products and team come from the string beliefs
  • Seek Engineering maturity
    • Embrace accountability
    • Tackle Technical debt where and when it makes us faster
    • Leave it better
    • Keep Learning