Terraform

 I share with you some key steps to manage infrastructure as code.

I. Non-Variable

1. Install Terraform:

You can install Terraform by downloading the binary distribution for your operating system from the Terraform website. After downloading, extract the binary and add it to your system's PATH.

2. Define Infrastructure as Code (IaC):

Create a directory for your Terraform configuration files. Within this directory, define .tf files that describe the infrastructure resources you want to provision. These files typically include:

  • Provider Configuration: Declare the cloud provider you're using (e.g., AWS, Azure, Google Cloud) and any required authentication details.
  • Resource Configuration: Define the infrastructure resources you want to create, such as virtual machines, networks, databases, and storage buckets.

3. Initialize Terraform:

Navigate to your Terraform configuration directory in the terminal and run terraform init. This command initializes the directory and downloads any necessary plugins and modules.

4. Write Terraform Configuration:

Write your Terraform configuration files (.tf) using the HashiCorp Configuration Language (HCL). Define providers, resources, variables, outputs, and any other necessary configurations.

5. Plan Infrastructure Changes:

Run terraform plan to create an execution plan. Terraform examines your configuration and determines what actions are necessary to achieve the desired state. It does not execute the plan but shows you what will happen when you apply the configuration.

6. Apply Infrastructure Changes:

Once you review the plan and are satisfied with the proposed changes, you can apply the changes by running terraform apply. Terraform will execute the plan and create, update, or delete resources as needed.

7. Maintain Infrastructure:

As your infrastructure evolves, continue to manage it using Terraform. Make changes to your Terraform configuration files as necessary and apply those changes using terraform apply.

Additional Tips:

  • Version Control: Store your Terraform configuration files in version control (e.g., Git) to track changes and collaborate with team members.
  • Modules: Use Terraform modules to encapsulate reusable components of your infrastructure configuration.
  • Variables and Outputs: Utilize variables to parameterize your configuration and outputs to extract useful information about your infrastructure.

Example Terraform Configuration:

Here's a simple example of a Terraform configuration file that provisions an AWS EC2 instance:

hcl
provider "aws" { 
 region = "ap-southeast-1
}

resource "aws_instance" "example" { 
 ami = "ami-0c55b159cbfafe1f0" instance_type = "t2.micro" 
}

This configuration declares an AWS provider in the us-west-2 region and creates an EC2 instance using the specified AMI and instance type.


II. Variable

1. Create Terraform Variable Files:

Create separate Terraform variable files for each environment (e.g., dev.tfvars, prod.tfvars in envs folder). These files will contain environment-specific variable values.

Example dev.tfvars:

hcl
region = "us-west-2" instance_type = "t2.micro"

Example prod.tfvars:

hcl
region = "us-east-1" instance_type = "t2.large"

2. Reference Variables in Terraform Configuration:

Reference the variables defined in your variable files in your Terraform configuration files using interpolation syntax.

Example main.tf:

hcl
provider "aws" { 
 region = var.region 
}
resource "aws_instance" "example" { 
 ami = "ami-12345678" 
 # AMI ID specific to your environment 
 instance_type = var.instance_type 
}

3. Run Terraform Commands with Variable Files:

When running Terraform commands, specify the variable files for the appropriate environment using the -var-file option.

For example, to apply changes to the development environment:

bash
terraform apply -var-file=../envs/dev.tfvars 

For the production environment:

bash
terraform apply -var-file=../envsprod.tfvars

3. Run Terraform Destroy

Once you're in the directory, execute the following command:

bash
terraform destroy


Additional Tips:

  • Use .gitignore to exclude sensitive variable files (e.g., *.tfvars) from version control.
  • Define default variable values in your Terraform configuration files or in a variables.tf file to provide fallback values if variables are not defined in the variable files.

  •  

After I run terraform apply successfully:






[ERP] Human Resouce & Payroll

 

Introduction

The life cycle of (HRM)/payroll is a recurring set of business activities and related data processing operations associated with effectively managing employee resources. 

