Vous êtes sur la page 1sur 11

22.

Explain the different exception in


Selenium web driver
The exception is a standard word used by
programmers and exceptions are due to
which java program ends abruptly without
producing the expected result.
Below are the 10 common exceptions in
selenium web driver:
i. ElementNotSelectableException
ii. ElementNotVisibleException
iii. NoSuchFrameException
iv. NoSuchElementException
v. NoSuchWindowException
vi. SessionNotFoundException
vii. TimeoutException
viii.ConnectionClosedException
ix. WebDriverException
x. ElementNotInteractableException
23. Explain the different test types that
selenium supports
For web-based application, selenium testing
can be used
The test types that selenium supports are
i. Functional
ii. Regression
24. Explain the working of Chef with
architecture
Chef works based on a three-tier client-
server model. Here working units are known
as cookbooks and that are developed on the
chef workstation. By using command-line
utilities like a knife they are uploaded to the
Chef server and all the other nodes which
are showing in the architecture are registered
with the Chef server.
25. Explain the Chef Cookbooks
Cookbooks are working units of Chef, which
includes all the details related to working
units. Cookbooks can perform multiple tasks
and it also contains values about the desired
state of a node
Key components of a Cookbook are:
Recipes
Metadata
Attributes
Resources
Templates
Libraries
26.How do you deploy a web server by
using chef
Below are the ways to make the server as the
webserver, user need to follow the below
steps:
Install web package (httpd).
Create an empty file and put some web
content.
Start httpd service
create the recipe inside the cookbook and
write a ruby script which includes above 3
things then run the recipe.
Once you run the recipe successfully the
server became a web server.
Implementation Steps are as follows:
Connect to Linux Instance “workstation”
through putty.
Switch to the root user.
Create a new cookbook and name it as
“ktexperts-apache-cookbook”.
Create a new recipe and name it as
“ktexperts-apache-recipe”.
Change to the cookbooks directory.
Open the recipe “ktexperts-apache-
recipe.rb” and write an apache webserver
script in it.
Execute the Recipe or call chef-client.
Copy public IP from the console and check
it in the browser.
Modify Recipe “ktexperts-apache-recipe”
Execute the Recipe or call chef-client.
Refresh IPV4 Public IP in the browser.
27. What is Docker File How do you write
a DockerFile
A Dockerfile is a text file that has a list of
instructions on how to build a docker image.
It consists of a simple set of commands that
you need to use in your Dockerfile. There
are several commands like FROM, CMD,
ENTRYPOINT, VOLUME, ENV, and
more.
Open any text editor and create the first
DockerFile as shown as below:
FROM Ubuntu: latest
MAINTAINER Apponix
(apponix@domain.com)
28. Explain Docker and what are the
benefits of Docker
Docker is the methodology or tool create,
deploy, and run applications by using
containers, and containers allow a user to
package up their application with all the
requirements, such as libraries and other
dependencies and ship it all out as one single
package.
29. Write the Sample Docker file and
explain
FROM tomcat:8.0-alpine
LABEL
maintainer="apponix@apponix.com"
ADD apponix.war
/usr/local/tomcat/webapps/
EXPOSE 8080
CMD ["catalina.sh", "run"]
The FROM instruction initializes a new
build stage and sets the Base Image for the
next instructions.
The LABEL instruction sets the Author's
name of the generated images. It can be any
key-value pair in labels.
The ADD instruction copies directories,
files, or remote file URLs from and adds
them to the filesystem of the image at the
path .
The EXPOSE instruction tells Docker that
the container should listen on the specified
network ports at runtime.
The CMD instruction informs what to run
when the container is run.
30. Explain the port mapping in Docker.
If any user wants to make any container as a
web server by installing a web package on it.
To access the website which is running
inside the container, the user has to provide
the public IP. But Docker containers will not
have an IP address. To resolve this issue,
Docker came with a solution called Docker
Port Mapping. The user has to map the host
port to the public IP of the host machine.
Then the user’s request will be routed from
the host port to the container’s port.
31. What is Kubectl?
Kubectl controls the Kubernetes cluster
manager.
Kubectl is a command-line tool for
controlling clusters created by Kubernetes
Below is the syntax to run Kubectl
commands from the terminal:
kubectl [command] [TYPE] [NAME] [flags]
Command: Specifies the operation that we
want to perform on one or more resources,
for example, get, describe, create, delete
TYPE: Specifies the resource type.example:
pod, nodes
NAME: Specifies the name of the resource
you want to use and these names are case
sensitive
flags: Specifies flags that are optional. We
can use –server or –s flags. These flags are
to specify the address and port of the
Kubernetes API server.
32. Explain namespace in Kubernetes
Namespaces are Kubernetes objects which
partition a single Kubernetes into many
virtual clusters
By default, there are three namespaces
created in a cluster
Default
Kube-system,
Kube-public.
33. Explain Containers
A container is a standard unit of software
that packages up code and all its
dependencies so the application runs reliably
and quickly from one computing
environment to another.
Containers can include a base operating
system, libraries, files and folders,
environment variables, volume mount-
points, and application binaries.
34. Differentiate between Docker swarm
and Kubernetes
Kubernetes and Docker swarm both are
open-source orchestration platforms provide
much of the similar functionalities
Kubernetes: An application can be deployed
in Kubernetes utilizing a combination of
pods services (or microservices), and
deployments
Docker Swarm: An application can be
deployed as services or micro-services in a
swarm cluster in Docker Swarm. YAML
files can be utilized to identify multi-
container. Moreover, Docker compose can
install the application.
Installation & Cluster Configuration
Kubernetes: Installation is complicated; but
once set up, the cluster is very strong Docker
swarm: Installation is very simple, but the
cluster is not very strong
Graphical User Interface
Kubernetes: Kubernetes dashboard is
available Docker swarm: GUI is not
available
Scalability
Kubernetes: scales fast and Highly scalable
Docker swarm: scales 5x faster than
Kubernetes and highly scalable
Auto-Scaling
Kubernetes:Autoscaling can be done in
Kubernetes Docker swarm: Docker Swarm
cannot do auto-scaling
35. Explain the advantages of Docker
Below are the advantages of Docker are:
Containerization (No need of Guest OS)
Less Cost
No pre-allocation of RAM
Can easily run on Cloud/Virtual/physical
servers
Less time is required to create containers
Replication is Easy
36. What is the registry server in
Docker? Explain
Registry servers are own docker hub created
to store private docker images instead of
having it in public docker hub.
Registry servers can be created from the
registry image provided by Docker.
Users can store n no of private docker
images in the registry servers.
37.Explain the benefits of Ansible
The benefits of Ansible are:
Free – Ansible is an open-source tool
Simple: Setting up ansible is very simple. no
exceptional skills in coding are required to
work on Ansible
Efficient: No additional software is required
for installation
Agentless: Without the use of any additional
software, the clients can easily automate
their system using Ansible
Extensible – Depending on the automation
and networking needs of the users, Ansible
can easily offer extensions

Vous aimerez peut-être aussi