Search This Blog

Monday, 18 January 2021

DOCKER

 VIRTUAL MACHINES

Virtual machines (VMs) are an abstraction of physical hardware turning one server into many servers. The hypervisor allows multiple VMs to run on a single machine. Each VM includes a full copy of an operating system, the application, necessary binaries and libraries - taking up tens of GBs. VMs can also be slow to boot.

CONTAINERS

Containers are an abstraction at the app layer that packages code and dependencies together. Multiple containers can run on the same machine and share the OS kernel with other containers, each running as isolated processes in user space. Containers take up less space than VMs (container images are typically tens of MBs in size), can handle more applications and require fewer VMs and Operating systems.



Types of Containers

Linux Containers (LXC) — The original Linux container technology is Linux Containers, commonly known as LXC. LXC is a Linux operating system level virtualization method for running multiple isolated Linux systems on a single host.

Docker — Docker started as a project to build single-application LXC containers, introducing several changes to LXC that make containers more portable and flexible to use. It later morphed into its own container runtime environment. At a high level, Docker is a Linux utility that can efficiently create, ship, and run containers.

Benefits of Containers

  • Reduced IT management resources
  • Reduced size of snapshots
  • Quicker spinning up apps
  • Reduced & simplified security updates
  • Less code to transfer, migrate, upload workloads

Popular Container Providers

1) Linux Containers
  • LXC
  • LXD
  • CGManager
2) Docker
3) Windows Server Containers

Differences between Virtual Machines and Containers

                  Virtual Machines

              Containers

  1. Heavy weight
  2. Limited performance
  3. Each VM runs in its own OS
  4. Hardware-level virtualization
  5. Startup time in minutes
  6. Allocates required memory
  7. Fully Isolated and hence more secure

  1. Light weight
  2. Native Performance
  3. All containers share the host OS
  4. OS Virtualization
  5. Startup time in Milliseconds
  6. Requires less memory space
  7. Process-level isolation, possibly less secure















DOCKER ARCHITECTURE

Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface.


The Docker daemon

The Docker daemon (dockerd) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.

The Docker client

The Docker client (docker) is the primary way that many Docker users interact with Docker. When you use commands such as docker run, the client sends these commands to dockerd, which carries them out. The docker command uses the Docker API. The Docker client can communicate with more than one daemon.

Docker registries

A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker is configured to look for images on Docker Hub by default. You can even run your own private registry.

When you use the docker pull or docker run commands, the required images are pulled from your configured registry. When you use the docker push command, your image is pushed to your configured registry.

Docker objects

When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.

IMAGES

An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image which is based on the ubuntu image, but installs the Apache web server and your application, as well as the configuration details needed to make your application run.

You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.

CONTAINERS

A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.

By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container’s network, storage, or other underlying subsystems are from other containers or from the host machine.

A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that are not stored in persistent storage disappear.



Docker Installation :

Install docker using the following commands
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh





Check the docker version using the following command :
$ sudo docker version



Run a sample application using the following command

$ sudo docker run hello-world
vagrant@vagrant-ubuntu-trusty-64:~$ sudo docker run hello-world
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:297: copying bootstrap data to pipe caused \"write init-p: broken pipe\"": unknown.

If you get the above error , then run this command to update the docker version :  sudo apt-get install docker-ce=18.06.1~ce~3-0~ubuntu then run sudo docker run hello-world. So we are basically downgrading docker version to 18.06.1-ce








Verify if the image is created by running the following command
$ sudo docker images



Docker commands:

docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
The docker run command first creates a writeable container layer over the specified image, and then starts it using the specified command. That is, docker run is equivalent to the API /containers/create then /containers/(id)/start. A stopped container can be restarted with all its previous changes intact using docker start. See docker ps -a to view a list of all containers.

Examples:

docker run image   [ This command pulls the image from docker hub repository if not present in local repository and runs the image ]
docker run --name <name> image [ This command assigns a name to the docker image and runs it ]

More examples on docker run command : 

docker run -i -t ubuntu /bin/bash
When you run this command, the following happens (assuming you are using the default registry configuration):

  1. If you do not have the ubuntu image locally, Docker pulls it from your configured registry, as though you had run docker pull ubuntu manually.
  2. Docker creates a new container, as though you had run a docker container create command manually.
  3. Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.
  4. Docker creates a network interface to connect the container to the default network, since you did not specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine’s network connection.
  5. Docker starts the container and executes /bin/bash. Because the container is running interactively and attached to your terminal (due to the -i and -t flags), you can provide input using your keyboard while the output is logged to your terminal.
  6. When you type exit to terminate the /bin/bash command, the container stops but is not removed. You can start it again or remove it.
docker run nginx
This command pulls nginx image from docker registry and runs it. 

docker ps
This command lists all the running containers information.


docker ps -a
This command lists all the running and previously exited container information


docker stop [OPTIONS] CONTAINER [CONTAINERS...]
This will stop one or more running containers. The main process inside the container will receive SIGTERM, and after a grace period, SIGKILL. Provide CONAINER ID or NAME to the docker stop command . 

docker stop -t CONTAINER [or] docker stop --time CONTAINER
--time or -t option is used for Seconds to wait for stop before killing it 
docker stop dreamy_albattani


docker ps command shows that the container is not running and docker ps -a command shows that the container exited.
docker rm  [OPTIONS] CONTAINER [CONTAINER...]
This will remove stopped or exited container permanently.

Options:
--force or -f  : Force the removal of running container (uses SIGKILL)
--link or -l    : Remove  the specific link
--volumes or -v : Removes anonymous volumes associated with the container

EXAMPLES

Remove a container:
docker rm /redis
This removes the container referenced under the link /redis.

Remove a link specified with --link on the default bridge network:
docker rm --link /webapp/redis
This removes the underlying link between /webapp and the /redis containers on the default bridge network, removing all network communication between the two containers. This does not apply when --link is used with user-specified networks.

Force-remove a running container:
docker rm --force redis
This command force-removes a running container.
The main process inside the container referenced under the link redis will receive SIGKILL, then the container will be removed.

Remove all stopped containers:
docker rm $(docker ps -a -q)
This command deletes all stopped containers. The command docker ps -a -q above returns all existing container IDs and passes them to the rm command which deletes them. Running containers are not deleted.

Remove a container and its volumes:
docker rm -v redis
This command removes the container and any volumes associated with it. Note that if a volume was specified with a name, it will not be removed.

Remove a container and selectively remove volumes:
docker create -v awesome:/foo -v /bar --name hello redis
docker rm -v hello
In this example, the volume for /foo remains intact, but the volume for /bar is removed. The same behavior holds for volumes inherited with --volumes-from.



docker images [OPTIONS] [REPOSITORY[:TAG]]
This command will show all top level images, their repository and tags, and their size

Docker images have intermediate layers that increase reusability, decrease disk usage, and speed up docker build by allowing each step to be cached. These intermediate layers are not shown by default.
The SIZE is the cumulative space taken up by the image and all its parent images. This is also the disk space used by the contents of the Tar file created when you docker save an image.
An image will be listed more than once if it has multiple repository names or tags. This single image (identifiable by its matching IMAGE ID) uses up the SIZE listed only once.

OPTIONS
-all or -a            : Show all images (default hides intermediate images)
--digests            : Show digests
--filter or -f       : Filter output based on conditions provided
--format            : Pretty-print images using a Go template
--no-trunc         : Don't truncate output
--quiet or -q      : Only show image IDs