The more important tasks include the following:

  1. Recruiting and hiring new employees

  2. Training

  3. Job assignment

  4. Compensation (payroll)

  5. Performance evaluation

  6. Discharge of employees due to voluntary or involuntary termination


The Payroll system, which is under the accounting department’s control, produces employee paychecks and maintains the related records as required by government regulations.


The HRM system, which the human resources department runs, maintains files on employee job history, skills, and benefits; these files are updated weekly.


Cycle Information System

To effectively utilize the organization’s employees, the HRM/payroll system must collect and store the information managers need to answer the following kinds of questions:

  • How many employees does the organization need to accomplish its strategic plans?

  • Which employees possess specific skills?

  • Which skills are in short supply? Which skills are in oversupply?

  • How effective are current training programs in maintaining and improving employee skill levels?

  • Is overall performance improving or declining?

  • Are there problems with turnover, tardiness, or absenteeism?

Overview HRM/Payroll process and Information needs



Payroll context diagram



Data flow diagram



REPORT NAME

CONTENTS

PURPOSE

Cumulative earnings

register

Cumulative year-to-date gross pay, net pay, and deductions for each employee 

Used for employee information and annual payroll reports

Workforce Inventory List of employees by department

Used in preparing labor-related reports for

government agencies

Position control report

List of each authorized position, job qualifications, budgeted salary, and position status (filled or vacant)

Used in planning future workforce needs

Skills inventory report

List of employees and current skills

Useful in planning future workforce needs and training programs

Form 941

Employer’s quarterly federal tax return (showing all wages subject to tax and amounts withheld for income tax and FICA)

Filed quarterly to reconcile monthly tax payments with total tax liability for the quarter

Form W-2

Report of wages and withholdings for each employee

Sent to each employee for use in preparing in

dividual tax returns; due by January 31

Form W-3

Summary of all W-2 forms

Sent to the federal government along with a copy of all W-2 forms; due by February 28

Form 1099-Misc

Report of income paid to independent contractors

Sent to recipients of income for use in filing

their income tax returns; due by January 31

401(k) Retirement



Various other reports to

government agencies

Data on compliance with various regulatory provisions, state and local tax reports, etc.

To document compliance with applicable

regulations





My Accounting Software

Introduction

We are pleased to present our proposal for accounting financial software, designed to help you manage your financial transactions and reporting with ease. Our software is tailored to meet the unique needs of your organization and improve your financial management processes.

Overview

Our accounting financial software is designed to help you manage your accounting tasks efficiently and accurately. With our software, you can automate many of your financial processes, including accounts payable and receivable, invoicing, billing, and financial reporting. Our software provides real-time visibility into your financial performance, allowing you to make informed decisions and improve your financial management processes.

Features and Benefits

Our accounting financial software offers the following features and benefits:

  1. Streamlined financial processes: Our software automates many of your financial processes, reducing errors and saving you time and effort.

  2. Real-time financial reporting: Our software provides real-time visibility into your financial performance, allowing you to make informed decisions and identify areas for improvement.

  3. Customizable reports: Our software allows you to customize your financial reports to meet your specific needs, providing the flexibility you need to manage your finances effectively.

  4. Cloud-based access: Our software is cloud-based, allowing you to access your financial information from anywhere, at any time.

  5. Scalable solution: Our software is scalable, so it can grow with your organization as your financial management needs evolve.

Implementation and Support

We offer comprehensive implementation and support services to ensure a seamless transition to our accounting financial software. Our implementation team will work closely with you to understand your unique needs and configure the software to meet your requirements. We also offer training and support services to ensure your team is fully equipped to use the software effectively.

Pricing

Our accounting financial software is priced competitively, and we offer flexible pricing plans to meet your specific needs. We will provide you with a detailed pricing proposal based on your requirements.

Conclusion

