๐ƒ๐ž๐ฏ๐Ž๐ฉ๐ฌ ๐„๐ง๐ ๐ข๐ง๐ž๐žr โ€“ Interview Q/A

Always learning
4 min readJun 20, 2024

--

โ“What is git stash, git cherry-pick, and git squash?

Git stash allows users to save their ๐˜‚๐—ป๐—ฐ๐—ผ๐—บ๐—บ๐—ถ๐˜๐˜๐—ฒ๐—ฑ ๐—ณ๐—ถ๐—น๐—ฒ๐˜€ and work in progress to a local stash and go back to the last commit done on the branch (the HEAD).

The command saves your local modifications away and reverts the working directory to match the HEAD commit.

buymeacoffee โ˜• ๐Ÿ‘ˆ Click the link

It allows you to store your un-committed modifications into a buffer area called stash and deletes it from the branch you are working on.

You may later retrieve them by applying the stash.

Git stash more

Cherry-pick, it still creates new commit hashes on the active branch.

When you want to pick specific commit from one branch and apply it on another branch.

Cherry-pick more

The โ€œgit squashโ€ enables you to merge multiple commits into a single, cleaner commit.

Combine all those commits into a single commit. Use git rebase -i HEAD~n (where n is the number of commits to squash).

In the interactive rebase, mark commits as โ€œsquashโ€ to combine them into a single commit.

โ“What is the home path of the Jenkins file?

For default installation location to C:\Program Files\Jenkins, a file called initialAdminPassword can be found under C:\Program Files\Jenkins\secrets.

However, if a custom path for Jenkins installation was selected, then you should check that location for initialAdminPassword file.

The default location for the Jenkins configuration file on Ubuntu and Debian is /etc/default/jenkins.

If you are working with RedHat, CentOS, (or) Fedora, the Jenkins configuration file is located at /etc/sysconfig/jenkins.

MAC OS

/Users/myusername/.jenkins/secrets/initialAdminPassword

โ“How will you take a backup in Jenkins? Mention the plugin you would install?

From the main menu select Manage Jenkins, then go to Plugins>Available and search for backup.

There are two other alternatives to this plugin:

The SCM Sync configuration plugin allows automatically tracking changes brought to the global configuration of Jenkins and to the jobs configuration into a configuration management system (Subversion, etc.).

The thinBackup plugin focuses on backuping Jenkinsโ€™s global configuration and jobs configuration. It also offers a scheduling feature (if you think the efforts on this plugin and the Backup one should be merged, just notify us!).

โ“How can a pipeline be triggered in Jenkins?

Manual Build Trigger

Scheduled Build Trigger

SCM (Source Code Management) Trigger

Webhooks Trigger

Dependency Build Trigger

Parameterized Build Trigger

Pipeline Trigger

Remote API Trigger

Plugin-Based Triggers

Create the job to be triggered. Type the project name โ€œIbbusโ€ (it will be triggered with this name in the pipeline) and select the freestyle project.

Create the Pipeline to trigger. Type the project name โ€œIbbusโ€ and select the pipeline project.

Test the Trigger.

โ“What are the plugins you are familiar with in Jenkins?

Git

Build Pipeline

Maven

Jira

Amazon Ec2

Kubernetes

AWS Code Deploy

โ“What is healing in Kubernetes? What about in OpenShift?

Kubernetes implements self-healing at the Application Layer. This means that if your app is well containerized and a pod crashes, Kubernetes will work to reschedule it as soon as possible. Containers are made available for clients only if they are ready to serve.

Red Hat OpenShift is a cloud-based Kubernetes platform that helps developers build applications. It offers automated installation, upgrades, and life cycle management throughout the container stack โ€“ the operating system, Kubernetes and cluster services, and applications โ€“ on any cloud.

โ“In Ansible, where are the hosts stored?

The default location for the inventory file is /etc/ansible/hosts. You can also create project-specific inventory files in alternate locations.

โ“What is the home path of Ansible?

ansible.cfg (in the current directory)

~/.ansible.cfg (in the home directory) /etc/ansible/ansible.cfg.

โ“What elements are included in Kubernetes manifest files?

A Kubernetes Manifest file is a YAML (or) JSON file that describes the desired state of a Kubernetes object. These objects can include deployment, replica set, service, and more. Manifest files define the specifications of the object, such as its metadata, properties, and desired state.

โ“What are the two layers in Docker?

Base Image Layer

Intermediate Layers

Final Writable Layer

โ“What is the difference between CMD and ENTRYPOINT in Docker?

CMD is to provide defaults for an executing container.

ENTRYPOINT helps you to configure a container that you can run as an executable.

โ“What is a ReplicaSet and what is a Controller in Kubernetes?

ReplicaSet is a type of Kubernetes controller. It is responsible for maintaining a specified number of Pods running at any given time.

A controller in Kubernetes is a software loop that watches the shared state of the cluster through the API server and makes changes attempting to move the current state towards the desired state.

โ“What is uDeploy?

Udeploy, also known as IBM UrbanCode Deploy, is a product for automating the deployment of applications, middleware configuration, and database changes into various environments.

โ“How do you use Terraform TFS files to launch AWS cloud services?

Configure the โ€œdesired stateโ€ in Terraform files (*.tf).

Initialize the workspace using the command terraform init.

Create the plan using terraform plan.

Apply the plan using terraform apply.

Destroy the provisioned resources with terraform destroy, when we want to dispose of the infrastructure.

Thank you ๐Ÿ™ for taking the time to read our blog.

--

--

Always learning

เฎ•เฎฑเฏเฎฑเฏเฎ•เฏ เฎ•เฏŠเฎณเฏเฎณเฏเฎฎเฏ เฎฎเฎพเฎฃเฎตเฎฉเฏ...