Examples

List the most recent images
docker images

List images by name and tag
docker images [REPOSITORY]
If you specify repository but no TAG , the docker images command lists all images in the given repository
docker images [REPOSITORY[:TAG]]
If both REPOSITORY and TAG are provided, only images matching that repository are listed. If nothing matches the list is empty.

List full length image IDs
docker images --no-trunc
This will list images with full length IDs and don't truncate the output.

List image digests
docker images --digests
Images that use the v2 or later format have a content-addressable identifier called a digest. As long as the input used to generate the image is unchanged, the digest value is predictable. To list image digest values, use the --digests flag
When pushing or pulling to a 2.0 registry, the push or pull command output includes the image digest. You can pull using a digest value. You can also reference by digest in create, run, and rmi commands, as well as the FROM image reference in a Dockerfile.

Filtering
The filtering flag (-f or --filter) format is of “key=value”. If there is more than one filter, then pass multiple flags (e.g., --filter "foo=bar" --filter "bif=baz")

The currently supported filters are:
dangling (boolean - true or false)
label (label=<key> or label=<key>=<value>)
before (<image-name>[:<tag>], <image id> or <image@digest>) - filter images created before given id or references
since (<image-name>[:<tag>], <image id> or <image@digest>) - filter images created since given id or references
reference (pattern of an image reference) - filter images whose reference matches the specified pattern

docker images --filter "dangling=true"
This will display untagged images that are the leaves of the images tree (not intermediary layers). These images occur when a new build of an image takes the repo:tag away from the image ID, leaving it as <none>:<none> or untagged. A warning will be issued if trying to remove an image when a container is presently using it. By having this flag it allows for batch cleanup.

You can use this in conjunction with docker rmi 
docker rmi $(docker images -f "dangling=true" -q)

Docker warns you if any containers exist that are using these untagged images.

Format the output

The formatting option (--format) will pretty print container output using a Go template

.ID                 Image ID

.Repository Image repository

.Tag                 Image tag

.Digest         Image digest

.CreatedSince Elapsed time since the image was created

.CreatedAt Time when the image was created

.Size         Image disk size

Examples

docker images --format "{{.ID}}: {{.Repository}}"

docker images --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}"


   #docker images 


    #docker images nginx


    #docker images --no-trunc


    #docker images --digests



docker rmi

docker rmi [OPTIONS] IMAGE [IMAGES...]

OPTIONS
--force or -f    : Force removal of the image
--no-prune      : Do not delete untagged parents

Removes (and un-tags) one or more images from the host node. If an image has multiple tags, using this command with the tag as a parameter only removes the tag. If the tag is the only one for the image, both the image and the tag are removed.
This does not remove images from a registry. You cannot remove an image of a running container unless you use the -f option. To see all images on a host use the docker image ls command.

Examples:
You can remove an image using its short or long ID, its tag, or its digest. If an image has one or more tags referencing it, you must remove all of them before the image is removed. Digest references are removed automatically when an image is removed by tag.

 root@vagrant-ubuntu-trusty-64:~# docker pull nginx:1



root@vagrant-ubuntu-trusty-64:~# docker images


root@vagrant-ubuntu-trusty-64:~# docker rmi f6d0b4767a6c
Error response from daemon: conflict: unable to delete f6d0b4767a6c (must be forced) - image is referenced in multiple repositories


This image can't be removed because it is tagged in multiple repositories. Use -f option to force. 
I have removed the tag by running the following command.

root@vagrant-ubuntu-trusty-64:~# docker rmi nginx:1


root@vagrant-ubuntu-trusty-64:~# docker images


root@vagrant-ubuntu-trusty-64:~# docker rmi f6d0b4767a6c
command has been executed successfully after removing the tag.


root@vagrant-ubuntu-trusty-64:~# docker rmi -f f6d0b4767a6c
If you use the -f flag and specify the image’s short or long ID, then this command untags and removes all images that match the specified ID.


docker pull

docker pull [OPTIONS] NAME[:TAG|@DIGEST]
OPTIONS
--all-tags or -a              : Download all tagged images in the repository
--disable-content-trust : Skip image verification
--platform                    : Set platform if server is multi-platform capable
--quiet or -q                 : Suppress verbose output

Docker Hub contains many pre-built images that can pull and try without needing to define and configure your own. 

If you are behind an HTTP proxy server, for example in corporate settings, before open a connect to registry, you may need to configure the Docker daemon’s proxy settings, using the HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables. To set these environment variables on a host using systemd, refer to the control and configure Docker with systemd for variables configuration.

By default the Docker daemon will pull three layers of an image at a time. If you are on a low bandwidth connection this may cause timeout issues and you may want to lower this via the --max-concurrent-downloads daemon option.

Examples:

Pull an image from Docker Hub
To download a particular image, or set of images (i.e., a repository), use docker pull. If no tag is provided, Docker Engine uses the :latest tag as a default.

root@vagrant-ubuntu-trusty-64:~# docker pull nginx


Docker images can consist of multiple layers. In the example above, the image consists of 5 layers. These layers can be reused by images. 
Layer 1: a076a628af6f
Layer 2: 0732ab25fa22
Layer 3: d7f36f6fe38f
Layer 4: f72584a26f32
Layer 5: 7125e4df9063

root@vagrant-ubuntu-trusty-64:~# docker pull nginx:1
Pulling nginx:1 image only pulls its metadata, but not its layers, because layers are already present locally.


Pull an image by digest (immutable identifier)

In some cases you don’t want images to be updated to newer versions, but prefer to use a fixed version of an image. Docker enables you to pull an image by its digest. When pulling an image by digest, you specify exactly which version of an image to pull. Doing so, allows you to “pin” an image to that version, and guarantee that the image you’re using is always the same.

root@vagrant-ubuntu-trusty-64:~# docker pull ubuntu:14.04


root@vagrant-ubuntu-trusty-64:~# docker pull ubuntu@sha256:63fce984528cec8714c365919882f8fb64c8a3edf23fdfa0b218a2756125456f
It says image is up to date as we have already pulled the same version earlier.