Our accounting financial software offers a comprehensive solution for managing your financial transactions and reporting. With our software, you can streamline your financial processes, improve your reporting capabilities, and make informed decisions about your financial performance. We look forward to the opportunity to work with you and help you achieve your financial management goals.

CI/CD notes

Azure 

Azure DevOps Documentation: Microsoft offers comprehensive documentation for Azure DevOps, which includes information on topics such as planning, development, testing, release, and monitoring. You can access the Azure DevOps documentation at the following link: https://docs.microsoft.com/en-us/azure/devops/?view=azure-devops.

Azure Pipelines Documentation: Azure Pipelines is a cloud-based continuous integration and continuous delivery (CI/CD) service that enables you to build, test, and deploy your applications to any platform or cloud. The Azure Pipelines documentation provides information on how to create, configure, and manage pipelines. You can access the Azure Pipelines documentation at the following link: https://docs.microsoft.com/en-us/azure/devops/pipelines/?view=azure-devops.

Azure Kubernetes Service (AKS) Documentation: AKS is a fully managed Kubernetes service that simplifies the deployment and management of containerized applications. The AKS documentation provides information on how to create and manage Kubernetes clusters on Azure. You can access the AKS documentation at the following link: https://docs.microsoft.com/en-us/azure/aks/?view=azure-devops.

Azure Monitor Documentation: Azure Monitor is a platform monitoring service that provides insights into the performance and health of your applications and infrastructure. The Azure Monitor documentation provides information on how to set up monitoring, create alerts, and analyze data. You can access the Azure Monitor documentation at the following link: https://docs.microsoft.com/en-us/azure/azure-monitor/?view=azure-devops.

Azure Resource Manager (ARM) Templates Documentation: ARM templates are JSON files that define the resources and dependencies needed to deploy an application on Azure. The ARM Templates documentation provides information on how to create and deploy ARM templates. You can access the ARM Templates documentation at the following link: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/?view=azure-devops.

AWS

AWS DevOps Overview: AWS provides an overview of DevOps principles and best practices, as well as how AWS services can be used to implement DevOps workflows. You can access the AWS DevOps overview at the following link: https://aws.amazon.com/devops/what-is-devops/.

AWS CodePipeline Documentation: AWS CodePipeline is a fully managed continuous delivery service that automates your release pipelines for fast and reliable application and infrastructure updates. The AWS CodePipeline documentation provides information on how to create, configure, and manage pipelines. You can access the AWS CodePipeline documentation at the following link: https://docs.aws.amazon.com/codepipeline/index.html.

AWS CodeDeploy Documentation: AWS CodeDeploy is a fully managed deployment service that automates software deployments to a variety of compute services such as Amazon EC2, AWS Fargate, AWS Lambda, and your on-premises servers. The AWS CodeDeploy documentation provides information on how to create, configure, and manage deployments. You can access the AWS CodeDeploy documentation at the following link: https://docs.aws.amazon.com/codedeploy/index.html.

AWS CloudFormation Documentation: AWS CloudFormation provides a common language for you to describe and provision all the infrastructure resources in your cloud environment. The AWS CloudFormation documentation provides information on how to create, configure, and manage stacks. You can access the AWS CloudFormation documentation at the following link: https://docs.aws.amazon.com/cloudformation/index.html.

AWS CloudWatch Documentation: AWS CloudWatch provides monitoring and observability for your AWS resources and applications. The AWS CloudWatch documentation provides information on how to create and configure alarms, monitor logs, and analyze metrics. You can access the AWS CloudWatch documentation at the following link: https://docs.aws.amazon.com/cloudwatch/index.html.


Software Architecture Document

Introduction

Purpose and scope of the document

Overview of the software system being developed

Goals and objectives of the software architecture

Architectural Overview

High-level overview of the software architecture

Description of the software components and their interactions

Explanation of the architectural styles and patterns being used

Discussion of any trade-offs or decisions made in the architecture design

Design Decisions

