Total Pageviews

Search This Blog

Copyright to Cloud TechNet organization . Powered by Blogger.

Pages

Blogger templates

Thursday, 17 August 2023

Docker Basic Commands


1. check docker version

docker --version

2. To manage private docker images from docker client

docker login

3. To search any image from hub.docker.com

docker search <image name>

ex: docker search nginx

4. To download image from hub.docker.com

docker pull <image name>

ex: docker pull nginx

5. To check image list

docker images

or

docker image ls

6. To check detailed history of image

docker history <image name>

docker history nginx

7. To download specific version of image

docker pull <image name>:<Tag #>

ex: docker pull nginx:1.25.2

8. To inspect docker image

docker inspect image <image name>

ex: docker inspect image nginx

9. To check running containers

docker ps

10.To check all running & not running containers

docker ps -a

11.Create container from image

docker create <image name>

ex:docker create nginx

docker create <image name:Tag#>

ex:docker create nginx:1.24.0

12.how to run the container

docker start <container id> or <container name>

ex: docker start 2f32b2910411

docker start  wonderful_brahmagupta

13. create container with name

docker create --name <Type your container Name> <image name>

ex: docker create --name web-server01 nginx

14. Start container with name

docker start <container name>

ex: docker name web-server01

15. Stop the container

docker stop <container id> or <container name>

ex: docker stop web-server01

16. Remove the container

docker rm <container id>

17. Remove docker image

docker rmi <image id>

18. Forcefully remove docker image

docker rmi -f <image id>

19. Create container and start the container in single step

docker run --name web-server01 nginx
 
 
 
 

Tuesday, 15 August 2023

Installation of Docker on Amazon Linux:


Create a Linux Instance in AWS.

After Creating Connect the Instance to Putty Session.

Login Session as ec2-user then it's connects to Amazon Linux

 

 

For Root Login run the command sudo su and click enter

It's connects to root user

 

After Connecting to root user, run the command yum install docker -y

For Installation of Docker and click enter then Installation Starts

 

After successful installation it shows complete

 

After Docker Installation run some commands for information

For Docker service run the command service docker start

       Docker Version run the command docker –version

       Docker information run the command docker info

 

 
 
 

Sunday, 18 June 2023

Install Jenkins on Ubuntu server ?



1. Create Ubuntu 22.04 EC2 instances in any region.

2. Connect the server with Putty

3. Verify JDK versions in Ubuntu instance

$ sudo apt search jdk

4. Add apt repository for openjdk

$ sudo add-apt-repository ppa:openjdk-r/ppa

5. update ubuntu OS

$ sudo apt update

6. Install OpenJDK 11

$ sudo apt install openjdk-11-jdk

7. Install Jenkins on Ubuntu from jenkins.to website

https://www.jenkins.io/doc/book/installing/linux/


curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
  https://pkg.jenkins.io/debian binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins


8. Check the status of jenkins

$ systemctl status jenkins

9. Check if the service is enabled or not ?

$ systemctl is-enabled jenkins

10. Check port configuration in Jenkins server?

$ ps -ef | grep jenkins

11. Check whether the port 8080 is opened or not?

$ss -tunpl | grep 8080

12. How to connect jenkins server from browser?

www.pubip:8080

13. How to login for the first time in the jenkins web console with a temp password?

Note: temp password location is "/var/lib/jenkins/secrets/initialAdminPassword" by default

From putty: (you can run the below command to get temp password)

cat /var/lib/jenkins/secrets/initialAdminPassword


 
 

Wednesday, 1 March 2023

How to install CodeDeploy install on Amazon Linux | Git | Cloudtechnet


 To install CodeDeploy agent on Amazon Linux, you can follow these steps:

  1. Log in to your Amazon Linux instance using SSH.

  2. Update the package manager by running the following command:

    sudo yum update -y

  3. Install the CodeDeploy agent by running the following command:

    sudo yum install -y ruby

    sudo yum install -y aws-cli wget https://aws-codedeploy-ap-south-1.s3.ap-south-1.amazonaws.com/latest/install chmod +x ./install sudo ./install auto





Monday, 20 February 2023

How to configure environment variables for Git services in windows systems ?


 To configure environment variables for Git services in Windows systems, you can follow these steps:

  1. Open the Start menu and search for "Environment Variables".

  2. Click on "Edit the system environment variables".

  3. In the System Properties window that appears, click on the "Environment Variables" button.

  4. In the Environment Variables window, locate the "Path" variable under the "System Variables" section and click the "Edit" button.

  5. Click the "New" button and add the path to the Git installation directory, which should be something like "C:\Program Files\Git\bin".

  6. Click "OK" to close all the windows.

  7. Open a new command prompt or PowerShell window, and type "git" to verify that Git is now recognized as a command.