Pull from a different registry
By default, docker pull pulls images from Docker Hub. It is also possible to manually specify the path of a registry to pull from. For example, if you have set up a local registry, you can specify its path to pull from it. A registry path is similar to a URL, but does not contain a protocol specifier (https://).

docker pull myregistry.local:5000/testing/test-image

Pull a repository with multiple images
By default, docker pull pulls a single image from the registry. A repository can contain multiple images. To pull all images from a repository, provide the -a (or --all-tags) option when using docker pull.

root@vagrant-ubuntu-trusty-64:~# docker pull --all-tags fedora
This command pulls all images from the fedora repository:

docker exec
docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
The docker exec command runs a new command in a running container.
The command started using docker exec only runs while the container’s primary process (PID 1) is running, and it is not restarted if the container is restarted.
COMMAND will run in the default directory of the container. If the underlying image has a custom directory specified with the WORKDIR directive in its Dockerfile, this will be used instead.
COMMAND should be an executable, a chained or a quoted command will not work. Example: docker exec -ti my_container "echo a && echo b" will not work, but docker exec -ti my_container sh -c "echo a && echo b" will.

OPTIONS:

--detach or -d        : Detached mode: run command in the background
--detach-keys         : Override the key sequence for detaching a container
--env or -e           : Set environment variables
--env-file            : Read in a file of environment
--interactive or -i   : Keep STDIN open even if not attached
--privileged          : Give extended privileges to the command
--tty or -t           : Allocate a pseudo-TTY
--user or -u          : username or UID
--workdir or -w       : Working directory inside the container

root@vagrant-ubuntu-trusty-64:~# docker run --name ubuntu_bash --rm -i -t ubuntu bash
This command created a new ubuntu bash session. This is highlighted in yellow. 


root@vagrant-ubuntu-trusty-64:~#  docker exec -d ubuntu_bash touch /tmp/execWorks
This will create a new file /tmp/execWorks inside the running container ubuntu_bash, in the background.


root@vagrant-ubuntu-trusty-64:~# docker exec -it -e VAR=1 ubuntu_bash bash
This will create a new Bash session in the container ubuntu_bash with environment variable $VAR set to “1”. Note that this environment variable will only be valid on the current Bash session.


root@vagrant-ubuntu-trusty-64:~# docker exec -it -w /root ubuntu_bash pwd
By default docker exec command runs in the same working directory set when container was created. You can select working directory for the command using -w option




Linux package management with YUM and RPM

YUM 

YUM is the primary package management tool for installing, updating, removing, and managing software packages in Red Hat Enterprise Linux. YUM performs dependency resolution when installing, updating, and removing software packages. YUM can manage packages from installed repositories in the system or from .rpm packages. The main configuration file for YUM is at /etc/yum.conf, and all the repos are at /etc/yum.repos.d.

Syntax: yum -[option] [command] [package]

Options:

-y : Answers yes to all the questions

-C : Runs from system cache

--security : Includes packages that provide a fix for security issues

--skip-broken : Skips packages causing problems

-v : Verbose

1)  yum  install package 

     Installs the specified packages

2) yum remove package

    Removes the specified package

3) yum search package

    Searches package metadata for keywords

4) yum info package

    Lists description

5) yum update

    Updates each package to the latest version

    yum update package

    updates an existing package specified 

6) yum repolist package

    Lists repositories

7) yum history

    Displays what was happened in the past transactions

8) yum list 

   Lists all available packages

9) yum list installed

  Lists installed packages

10) yum provides file 

    Displays which package a particular file belongs to 

    Ex: yum provides /etc/sysconfig/nfs


RPM

RPM is a popular package management tool in Red Hat Enterprise Linux-based distros. Using RPM, you can install, uninstall, and query individual software packages. Still, it cannot manage dependency resolution like YUM. RPM does provide you useful output, including a list of required packages. An RPM package consists of an archive of files and metadata. Metadata includes helper scripts, file attributes, and information about packages.

RPM maintains a database of installed packages, which enables powerful and fast queries. The RPM database is inside /var/lib, and the file is named __db*.

RPM has some basic modes: query, verify, install, upgrade, erase, show querytags, show configuration. At least one of these modes needs to be selected to perform package management tasks. Every mode has its own set of options. For example, install mode i has its own set of installation options. Options for the modes are found on the RPM man pages at man rpm.

Commonly used modes:

-i : Installs a package

-U : Upgrades a package

-e : Erases a package

-V : Verifies a package

-q : Queries a package

Commonly used General Options :

-? or --help : Prints help

--version    : Prints Version Number

-v           : Prints Verbose Output

To install or upgrade an .rpm package using RPM, issue this command:

rpm -i package-file

rpm -U package-file

rpm -ivh package-file

The flag -i is for install, U is for upgrade, v for verbose, h for hash (this option displays the # as a progress bar for the operation). In this example, v and h are optional flags.

To query for a package using RPM issue following command:

rpm -q query-options package

rpm -qa query-options package

Option a queries all installed packages on the system.


To erase a package, use the following command:

rpm -e erase-options package-name

rpm -evh vim-enhanced


Create local repository and install packages using local repository

[clint@stbkp01 ~]$ sudo su -

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.
[sudo] password for clint: 

[root@stbkp01 ~]# yum repolist    

Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
repolist: 0

[root@stbkp01 ~]# cat>/etc/yum.repos.d/local_yum.repo

[local_yum]
name=local_yum 
baseurl=file:///packages/downloaded_rpms/
enabled=1
gpgcheck=0
protect=1
[root@stbkp01 ~]# ls /packages/downloaded_rpms/
apr-1.4.8-5.el7.x86_64.rpm                   perl-parent-0.225-244.el7.noarch.rpm
apr-util-1.5.2-6.el7.x86_64.rpm              perl-PathTools-3.40-5.el7.x86_64.rpm
avahi-libs-0.6.31-19.el7.x86_64.rpm          perl-Pod-Escapes-1.04-294.el7_6.noarch.rpm
centos-logos-70.0.6-3.el7.centos.noarch.rpm  perl-podlators-2.5.1-3.el7.noarch.rpm
cups-libs-1.6.3-40.el7.x86_64.rpm            perl-Pod-Perldoc-3.20-4.el7.noarch.rpm
gpm-libs-1.20.7-6.el7.x86_64.rpm             perl-Pod-Simple-3.28-4.el7.noarch.rpm
groff-base-1.22.2-8.el7.x86_64.rpm           perl-Pod-Usage-1.63-3.el7.noarch.rpm
httpd-2.4.6-90.el7.centos.x86_64.rpm         perl-Scalar-List-Utils-1.27-248.el7.x86_64.rpm
httpd-tools-2.4.6-90.el7.centos.x86_64.rpm   perl-Socket-2.010-4.el7.x86_64.rpm
jansson-2.10-1.el7.x86_64.rpm                perl-Storable-2.45-3.el7.x86_64.rpm
libldb-1.4.2-1.el7.x86_64.rpm                perl-Text-ParseWords-3.29-4.el7.noarch.rpm
libtalloc-2.1.14-1.el7.x86_64.rpm            perl-threads-1.87-4.el7.x86_64.rpm
libtdb-1.3.16-1.el7.x86_64.rpm               perl-threads-shared-1.43-6.el7.x86_64.rpm
libtevent-0.9.37-1.el7.x86_64.rpm            perl-Time-HiRes-1.9725-3.el7.x86_64.rpm
libwbclient-4.9.1-10.el7_7.x86_64.rpm        perl-Time-Local-1.2300-2.el7.noarch.rpm
mailcap-2.1.41-2.el7.noarch.rpm              pytalloc-2.1.14-1.el7.x86_64.rpm
perl-5.16.3-294.el7_6.x86_64.rpm             repodata
perl-Carp-1.26-244.el7.noarch.rpm            samba-4.9.1-10.el7_7.x86_64.rpm
perl-constant-1.27-2.el7.noarch.rpm          samba-client-libs-4.9.1-10.el7_7.x86_64.rpm
perl-Encode-2.51-7.el7.x86_64.rpm            samba-common-4.9.1-10.el7_7.noarch.rpm
perl-Exporter-5.68-3.el7.noarch.rpm          samba-common-libs-4.9.1-10.el7_7.x86_64.rpm
perl-File-Path-2.09-2.el7.noarch.rpm         samba-common-tools-4.9.1-10.el7_7.x86_64.rpm
perl-File-Temp-0.23.01-3.el7.noarch.rpm      samba-libs-4.9.1-10.el7_7.x86_64.rpm
perl-Filter-1.49-3.el7.x86_64.rpm            vim-common-7.4.629-6.el7.x86_64.rpm
perl-Getopt-Long-2.40-3.el7.noarch.rpm       vim-enhanced-7.4.629-6.el7.x86_64.rpm
perl-HTTP-Tiny-0.033-3.el7.noarch.rpm        vim-filesystem-7.4.629-6.el7.x86_64.rpm
perl-libs-5.16.3-294.el7_6.x86_64.rpm        wget-1.14-18.el7_6.1.x86_64.rpm
perl-macros-5.16.3-294.el7_6.x86_64.rpm      which-2.20-7.el7.x86_64.rpm

[root@stbkp01 ~]# yum install vim-enhanced

Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
local_yum                                                                                              | 2.9 kB  00:00:00     
local_yum/primary_db                                                                                   |  57 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package vim-enhanced.x86_64 2:7.4.629-6.el7 will be installed
--> Processing Dependency: vim-common = 2:7.4.629-6.el7 for package: 2:vim-enhanced-7.4.629-6.el7.x86_64
--> Processing Dependency: which for package: 2:vim-enhanced-7.4.629-6.el7.x86_64
--> Processing Dependency: perl(:MODULE_COMPAT_5.16.3) for package: 2:vim-enhanced-7.4.629-6.el7.x86_64
--> Processing Dependency: libperl.so()(64bit) for package: 2:vim-enhanced-7.4.629-6.el7.x86_64
--> Processing Dependency: libgpm.so.2()(64bit) for package: 2:vim-enhanced-7.4.629-6.el7.x86_64
--> Running transaction check
---> Package gpm-libs.x86_64 0:1.20.7-6.el7 will be installed
---> Package perl.x86_64 4:5.16.3-294.el7_6 will be installed
--> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl-macros for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Getopt::Long) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(File::Temp) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Exporter) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-294.el7_6.x86_64
---> Package perl-libs.x86_64 4:5.16.3-294.el7_6 will be installed
---> Package vim-common.x86_64 2:7.4.629-6.el7 will be installed
--> Processing Dependency: vim-filesystem for package: 2:vim-common-7.4.629-6.el7.x86_64
---> Package which.x86_64 0:2.20-7.el7 will be installed
--> Running transaction check
---> Package perl-Carp.noarch 0:1.26-244.el7 will be installed
---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed
---> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed
---> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed
---> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed
---> Package perl-Getopt-Long.noarch 0:2.40-3.el7 will be installed
--> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-3.el7.noarch
--> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-3.el7.noarch
---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed
---> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed
--> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
--> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
---> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed
---> Package perl-Socket.x86_64 0:2.010-4.el7 will be installed
---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed
---> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed
---> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed
---> Package perl-constant.noarch 0:1.27-2.el7 will be installed
---> Package perl-macros.x86_64 4:5.16.3-294.el7_6 will be installed
---> Package perl-threads.x86_64 0:1.87-4.el7 will be installed
---> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed
---> Package vim-filesystem.x86_64 2:7.4.629-6.el7 will be installed
--> Running transaction check
---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed
---> Package perl-Pod-Escapes.noarch 1:1.04-294.el7_6 will be installed
---> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed
--> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch
--> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch
---> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed
--> Running transaction check
---> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed
--> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
--> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
--> Processing Dependency: groff-base for package: perl-Pod-Perldoc-3.20-4.el7.noarch
---> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed
--> Running transaction check
---> Package groff-base.x86_64 0:1.22.2-8.el7 will be installed
---> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed
---> Package perl-parent.noarch 1:0.225-244.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================
 Package                               Arch                  Version                           Repository                Size