Explanation of the key design decisions made in the architecture

Description of any alternative solutions that were considered

Justification for the chosen design decisions

Architectural Views

Detailed views of the software architecture from different perspectives

Examples of architectural diagrams, such as component diagrams, deployment diagrams, and sequence diagrams

Quality Attributes

Discussion of the key quality attributes that the architecture needs to satisfy, such as scalability, maintainability, and performance

Explanation of how the architecture design addresses each quality attribute

Risks and Mitigations

Identification of potential risks and issues that could arise in the software architecture

Explanation of the mitigations or contingency plans to address each risk

Implementation and Deployment

Discussion of the implementation and deployment plan for the software system

Explanation of any specific technology choices or requirements for the implementation and deployment

Conclusion

Summary of the key points in the software architecture document

Discussion of any future plans or considerations for the architecture


Writing Skills

 I. Những loại Essay

1. Descriptive: Essay thiên về dạng miêu tả

ex: Mô tả ngôi trường bàn đang học/ Mô tả 2 loại thú cưng của bạn

2. Definition: Dạng định nghĩa

ex: Định nghĩa như thế nào về global warming

3. Illustration: Dạng minh hoạ

ex: Minh hoạ cho 1 thành ngữ nào đó

4. Comparison/Contrast

ex: So sánh cuộc sống ở nông thông với thành phố

5. Cause and effect

ex: Nguyên nhân/ hệ quả của chơi game

6. Narrative: Văn tường thuật

ex: Văn tường thuật 1 buổi meeting (có trình tự về thời gian)

7. Process analysis: Phân tích quá trình

8. Classification: phân loại

ex: Phân loại các tiểu thuyết

9. Argumentative: tranh luận

ex: Có nên cấm xe ba gác chạy trong thành phố/ Có nên hút thuốc lá ở nơi công cộng

10. Research: Nghiên cứu

ex: Khóa luận cho thạc sĩ, tiến sĩ.

11. Critical Analysis: Phân tích bình giảng

II. Structure của 1 essay:

Một đoạn essay thường có 3 đoạn

Introduction

Body

- Paragraph 1

- Paragraph 2

- Paragraph 3

Conclusion

1. Introduction:

Trong viết sẽ có 1 dạng gọi là Hook

- Hook: Một câu (sentence) thu hút người đọc, dẫn nhập vào 1 vấn đề gần sát chủ đề mình đưa ra

- Extend -> Topic: Mở rộng ý ra

=> Dẫn đến câu Thesis(Topic) thể hiện rõ chủ đề của bài này.

Thesis là quan trọng nhất, phải làm nổi bật nó lên để người ta hiểu bài mình muốn nói gì (Thường phần 1 gồm 3-4 câu thôi)

2. Body

Đưa ra các ý tưởng

- Ý tưởng của việc tự học

 + Idea 1: Advantage

 + Idea 2: Disadvantage

- Cho trẻ vừa học vừa làm, được không?

 + Idea 1: Paragraph 

 + Idea 2: Paragraph 

 + Idea 3: Paragraph 

- Paragraph: Phải có câu topic sentence: Câu chốt của 1 đoạn văn, nêu bật lên ý tưởng của paragraph.

+ Thesis: Ảnh hưởng đến cả essay

+ Topic sentence: Ảnh hưởng đến các paragraph

- Topic sentence: Supporting - Sentences mini - Conclusion (Kết đoạn đầu, dẫn nhập qua đoạn sau)

3. Conclusion

Tổng kết lại những gì đã nói trong bài này

III. Implement

1. Introduction

- Tell a story

- Ask a question: Bố mẹ có phải là những người giáo viên tốt nhất không?

- Tell a statistics

- Cite a quotation: Đưa ra 1 trích dẫn

ex: There is a saying that "A friend in need is a friend in need"/ "A friend walk in whereas everyone walk out"

  -> Tuy nhiên không phải lúc nào mình cũng có câu thành ngữ đúng để  dẫn chủ đề mình cần.

