Thursday, June 16, 2022

How To Install Gerrit on an Ec2 Ubuntu

 

What is Gerrit

Gerrit is a web-based code review tool, which is integrated with Git and built on top of the Git version control system (helps developers to work together and maintain the history of their work). It allows merging changes to the Git repository when you are done with the code reviews.

Step1: git

Before beginning with installing Gerrit, we need to be sure that git is installed and set up on our server. If by any chance, it is not already installed on your cloud server, you can get it quickly through apt-get:

sudo apt-get install git

Step2: java

To work, Gerrit requires Java to be installed on the server.

You can check if Java is already installed easily:

java -version

If it’s not, you can install it, once again, through apt-get:

sudo apt-get install default-jdk

Step3: Installing gerrit

Once Git and Java have been downloaded and installed on our server, we can start to set up Gerrit. The program itself is hosted on the Google Code site, but the latest version is 2.7

Download the required war file:

wget https://gerrit-releases.storage.googleapis.com/gerrit-3.5.1.war

Once downloaded, we need to initialize Gerrit. You can do so with the command below.

However, should you be content with the default settings, you can have all of them selected at once with the — batch option. Additionally, while by default, Gerrit is set up within the user’s home directory, you can set up the specific directory where the files should be placed by adding a –d to the line.

java -jar gerrit-3.5.1.war init --batch -d ~/gerrit_example

If this process is done automatically, the canonical URL, where Gerrit can be accessed, will simply be localhost

Step4: Access Your Gerrit Installation

Once Gerrit has been set up, you can start to access it with your desired user.

Gerrit can be accessed through its canonical URL, visible in the settings and easy to find with the command:

git config -f ~/gerrit_example/etc/gerrit.config gerrit.canonicalWebUrl

The visible result should be something along the lines of:

http://(ipv4add):8080/

If you see localhost in your canonical URL, you should be able to access Gerrit through the server’s IP address.

Upon the first login, the page should look like this:

Now you can able in log in to your account.

So I hope this was very helpful and if you have any doubts or any questions you can write them down in the comment section below and I will try to answer you as soon as I can.

▬▬▬▬▬▬ Connect with me ▬▬▬▬▬▬

Youtube Subscription ► https://bit.ly/2LENtS1

Facebook Page: ► https://www.facebook.com/EasyAWSLearn/

Medium: ► https://techworldwithvijaypatel.mediu...

Dev: ► https://dev.to/easyawslearn

Telegram Channel: ► https://t.me/devtul

Happy Learning!…


Terraform Interview Questions and Answer

 

Terraform is a part of the AWS DevOps Competency and also an AWS Partner Network (APN) advanced technology partner. It is similar to AWS Cloud Formation in the sense that it is also an “infrastructure as code” tool that allows you to create, update, and version your AWS infrastructure.

  • It can do complete orchestration and not just configuration management (like Ansible and Puppet).
  • Has amazing support from almost all the popular cloud providers like AWS, Azure, GCP, DigitalOcean, etc.
  • Easily manages the configuration of an immutable (dynamic) infrastructure.
  • Provide immutable infrastructure where configuration changes smoothly.
    Works on HCL (HashiCorp configuration language), which is very easy to learn and understand.
  • Easily portable from one provider to another.
  • Easy Installation.

Terraform helps you manage all of your infrastructures as code and construct them as and when needed. Here are its key main features:

  • A console that allows users to observe functions
  • The ability to translate HCL code into JSON format
  • A configuration language that supports interpolation
  • A module count that keeps track of the number of modules applied to the infrastructure.

Infrastructure as Code (IAC) allows one to code instead of using manual procedures to construct, alter, and maintain the infrastructure. The configuration files may be modified and transmitted securely within an organization built according to infrastructure standards.

Terraform initializes the code using the command terraform init. This command is used to initialize the working directory containing Terraform configuration files. It is safe to run this command multiple times.

You can use the init command for:

  • Plugin Installation
  • Child Module Installation
  • Backend Initialization

Some of the most useful Terraform commands are:

  • terraform init — initializes the current directory
  • terraform refresh — refreshes the state file
  • terraform output — views Terraform outputs
  • terraform apply — applies the Terraform code and builds stuff
  • terraform destroy — destroys what has been built by Terraform
  • terraform graph — creates a DOT-formatted graph
  • terraform plan — a dry run to see what Terraform will do

Terraform is used to manage and inform infrastructure resources such as bodily machines, VMs, network switches, containers, and more. A provider is accountable for thoughtful API interactions and revealing resources. Terraform supports a large number of cloud providers.

Terraform uses a JSON-like configuration language called the HashiCorp Configuration Language (HCL). HCL has a very simple syntax that makes it easy for DevOps teams to define and enforce infrastructure configurations across multiple clouds and on-premises data centers.

  • Execution Plan
  • Change Automation
  • Resource Graph
  • Infrastructure as code