==============================================================================================================================
Installing:
 vim-enhanced                          x86_64                2:7.4.629-6.el7                   local_yum                1.1 M
Installing for dependencies:
 gpm-libs                              x86_64                1.20.7-6.el7                      local_yum                 32 k
 groff-base                            x86_64                1.22.2-8.el7                      local_yum                942 k
 perl                                  x86_64                4:5.16.3-294.el7_6                local_yum                8.0 M
 perl-Carp                             noarch                1.26-244.el7                      local_yum                 19 k
 perl-Encode                           x86_64                2.51-7.el7                        local_yum                1.5 M
 perl-Exporter                         noarch                5.68-3.el7                        local_yum                 28 k
 perl-File-Path                        noarch                2.09-2.el7                        local_yum                 26 k
 perl-File-Temp                        noarch                0.23.01-3.el7                     local_yum                 56 k
 perl-Filter                           x86_64                1.49-3.el7                        local_yum                 76 k
 perl-Getopt-Long                      noarch                2.40-3.el7                        local_yum                 56 k
 perl-HTTP-Tiny                        noarch                0.033-3.el7                       local_yum                 38 k
 perl-PathTools                        x86_64                3.40-5.el7                        local_yum                 82 k
 perl-Pod-Escapes                      noarch                1:1.04-294.el7_6                  local_yum                 51 k
 perl-Pod-Perldoc                      noarch                3.20-4.el7                        local_yum                 87 k
 perl-Pod-Simple                       noarch                1:3.28-4.el7                      local_yum                216 k
 perl-Pod-Usage                        noarch                1.63-3.el7                        local_yum                 27 k
 perl-Scalar-List-Utils                x86_64                1.27-248.el7                      local_yum                 36 k
 perl-Socket                           x86_64                2.010-4.el7                       local_yum                 49 k
 perl-Storable                         x86_64                2.45-3.el7                        local_yum                 77 k
 perl-Text-ParseWords                  noarch                3.29-4.el7                        local_yum                 14 k
 perl-Time-HiRes                       x86_64                4:1.9725-3.el7                    local_yum                 45 k
 perl-Time-Local                       noarch                1.2300-2.el7                      local_yum                 24 k
 perl-constant                         noarch                1.27-2.el7                        local_yum                 19 k
 perl-libs                             x86_64                4:5.16.3-294.el7_6                local_yum                688 k
 perl-macros                           x86_64                4:5.16.3-294.el7_6                local_yum                 44 k
 perl-parent                           noarch                1:0.225-244.el7                   local_yum                 12 k
 perl-podlators                        noarch                2.5.1-3.el7                       local_yum                112 k
 perl-threads                          x86_64                1.87-4.el7                        local_yum                 49 k
 perl-threads-shared                   x86_64                1.43-6.el7                        local_yum                 39 k
 vim-common                            x86_64                2:7.4.629-6.el7                   local_yum                5.9 M
 vim-filesystem                        x86_64                2:7.4.629-6.el7                   local_yum                 11 k
 which                                 x86_64                2.20-7.el7                        local_yum                 41 k