- Genetalization: Khái quát hoá vấn đề

- Common knowledge

ex: Ngày nay intenet là 1 công cụ khá phổ biến mà tất cả ai cũng biết

Hook ( việc học trên Internet cũng khá phổ biến

2. Body

3. Conclusion

- Ask an open question

- End with a warning

- Call for action

- Suggest the result/ consequence

  + Opinion: Đưa quan điểm cá nhân là gì thì đưa vào đây

  + Dicuss:  - Thảo luận, KHÔNG được phép đưa OPINION vào đây, nên đưa suggest action/warning

                   - Summary lại những gì mình viết ở trên, không được đưa ra bất cứ opinion nào vào

 - Future plans

- Supporting idea: Quan trọng nói trước, ít quan trọng nói sau

ex:  - Advantage/ Disadvantage of Internet

       - Học song ngữ

     Hook: Biết song ngữ là 1 lợi thế với tất cả mọi người "Is now considered"

     Với tiến bộ của KH-CN, trẻ em tiếp xúc sớm với Internet (Đưa ra ý có nên học ngoại ngứ từ lúc sớm hay không?)

     Idea 1: Advantage

              + A power tool

              + Foundation for languages curious about life

              + Travel -> broaden one's mind 

           => Chốt lại 1 result/consequence

         be considered     / in detail

    Idea 2: Disadvantage - drawback = negative side; on the other hand, be regarded

              + Not fully developed

IV. Skills

1. Sentence structure

- S + V + bổ ngữ/định nghĩa

- Phrase: Cụm danh từ

- Clause: Mệnh đề

   + Relative clause

   + Noun clause

   + Adverbial clause

- Punctuation: dấu câu

- Sentence structure

- Sentence transformation: Chuyển đổi câu

2. Template

 - S + be + Adv (Place/time) / phrase

 Ex: My friend is here/in the library

S + be + Adj: Tính chất cho chủ từ

Ex: The Pohie's smooth is quite good today

- S + be + complement: định nghĩa

Ex: Mr. Jame has been a teacher for 40 years

- S + linking vert + Noun

Ex: At an early age, Joan became a Buddhist

- S + V + Adv (action verb)

Ex: In a few weeks, my cousin will arrive

       I have learned English continuously since 9 PM

- Tân ngữ trực tiếp

Ex: The archer shot an arrow into the target

- Smithers gave the employees a raise

- S + V + O + Adj 

  (make/keep/find)

Ex: We try our best to make our parents happy.

- S + V + O + bổ ngữ

Ex: Most people consider Jacob a loyal friend 

Automate data extraction within encryption

 

Title

The Partnership Manager wants to receive the weekly file related to updated metadata and has to encrypt the file when sending.

Context

What was the problem at hand?
Our system has a lot of information on the customer, so When we send the file out, there has more at-risk security like tampering or unauthorized access.

What other choices were considered?
There are several algorithms:

  • Rivest Shamir Adelman(RSA)

  • Digital Signature Standard(DSA)

  • Elliptic curve cryptography(ECC)

Reason

Why was the ECC chosen over everything else?

  • First of all, we can see this statistics table



  • This algorithm has had FIPS-Certified (Federal Information Processing Standard)

  • We can able to save the memory of the key when using ECC if we use ECC for the AES-256 session, then a 512-bit ECC key is required while a 15360-bit RSA key is required.

  • Package reference https://www.nuget.org/packages/Ecc

Advantage

  • Internet-based applications, for example, online Banking or business where a large volume of online transactions or web server requests is on demand.

  • Constraint devices like mobile devices have low computational power and low memory storage.

  • Cryptographic tokens are portable, small, and lightweight and they have the low processing power

Sequence diagram


DevOps roadmaps


The OCR Service to extract the Text Data

Optical character recognition, or OCR, is a key tool for people who want to build or collect text data. OCR uses machine learning to extract...