That's it! You have now configured the environment variables for Git in your Windows system. This will allow you to use Git commands from any directory in your system, without having to specify the full path to the Git executable every time.

Git basic commands


 Here are some basic Git commands that you can use to manage your code repository:

  1. git init: Initializes a new Git repository in the current directory.

  2. git clone <repository_url>: Clones an existing Git repository from the specified URL.

  3. git add <file_name>: Adds the specified file to the staging area.

  4. git add .: Adds all modified and new files to the staging area.

  5. git commit -m "<commit_message>": Commits the changes in the staging area to the repository, with the specified commit message.

  6. git push: Pushes the changes from your local repository to the remote repository.

  7. git pull: Pulls the changes from the remote repository to your local repository.

  8. git status: Shows the status of the current branch and any modified or untracked files.

  9. git log: Shows the commit history for the current branch.

  10. git branch: Shows a list of all branches in the repository, with an asterisk next to the currently checked out branch.

  11. git checkout <branch_name>: Switches to the specified branch.

  12. git merge <branch_name>: Merges the specified branch into the current branch.

These are just a few of the basic Git commands. Git has many more commands and options that can be used to manage and collaborate on code repositories.

How to install Git on Windows system ?


Here are the steps to install Git on a Windows system:

  1. Download the Git installer for Windows from the official Git website: https://git-scm.com/download/win

  2. Run the downloaded installer file and follow the prompts in the installer.

  3. In the Select Components screen, leave the default options selected and click Next.

  4. In the Adjusting your PATH environment screen, select the option "Use Git from the Windows Command Prompt" and click Next.

  5. In the Configuring the line ending conversions screen, leave the default options selected and click Next.

  6. In the Configuring the terminal emulator to use with Git Bash screen, leave the default option selected and click Next.

  7. In the Configuring extra options screen, leave the default options selected and click Next.

  8. In the Installing screen, click Install to begin the installation.

  9. Once the installation is complete, click Finish.

  10. To verify that Git has been installed successfully, open a command prompt and run the command git --version. This should display the version number of Git installed on your system.

That's it! Git is now installed on your Windows system and ready to use.

History Of Git ?


Git was created by Linus Torvalds in 2005 as a replacement for the proprietary version control system BitKeeper, which had been used by the Linux kernel development community for several years. When the company that developed BitKeeper changed its licensing terms, the Linux community needed to find a new solution.


Torvalds wanted a version control system that was fast, efficient, and could handle the large codebase of the Linux kernel. He also wanted a system that was decentralized, allowing developers to work on their own local copies of the code and synchronize changes with each other.


The first version of Git was released in April 2005, and it quickly gained popularity within the open-source community. Git's ability to handle branching and merging of code made it particularly well-suited to software development, where multiple contributors may be working on different features or versions of a project simultaneously.


In 2008, GitHub was launched as a web-based hosting service for Git repositories, making it easier for developers to collaborate on open-source projects. Git has since become the most widely used version control system in the world, and is used by many companies and organizations for software development and other projects. The Git project itself is open source and continues to be actively maintained and developed by a large community of contributors.

What is Git ?


 Git is a distributed version control system that allows developers to keep track of changes in their code over time. It was created by Linus Torvalds in 2005 to help manage the development of the Linux kernel.


With Git, developers can work on their own local copies of a project, make changes, and then synchronize those changes with a central repository or with other developers' copies of the same project. This allows for collaboration on a project, as well as the ability to revert to previous versions of the code if necessary.


Git uses a branching system to allow developers to work on different features or versions of a project simultaneously, and then merge those changes back together once they are complete. This can help to keep the codebase organized and make it easier to manage changes made by multiple contributors.


Git has become an essential tool for software development and is used by many companies and open-source projects around the world. There are also many online services, such as GitHub, GitLab, and Bitbucket, that provide hosting and collaboration tools for Git repositories.

Thursday, 5 January 2023

How to install Remote AD Managed roles in Windows 2016 server



1.     Open the Server Manager by clicking the Start button, then type "Server Manager" and press Enter.

2.     In the Server Manager, click the "Manage" menu, then select "Add Roles and Features".

3.     Click "Next" on the "Before You Begin" page.

4.     On the "Installation Type" page, select "Role-based or feature-based installation", then click "Next".

5.     On the "Server Selection" page, select "Remote Desktop Services installation", then click "Next".

6.     On the "Server Pool" page, select the server on which you want to install the AD managed roles, then click "Next".

7.     On the "Server Roles" Page, Click "Next".

8.     On the "Features" page, Expand Remote Server Administration Tools.check the boxes next to the roles you want to install. To install AD managed roles, you will need to select the following roles:

·        AD DS and AD LDS Tools

·        Active Directory Rights Management Services Tools

·        DNS Server Tools

9.     Click "Next" to continue.

10.     On the "Active Directory Domain Services" page, click "Next".

11.  On the "Confirmation" page, review your selections and click "Install".