Transaction Summary
==============================================================================================================================
Install  1 Package (+32 Dependent packages)
Total download size: 19 M
Installed size: 63 M
Is this ok [y/d/N]: y
Downloading packages:
------------------------------------------------------------------------------------------------------------------------------
Total                                                                                         228 MB/s |  19 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : gpm-libs-1.20.7-6.el7.x86_64                                                                              1/33 
  Installing : 2:vim-filesystem-7.4.629-6.el7.x86_64                                                                     2/33 
  Installing : 2:vim-common-7.4.629-6.el7.x86_64                                                                         3/33 
  Installing : groff-base-1.22.2-8.el7.x86_64                                                                            4/33 
  Installing : 1:perl-parent-0.225-244.el7.noarch                                                                        5/33 
  Installing : perl-HTTP-Tiny-0.033-3.el7.noarch                                                                         6/33 
  Installing : perl-podlators-2.5.1-3.el7.noarch                                                                         7/33 
  Installing : perl-Pod-Perldoc-3.20-4.el7.noarch                                                                        8/33 
  Installing : 1:perl-Pod-Escapes-1.04-294.el7_6.noarch                                                                  9/33 
  Installing : perl-Encode-2.51-7.el7.x86_64                                                                            10/33 
  Installing : perl-Text-ParseWords-3.29-4.el7.noarch                                                                   11/33 
  Installing : perl-Pod-Usage-1.63-3.el7.noarch                                                                         12/33 
  Installing : 4:perl-libs-5.16.3-294.el7_6.x86_64                                                                      13/33 
  Installing : 4:perl-macros-5.16.3-294.el7_6.x86_64                                                                    14/33 
  Installing : perl-Storable-2.45-3.el7.x86_64                                                                          15/33 
  Installing : perl-Exporter-5.68-3.el7.noarch                                                                          16/33 
  Installing : perl-constant-1.27-2.el7.noarch                                                                          17/33 
  Installing : perl-Time-Local-1.2300-2.el7.noarch                                                                      18/33 
  Installing : perl-Socket-2.010-4.el7.x86_64                                                                           19/33 
  Installing : perl-Carp-1.26-244.el7.noarch                                                                            20/33 
  Installing : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                                                                    21/33 
  Installing : perl-PathTools-3.40-5.el7.x86_64                                                                         22/33 
  Installing : perl-Scalar-List-Utils-1.27-248.el7.x86_64                                                               23/33 
  Installing : 1:perl-Pod-Simple-3.28-4.el7.noarch                                                                      24/33 
  Installing : perl-File-Temp-0.23.01-3.el7.noarch                                                                      25/33 
  Installing : perl-File-Path-2.09-2.el7.noarch                                                                         26/33 
  Installing : perl-threads-shared-1.43-6.el7.x86_64                                                                    27/33 
  Installing : perl-threads-1.87-4.el7.x86_64                                                                           28/33 
  Installing : perl-Filter-1.49-3.el7.x86_64                                                                            29/33 
  Installing : perl-Getopt-Long-2.40-3.el7.noarch                                                                       30/33 
  Installing : 4:perl-5.16.3-294.el7_6.x86_64                                                                           31/33 
  Installing : which-2.20-7.el7.x86_64                                                                                  32/33 
install-info: No such file or directory for /usr/share/info/which.info.gz
  Installing : 2:vim-enhanced-7.4.629-6.el7.x86_64                                                                      33/33 
  Verifying  : perl-HTTP-Tiny-0.033-3.el7.noarch                                                                         1/33 
  Verifying  : perl-threads-shared-1.43-6.el7.x86_64                                                                     2/33 
  Verifying  : perl-Storable-2.45-3.el7.x86_64                                                                           3/33 
  Verifying  : 1:perl-Pod-Escapes-1.04-294.el7_6.noarch                                                                  4/33 
  Verifying  : perl-Exporter-5.68-3.el7.noarch                                                                           5/33 
  Verifying  : perl-constant-1.27-2.el7.noarch                                                                           6/33 
  Verifying  : perl-PathTools-3.40-5.el7.x86_64                                                                          7/33 
  Verifying  : 1:perl-parent-0.225-244.el7.noarch                                                                        8/33 
  Verifying  : which-2.20-7.el7.x86_64                                                                                   9/33 
  Verifying  : 4:perl-libs-5.16.3-294.el7_6.x86_64                                                                      10/33 
  Verifying  : groff-base-1.22.2-8.el7.x86_64                                                                           11/33 
  Verifying  : perl-File-Temp-0.23.01-3.el7.noarch                                                                      12/33 
  Verifying  : 1:perl-Pod-Simple-3.28-4.el7.noarch                                                                      13/33 
  Verifying  : perl-Time-Local-1.2300-2.el7.noarch                                                                      14/33 
  Verifying  : 4:perl-macros-5.16.3-294.el7_6.x86_64                                                                    15/33 
  Verifying  : perl-Socket-2.010-4.el7.x86_64                                                                           16/33 
  Verifying  : 2:vim-enhanced-7.4.629-6.el7.x86_64                                                                      17/33 
  Verifying  : perl-Carp-1.26-244.el7.noarch                                                                            18/33 
  Verifying  : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                                                                    19/33 
  Verifying  : perl-Scalar-List-Utils-1.27-248.el7.x86_64                                                               20/33 
  Verifying  : perl-Pod-Usage-1.63-3.el7.noarch                                                                         21/33 
  Verifying  : 2:vim-common-7.4.629-6.el7.x86_64                                                                        22/33 
  Verifying  : 2:vim-filesystem-7.4.629-6.el7.x86_64                                                                    23/33 
  Verifying  : perl-Encode-2.51-7.el7.x86_64                                                                            24/33 
  Verifying  : perl-Pod-Perldoc-3.20-4.el7.noarch                                                                       25/33 
  Verifying  : perl-podlators-2.5.1-3.el7.noarch                                                                        26/33 
  Verifying  : perl-File-Path-2.09-2.el7.noarch                                                                         27/33 
  Verifying  : perl-threads-1.87-4.el7.x86_64                                                                           28/33 
  Verifying  : gpm-libs-1.20.7-6.el7.x86_64                                                                             29/33 
  Verifying  : perl-Filter-1.49-3.el7.x86_64                                                                            30/33 
  Verifying  : perl-Getopt-Long-2.40-3.el7.noarch                                                                       31/33 
  Verifying  : perl-Text-ParseWords-3.29-4.el7.noarch                                                                   32/33 
  Verifying  : 4:perl-5.16.3-294.el7_6.x86_64                                                                           33/33 
Installed:
  vim-enhanced.x86_64 2:7.4.629-6.el7                                                                                         
Dependency Installed:
  gpm-libs.x86_64 0:1.20.7-6.el7           groff-base.x86_64 0:1.22.2-8.el7             perl.x86_64 4:5.16.3-294.el7_6       
  perl-Carp.noarch 0:1.26-244.el7          perl-Encode.x86_64 0:2.51-7.el7              perl-Exporter.noarch 0:5.68-3.el7    
  perl-File-Path.noarch 0:2.09-2.el7       perl-File-Temp.noarch 0:0.23.01-3.el7        perl-Filter.x86_64 0:1.49-3.el7      
  perl-Getopt-Long.noarch 0:2.40-3.el7     perl-HTTP-Tiny.noarch 0:0.033-3.el7          perl-PathTools.x86_64 0:3.40-5.el7   
  perl-Pod-Escapes.noarch 1:1.04-294.el7_6 perl-Pod-Perldoc.noarch 0:3.20-4.el7         perl-Pod-Simple.noarch 1:3.28-4.el7  
  perl-Pod-Usage.noarch 0:1.63-3.el7       perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 perl-Socket.x86_64 0:2.010-4.el7     
  perl-Storable.x86_64 0:2.45-3.el7        perl-Text-ParseWords.noarch 0:3.29-4.el7     perl-Time-HiRes.x86_64 4:1.9725-3.el7
  perl-Time-Local.noarch 0:1.2300-2.el7    perl-constant.noarch 0:1.27-2.el7            perl-libs.x86_64 4:5.16.3-294.el7_6  
  perl-macros.x86_64 4:5.16.3-294.el7_6    perl-parent.noarch 1:0.225-244.el7           perl-podlators.noarch 0:2.5.1-3.el7  
  perl-threads.x86_64 0:1.87-4.el7         perl-threads-shared.x86_64 0:1.43-6.el7      vim-common.x86_64 2:7.4.629-6.el7    
  vim-filesystem.x86_64 2:7.4.629-6.el7    which.x86_64 0:2.20-7.el7  
                 