null_resource implements standard resource library, but no further action is taken. The triggers argument allows an arbitrary set of values that will cause the replacement of resources when changed.

The platform which allows teams to collaborate on Terraform projects on-demand or in reaction to specific circumstances is the Terraform cloud. It is tightly connected with Terraform’s processes and data. Terraform modules are shared by a private registry.

The terraform core looks at the configuration monitoring and creates analysis and evaluation based on the configuration. It keeps track and compares the versions (current and previous) and then display the output through the terminal.

Terraform core mainly takes two inputs:

  • Terraform Configuration — It keeps track of the infrastructure detail
  • Terraform state — It keeps track of the infrastructure status.

So I hope this was very helpful and if you have any doubts or any questions you can write them down in the comment section below and I will try to answer you as soon as I can.

▬▬▬▬▬▬ Connect with me ▬▬▬▬▬▬

Youtube Subscription ► https://bit.ly/2LENtS1

Facebook Page: ► https://www.facebook.com/EasyAWSLearn/

Medium: ► https://techworldwithvijaypatel.mediu...

Dev: ► https://dev.to/easyawslearn

Telegram Channel: ► https://t.me/devtul

Happy Learning!…

Azure event grid vs service bus | When to use Event Grid and when to use Service Bus

 

Azure Service Bus

Azure Service Bus is a secure, highly available & reliable Platform-as-a-service (PaaS) enterprise integration message broker for asynchronous transfer of data between applications. It supports Advanced Message Queuing Protocol (AMQP) which is a TCP-based efficient and reliable open protocol and makes a solution vendor-neutral. A developer can use different client libraries to connect to the message broker.

A sender sends messages to the queue. Queue sends back the ACK receipt after successfully replicating the message. On the other side, A receiver connect to the queue to retrieve a message and after completing the processing, it sends back an ACK for message deletion. A message can be moved into a Dead-letter queue (DLQ) to discard or later consumption, in case of an error.

Use Case for Service Bus

It is useful when an application wants to send a message to other applications and expect them to perform a specific action eg processing order or perform a series of workflow after a user is added to a resource group.

Azure Service Bus supports various advanced queuing operations and some of the key differentiating capabilities are:

Azure Event Grid

Azure Event Grid is a managed event routing service that routes events from Azure and non-Azure resources. It distributes the events to registered subscriber endpoints. Event Grid distributes events from different sources to different handlers, such as Azure Functions or logic apps.

Azure services have predefined topics to which messages could be published. These messages are available for subscription from the appropriate source. For custom topics, you simply create your Event Grid topic and then begin publishing and setting up subscriptions. The topic has an endpoint to publish messages and a set of keys for secure access.

The use case for Event Grid

Use an event grid when you want to implement the PUSH model i.e. you want to avoid long polling. Instead, events are routed immediately to an endpoint that you specify. In many cases, it can also lead to cost savings because it removes the overhead of polling on a regular basis and instead triggers code only when it is needed to consume an event. For example, you want to take action when a new user is added to the resource group or a file is uploaded to blob storage.

When to use Event Grid and when to use Service Bus

Message

A message is a raw data or payload that is been generated by the producer for the target consumers and persist until consumed or expired. The publisher expects the message to be consumed by the targeted consumer and likely wants some kind of response or action to occur. A contract exists between the producer and the consumer. For example, the publisher sends a message with some data and expects the consumer to generate some report from the data and send back a response when completed.

Event

An event is a lightweight message for the notification of a change in state. The event data has information only about what has happened and not the data that triggered the event. The publisher of the event has no expectations about the handling of the event. The consumer decides on what to do with the particular event. There can be ZERO or more subscribers that will receive each event. For example, an event may be generated when a file is created and have information about the file, but not the file content.

In simpler words, in a message-driven system publisher knows the intended consumers, whereas in an event-driven system the consumer decides what events it wants to subscribe to.

Now we understand events let's discuss how the Service Bus is different from the Event Grid, in the tabular format.

Conclusion

In short, both these services are used for delivering events and messages throughout a solution and have many similarities. However, each service is designed for certain scenarios and can be used based on necessity.

Use Azure Event Grid when you need dynamic scaling to process millions of events with high throughput, velocity, and near-real-time. The Event Handler is capable to handle the load and provide enough throttling to protect from failure.

Use Service Bus when you need to have full control of the pace of processing the messages, need advanced features like transactional support, sessions, FIFO, duplicate detection, etc., and require the consumer to make sure of a taking some action on the message.

Reference:

Top 10 Programming Languages You Can Learn in 2022

 Here is a list of the top 10 editing languages ​​compiled with the help of the developer's annual Stack Overflow survey and my personal information should help give you ideas.


Wireless Security Configuration: Protect Your Network Now!

Introduction: In today’s connected world, wireless networks are as common as smartphones, and they’re often the gateway to our personal, pr...