Complete!






Sunday, 10 January 2021

weblogic 14c installation troubleshooting issues

 Issues you may encounter during weblogic 14c installations

The common issues you may encounter during installation if you don't meet prerequisites for installations.

1) You may run out of the disk space if there is no enough space on the Linux or windows system. The minimum disk space is required to install weblogic 14c is approximately 1.1G. You may encounter out of space issues if you have empty space less than that.

2) You may encounter /tmp file system space issue if you dont have enough space on the /tmp. /tmp should have 2.5 times of actual installation. Lets say if installation requires approximately 1.1G then your /tmp file system should have free space of 2.75G (1.1x2.5)

3) JDK compatibility: If you have different JDK version installed than the required then your installation may fail. For example, JDK8 or JDK11 and above are required for weblogic 14c and if you have installed lower version of jdk then your installation will fail.

 4) After installation of weblogic and when you are running JVMs you may encounter too may open files issues due to ulimit configuration. make sure you have updated right ulimit size as per the requirement. Example 1024 or 2048 . In come case your ulimit could be unlimited

5) You may encounter network issues during installation if you don't correct entries in /etc/host file. Make sure to run nslookup and reverse lookup commands on the Linux Machine.

6) Installation may fail if you haven't met Linux operating system requirement which are like missing packages required for weblogic14c of linux os etc.


Installation failure:

java -jar fmw_14.1.1.0.0_wls_lite_generic.jar

Launcher log file is /tmp/OraInstall2021-01-10_07-41-53AM/launcher2021-01-10_07-41-53AM.log.

Extracting the installer . . . . . . . . . . . . . . . . . . Done

Checking if CPU speed is above 300 MHz.   Actual 2893.177 MHz    Passed

Checking monitor: must be configured to display at least 256 colors.  DISPLAY environment variable not set.    Failed <<<<

Checking swap space: must be greater than 512 MB.   Actual 0 MB    Failed <<<<

Checking temp space: must be greater than 300 MB.   Actual 35323 MB    Passed

Some system prerequisite checks failed.

You must fulfill these requirements before continuing.


1) Error: Checking swap space: must be greater than 512 MB.   Actual 0 MB    Failed <<<<

Check the Mem and  swap space 

free -mh

             total       used       free     shared    buffers     cached

Mem:          489M       456M        33M       364K       4.0M       326M

-/+ buffers/cache:       125M       364M

Swap:           0B         0B         0B


Execute the following script to configure swap 


And verify the swap and rerun installation script

vagrant@vagrant-ubuntu-trusty-64:~$ free -mh
             total       used       free     shared    buffers     cached
Mem:          2.0G       386M       1.6G       360K        13M       248M
-/+ buffers/cache:       124M       1.8G
Swap:         1.0G         0B       1.0G

2) Error: Checking monitor: must be configured to display at least 256 colors.  DISPLAY environment variable not set.    Failed <<<<

Install and configure XmingServer : Instructions are below: 

Weblogic 14c Installation prerequisites

 Verify the Requirements of the Certification:

The certification document should be used to verify that the requirements of the certification are met. For example, if the certification document indicates that your product is certified for installation on Oracle Linux 7, this document should be used to verify that your Oracle Linux 7 system has met the required minimum specifications, such as disk space, available memory, specific platform packages and patches, and other operating system-specific items.

https://www.oracle.com/middleware/technologies/fusion-certification.html

Processor Requirements:

Oracle WebLogic Server and Coherence requires a minimum 1-GHz CPU.

Java Development Kit (JDK) Requirements:

To run installers in the 14c (14.1.1.0.0), you must have a certified JDK already installed on your system. For Example JDK 8 or JDK 11 for weblogic 14c

General Memory and Disk Space Requirements:

Memory requirements fall into two categories: physical memory (the amount of physical RAM installed on host) and the minimum available memory, which includes swap space in addition to the physical memory.

Note:Oracle recommends that for the performance of well-scaled production environments, the total Java heap memory allocations for all the Managed Servers per host add up to no more than 50% of the total physical memory on the host. If larger JVM heap sizes are required, or more managed servers are needed, physical memory should be increased accordingly.

Operating SystemMinimum Physical Memory RequiredMinimum Available Memory Required

Linux

4 GB

8 GB

UNIX

4 GB

8 GB

Windows

4 GB

8 GB

Considering the Impact of Open File and Process Limits on Memory Requirements:

When determining the memory requirements for a production environment, you should also take into account other operating system settings, including the number of file descriptors (open files) allowed per process and the number of processes required for each product or service that is targeted to a Managed Server.

You can see how many files are open with the following command

/usr/sbin/lsof | wc -l

563

To check your open file limits, use the commands below.

ulimit -n

1024

Setting the Operating System Open File and Processes Limit

1)Log in as root and edit the following file:

/etc/security/limits.conf

2)Add the following lines to the limits.conf file.

Copy* soft  nofile  4096

* hard  nofile  65536

* soft  nproc   2047

* hard  nproc   16384

The nofiles values represent the open file limit; the nproc values represent the number of processes limit.

3)Save the changes, close the limits.conf file.

If you are running Oracle Enterprise Linux 6 or Red Hat Linux 6, locate the following operating system configuration file:

4)Copy/etc/security/limits.d/90-nproc.conf

Make sure the same values are added to the 90-nproc.conf file; otherwise, the values in the 90-nproc.conf file can override the values in the limits.conf file.

5)Reboot the host computer.


Temporary Disk Space Requirements:

The installation program uses a temporary directory into which it extracts the files that are needed to install the software on the target system. During the installation process, your temporary directory must contain sufficient space to accommodate the compressed Java Run-time Environment (JRE) bundled with the installation program and an uncompressed copy of the JRE that is expanded into the temporary directory. The extracted files are deleted from the temporary directory after the installation process. The files in the temporary directory require approximately 2.5 times the space that is ultimately required for the installation.

While running the Oracle WebLogic Server installer for Windows, run the following command incase if you want to change the tmp location

java -Djava.io.tmpdir=<tmpdirpath> -jar fmw_14.1.1.0.0_wls.jar


Oracle WebLogic Server and Coherence Disk Space Requirements:

A Oracle WebLogic Server and Coherence installation using the Oracle WebLogic Server generic installer requires approximately 1.1 GB of disk space. The amount may vary by operating system. Installation size may be reduced by using the Oracle WebLogic Server lite, quick, or slim installers, or by using Coherence-only installers.


Network Requirements:

Typically, the computer on which you want to install Oracle WebLogic Server and Coherence is connected to the network.

Guidelines for a Correct Format of Entries in the /etc/hosts File:

To ensure that both forward lookup (find the IP address given the hostname) and reverse lookup (finding the hostname given the IP address) return the same results, make sure your /etc/hosts file is formatted correctly using the following guidelines:

1) The host name may contain only alphanumeric characters, hyphen, and period. The name must begin with an alphabetic character and end with an alphanumeric character.

2) Host names should be specified as fully qualified host names (host name with the appended domain name).

3) Lines cannot start with a blank space or tab character, but fields may be separated by any number of space or tab characters.

4) Comments are allowed and designated by a pound sign (#) preceding the comment text.

5) Trailing blank and tab characters are allowed.

6) Blank line entries are allowed.

7) Only one host entry per line is allowed.

Understanding IPv6 and Oracle Weblogic Server and Coherence:

Oracle Weblogic Server and Coherence support Internet Protocol Version 4 (IPv4) and Internet Protocol Version 6 (IPv6.) Among other features, IPv6 supports a larger address space (128 bits) than IPv4 (32 bits), providing an exponential increase in the number of computers that can be addressable on the Web.

An IPv6 address is expressed as 8 groups of 4 hexadecimal digits. For example:

2001:0db8:85a3:08d3:1319:8a2e:0370:7334

OS Requirements:

check the oracle support guidelines for Operating system requirements

DataBase Requrirements:

Find a certified Database from oracle support documentation

https://www.oracle.com/middleware/technologies/fusion-certification.html



Saturday, 9 January 2021

Weblogic 14c Installers and Types of installation

 Types of Weblogic Installers:

Generic Installer:

The generic installer includes all Oracle WebLogic Server and Oracle Coherence software, including examples, and is supported for all development and production purposes.

The Generic Installer Name is fmw_14.1.1.0.0_wls_lite_generic.jar

Quick Installer:

The quick installer is intended for development purposes. It includes all Oracle WebLogic Server and Oracle Coherence runtime software, but excludes examples and localized WebLogic console help files.

The Quick Installer Name is fmw_14.1.1.0.0_wls_lite_quick_generic.jar

Slim Installer/Slim Quick Installer:

The slim installer is for development and production usage of Docker or CRI-O images and containers in Kubernetes, when WebLogic console monitoring and configuration is not required. It includes all Oracle WebLogic Server and Oracle Coherence server runtime software, but excludes examples, the WebLogic console, WebLogic clients, Maven plug-ins and Java DB

The Slim Quick Installer Name is fmw_14.1.1.0.0_wls_lite_quick_slim_generic.jar

Types of installations:

There are 3 types of installations
1. GUI mode
2. Console mode
3. Silent mode

Note: You must have a certified JDK already installed on your system - For Weblogic 14c either jdk 1.8 or jdk 11

Weblogic 14c New features


Oracle WebLogic Server 14.1.1 is a new major version, adding support for Java Platform, Enterprise Edition (Java EE) 8, and Java SE 8 and 11.

It is supported on-premises and in the cloud, including support and tooling for running Oracle WebLogic Server in containers and Kubernetes, and certification on Oracle Cloud. 


Java EE 8 Support

##################

Oracle WebLogic Server 14c (14.1.1.0.0) is a fully compatible implementation of the Java Platform, Enterprise Edition (Java EE) Version 8.0

Java EE 8 support provided in WebLogic Server 14c (14.1.1.0.0) is described in the

following sections:

1. Java API for JSON Binding 1.0 (JSR 367)

2. Java API for JSON Processing 1.1 (JSR 374)

3. Java API for RESTful Web Services 2.1 (JSR 370)

4. JavaServer Faces 2.3 (JSR 372)

5. Java Servlet 4.0 (JSR 369)

6. Bean Validation 2.0 (JSR 380)

7. Contexts and Dependency Injection 2.0 (JSR 365)

8. Java EE Security API 1.0 (JSR 375)

9. Sample Applications Updated to cover Java EE 8 features. (Avitek Medical Records — MedRec)


JDK 11 Certification

#####################

Oracle WebLogic Server 14c (14.1.1.0.0) is certified for use with JDK 11, in addition to JDK 8. Supported Oracle WebLogic Server 14c (14.1.1.0.0) clients are certified for use with JDK 11.0.6


WebLogic Server Slim Installer

##############################

In Oracle WebLogic Server 14.1.1.0.0, in addition to the generic installer and the Fusion Middleware Infrastructure installer, you can use the slim installer to install and configure Oracle WebLogic Server and Coherence.

The slim installer does not contain examples, WebLogic Server Administration Console, WebLogic clients, Maven plug-ins and Java DB, and hence, has a smaller image size.

You can use this WebLogic Server installer for development, testing, and production purposes, in any infrastructure, such as, on premises (physical servers and virtual machines) or containers. Because it produces smaller WebLogic Server Docker or CRI-O images, this installer is particularly suitable for containers.

The slim installer file name is fmw_14.1.1.0.0_wls_lite_quick_slim_generic.jar.


Oracle GraalVM Enterprise Edition Certification

###############################################

Oracle WebLogic Server and Coherence 14.1.1.0.0 are certified to run on Oracle GraalVM Enterprise Edition.

Oracle GraalVM Enterprise Edition is a high performance runtime platform built on Oracle's enterprise-class Java SE. Its optimizing compiler accelerates WebLogic applications by rearranging compiled code, aggressive method inlining, escape analysis, advanced vectorization and more. Based on internal testing, you should experience up to a 5-10% performance improvement.


Runtime Improvements

#####################

Oracle WebLogic Server 14c (14.1.1.0.0) builds on support from prior WebLogic Server versions to improve the reliability, availability, scalability, and performance of WebLogic Server applications with regard to the use of clustered environments, Oracle database features, and multi data center architectures.

These improvements are described in the following topics:

1. Security

2. RESTful Web Services

3. Automatic Database Leasing Table Creation

4. Network Channels for JTA Communication

5. Application Update Using Edition-Based Redefinition

1) Security

===========

The new security features provided in Oracle WebLogic Server 14c (14.1.1.0.0) are described in the following sections:

1. Default Minimum TLS Protocol Version: As of Oracle WebLogic Server 14.1.1.0.0, the default minimum version of the Transport Layer Security (TLS) protocol configured in WebLogic Server is Version 1.2. Oracle recommends the use of TLS V1.2 or later in a production environment. WebLogic Server logs a warning if the TLS version is set below 1.2.

2. Default WebLogic Server Host Name Verifier:

In Oracle WebLogic Server 14c (14.1.1.0.0), the default host name verifier has changed from the BEA host name verifier to a wildcard host name verifier.

3. New RealmMBean Attributes for the Identity Assertion Cache Service:

The following new configuration attributes were added to the RealmMBean to improve the performance of the cache services used by the Identity Assertion provider:

IdentityAssertionCacheEnabled

IdentityAssertionCacheTTL

IdentityAssertionDoNotCacheContextElements

4. PKCS12 Default Keystore Type in JDK 11:

PKCS12 is an extensible, standard, and widely-supported format for storing cryptographic keys. In JDK 11, the JDK default keystore type has changed from JKS to PKCS12.

5. New SSL System Passphrase Property for PKCS12 Trust Keystores:

If you specify a trust keystore using the -Dweblogic.security.SSL.trustedCAkeystore command-line argument and the keystore type is PKCS12, then a password is required. You can specify the password using the -Dweblogic.security.SSL.trustedCAkeystorePassPhrase system property. The password is not necessary for JKS keystores.

6. ImportPrivateKey Utility Uses JDK Default Keystore Type:

In Oracle WebLogic Server 14.1.1.0.0 and later, the default value for the storetype argument of the ImportPrivateKey utility is determined by the default keystore type for the JDK.

The default keystore type for the JDK is defined by the keystore.type property in the java.security file. For JDK 8, the default is JKS. For JDK 11, the default is PKCS12. You can change the default by specifying the storetype property

7. Demo Certificates Contain the SAN Extension by Default:

As a result of an enhancement in WebLogic Server 14.1.1.0.0, the demonstration certificates generated by the CertGen utility by default contain the fully-qualified DNS name in the Subject Alternative Name (SAN) extension value, along with the host name as the common name (CN) value. However, you can create your certificate without the SAN extension and disable the fully-qualified DNS name using the -nosandnshost option at the command line. Optionally, you can specify additional host names, or IP addresses, or both, in the SAN extension value using the -a DNS:<hostname>,IP:<ip address> option.

8. Deprecated TLS Cipher Suites

Per Oracle security guidelines, the TLS cipher suites that are prefixed with TLS_RSA_ or contain _CBC_ are deprecated and are disabled by default. These disabled cipher suites are weak and do not provide sufficient security for your system. However, if necessary for your environment, you can enable these TLS cipher suites.

2. RESTful Web Services

=======================

Oracle WebLogic Server 14c (14.1.1.0.0) provides the following new and changed features for RESTful web services:

Cross-Origin Resource Sharing (CORS) Support for WebLogic Server REST APIs. The Restful Management Service API includes new headers that are used specifically for CORS control.

Adds support for Java EE 8.

Removes support for WebLogic Server Multitenant functionality and Resource Consumption Management.

3. Automatic Database Leasing Table Creation

============================================

Oracle WebLogic Server 14c (14.1.1.0.0) provides options to automatically create WebLogic cluster database leasing tables

4. Network Channels for JTA Communication

=========================================

Oracle WebLogic Server 14c (14.1.1.0.0) provides options to configure custom network channels for JTA communication. The network channels are used for JTA interserver communication.

5. Application Update Using Edition-Based Redefinition

======================================================

Edition-based redefinition (EBR) enables you to update the database component of an application while it is in use, thereby minimizing or eliminating application downtime.

When using EBR, a synchronized rolling update lets you update the configuration data concurrently with the new software version, thus ensuring that there is complete synchronization between the configuration and the software versions on the server.


Manageability Improvements

##########################

Oracle WebLogic Server 14c (14.1.1.0.0) continues to provide new management

features that simplify the configuration, monitoring, and ongoing management of

WebLogic Server domains and applications.

These features are described in the following sections:

1. Running Oracle WebLogic Server on Docker

Docker is a Linux-based container technology that enables you to quickly create lightweight clustered and nonclustered WebLogic Server domain configurations on a single or multi host OS, or virtual machines

2. WebLogic Deploy Tooling

The Oracle WebLogic Deploy Tooling (WDT) simplifies the automation of WebLogic Server domain provisioning and applications deployment.

3. WebLogic Image Tool

The Oracle WebLogic Image Tool lets you automate building, patching, and updating your WebLogic Server Docker images, including your own customized images.

4. WebLogic Server Kubernetes Operator

The Oracle WebLogic Server Kubernetes Operator is an application-specific controller that extends Kubernetes to create, configure, and manage instances of complex applications

5. WebLogic Monitoring Exporter

The Oracle WebLogic Monitoring Exporter is a web application that you can deploy on a WebLogic Server instance that you want to monitor.

6. WebLogic Logging Exporter

The Oracle WebLogic Logging Exporter provides an easy to configure, robust, and production-ready solution to access WebLogic Server log information through Elasticsearch and displayed in Kibana dashboards.


Database Interoperability

#########################

Database Interoperability

The certification matrices and My Oracle Support Certifications define the following terms to differentiate between types of database support:

1. Application Data Access

2. Database Dependent Features


1)Application Data Access

=========================

Application Data Access refers to those applications that use the database for data access only and do not take advantage of WebLogic Server features that are Database dependant. WebLogic Server support of databases used for application data access only are less restrictive than for database dependent features.

WebLogic Server provides support for application data access to databases using JDBC drivers that meet the following requirements:

The driver must be thread safe.

The driver must implement standard JDBC transactional calls, such as setAutoCommit() and setTransactionIsolation(), when used in transactional aware environments.

Note the following restrictions:

JDBC drivers that do not implement serializable or remote interfaces cannot pass objects to an RMI client application.

Simultaneous use of automatic database connection failover and load balancing and global transactions (XA) with a highly-available (HA) DBMS architecture is supported with Oracle DB RAC only, and only for the Oracle DB RAC versions indicated on the System worksheet. These HA capabilities are only supported by Active GridLink for RAC and Multi Data Sources with RAC. These HA capabilities are not supported on other Oracle DB RAC versions or with other HA DBMS technologies on other non-Oracle DB products. Multi Data Sources are supported on other Oracle DB versions, and with non-Oracle DB technologies, but not with simultaneous use of automatic failover and load balancing and global transactions.

Application data access to databases meeting the restrictions articulated above is supported on other Oracle DB versions, in addition to those documented in the certification matrix.

WebLogic Type 4 JDBC drivers also support the following databases. For these databases, WebLogic Server supports application data access only, and does not support WebLogic Server database dependent features:

DB2 for z/OS 10.1

Informix 11.7+

2)Database Dependent Features

=============================

When WebLogic Server features use a database for internal data storage, database support is more restrictive than for application data access. The following WebLogic Server features require internal data storage:

Container Managed Persistence (CMP)

Rowsets

JMS/JDBC Persistence and use of a WebLogic JDBC Store

JDBC Session Persistence

RDBMS Security Providers

Database Leasing (for singleton services and server migration)

JTA Logging Last Resource optimization

JDBC TLog


Deprecated Functionality (Oracle WebLogic Server 14c 14.1.1.0.0)

################################################################

The following functionality and components are deprecated in WebLogic Server 14c (14.1.1.0.0):

WebLogic Authorization and WebLogic Role Mapping Providers

WebLogic Authorization and WebLogic Role Mapping Providers

The WebLogic Authorization provider, which is referred to as the DefaultAuthorizer, and the WebLogic Role Mapping provider, which is referred to as the DefaultRoleMapper, have been deprecated in this release. Beginning with WebLogic Server 9.1, the XACML Authorization provider and the XACML Role Mapping provider are the default providers.


Removed Functionality and Components

####################################

Several components, deprecated in previous versions of WebLogic Server, are removed from Oracle WebLogic Server 14c (14.1.1.0.0).

WebLogic Server Multitenant Functionality and Resource Consumption Management

EJBGen

WebLogic Full and IIOP-Based Clients

WebLogic JMS Resource Adapter

Oracle Traffic Director (OTD)

Compatibility Setting for JTA Security Interoperability Mode

JMS Interop Modules

Administration Console Extensibility

WebLogic jCOM

Automated Cross-Site XA Transaction Recovery

DDInit and ddcreate Utilities


Tuesday, 7 July 2020

Automation using Python

## Sample python script for creating symlinks in different directory locations 

Input file: parameter-list.txt

/home/content/htdocs/lib/, ../../application/lib/core,core,1
/home/content/htdocs/modules/,../application/modules/core,core,2
/home/content/htdocs/resources/,../../resources/pdf,pdf,3

Python script:

# Author: Pavan Bandaru

import os
import shutil

if os.path.exists("/home/scripts/parameter-list.txt"):
    with open("/home/scripts/parameter-list.txt", "r") as file:
        for line in file:
            fields = line.split(",")
            path = fields[0]
            link = fields[1]
            fn = fields[2]
            source = fn
            destination = fn + "_old"
            os.chdir(path)
            if os.path.isfile(fn):
                shutil.move(source, destination)
                os.symlink(link, fn)
            else:
                os.symlink(link, fn)
else:
    print("File doesn't exist")



Tuesday, 16 October 2018

Ansible Command to copy files to destination

ansible -i  $host, -b -m copy -a 'src=/home/pavan/scripts/jars/  dest=/app/tomcat/instances/$domain/lib/ owner=tomcat group=tomcat mode=0750 force=yes' all