AWS Creating new volume to running EC2 and Volumes and snapshot.

ssh -i 12345.pem ec2-user@34.238.254.72

[ec2-user@ip-172-31-95-60 ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 8G 0 disk
└─xvda1 202:1 0 8G 0 part /
xvdf 202:80 0 10G 0 disk

[ec2-user@ip-172-31-95-60 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 476M 0 476M 0% /dev
tmpfs 493M 0 493M 0% /dev/shm
tmpfs 493M 324K 493M 1% /run
tmpfs 493M 0 493M 0% /sys/fs/cgroup
/dev/xvda1 8.0G 1.1G 7.0G 14% /
tmpfs 99M 0 99M 0% /run/user/1000

[ec2-user@ip-172-31-95-60 ~]$ sudo mkfs.ext4 /dev/xvdf
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655360 inodes, 2621440 blocks
131072 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2151677952
80 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

[ec2-user@ip-172-31-95-60 ~]$ sudo mount -t ext4 /dev/xvdf /fs-1
[ec2-user@ip-172-31-95-60 ~]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 487044 0 487044 0% /dev
tmpfs 504692 0 504692 0% /dev/shm
tmpfs 504692 324 504368 1% /run
tmpfs 504692 0 504692 0% /sys/fs/cgroup
/dev/xvda1 8376300 1126336 7249964 14% /
tmpfs 100940 0 100940 0% /run/user/1000
/dev/xvdf 10190100 36888 9612540 1% /fs-1

Taking the snap shot of the volume and adding it back
__| __|_ )
_| ( / Amazon Linux 2 AMI
___|\___|___|

https://aws.amazon.com/amazon-linux-2/
[ec2-user@ip-172-31-90-88 ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 8G 0 disk
└─xvda1 202:1 0 8G 0 part /
xvdf 202:80 0 10G 0 disk
[ec2-user@ip-172-31-90-88 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 476M 0 476M 0% /dev
tmpfs 493M 0 493M 0% /dev/shm
tmpfs 493M 292K 493M 1% /run
tmpfs 493M 0 493M 0% /sys/fs/cgroup
/dev/xvda1 8.0G 1.1G 7.0G 14% /
tmpfs 99M 0 99M 0% /run/user/1000
[ec2-user@ip-172-31-90-88 ~]$ sudo resize2fs /dev/xvdf
resize2fs 1.42.9 (28-Dec-2013)
Please run ‘e2fsck -f /dev/xvdf’ first.

[ec2-user@ip-172-31-90-88 ~]$ sudo mkdir /fs1
[ec2-user@ip-172-31-90-88 ~]$ s
-bash: s: command not found
[ec2-user@ip-172-31-90-88 ~]$ sudo mount -ext4 /dev/xvdf /fs1
mount: invalid option — ‘e’
Try ‘mount –help’ for more information.
[ec2-user@ip-172-31-90-88 ~]$ sudo mount -t ext4 /dev/xvdf /fs1
[ec2-user@ip-172-31-90-88 ~]$ cd /fs1
[ec2-user@ip-172-31-90-88 fs1]$ ls
d1 d2 d3 d4 f1 f2 f3 f4 lost+found
[ec2-user@ip-172-31-90-88 fs1]$

Docker Commands

$ curl -fsSL get.docker.com -o get-docker.sh

sh get-docker.sh

docker ps -a

docker search hello-world
docker pull hellow-world

docker images

docker search centos

docker pull centos
docker images
docker run-it centos  or image id
—->> will go to container
—->>exit…
service docker start

service docker stop

docker stop containerID

docker start contanierID

docker run -itd -p 80:80 tumtum/Helloworld
docker ps # it will show the contanierID

dockers ps -a it will list all containers.

dockker rm CID –

dcoker search centos

yum instal git
yum install ansible

youm install apache 2

to download specic version
docker pull centos : 6

docker run -it centos:6

to name the contanier

docker run -it -name devops1 centos

docker rename exisingname  newname
docker search jenkins it iwll hsow the display based on star rating

docker serarch -s 100 Jenkins it will search based on upto 100 star ratings

create the container with hostname

docker run -it -h batch24 centOS

docker ps

docker attach cid

will login directly to the container

adduser password

passwd password

Docker ps

docker attach CID

adduser pradad
passd prasad

docker ps

docker exec -it -u Prasad CID/bin/bash

To Login directlry to thge containier

docker attach batch23

docker run -it –volumes from CID to cent OS

Share kmnbt from linux to contanier

docker run -it -name server-1 -v /opt/mvn :/opt/centos

cd /opt
ls

docler attach CID

docker inspect CID
it will show the volumes mountpoints will be displayed it will open configurable roles.

docker status CID

docker run -itd -m 300m CentOS

docker run -itd –volume –fromm cid centos

cd /opt

ls

docker logs cid

will display logs

privacy-policy

Privacy Policy

This Privacy Policy explains how information about you is collected, used and disclosed by Desioffers when you use the applications developed by Desioffers. By accepting our Privacy Policy, you agree to let Desioffers collect, use and disclose information about you in accordance with the purposes listed below. We may change this Privacy Policy from time to time. If we make changes, we will notify you by revising the date at the top of the policy and, depending on the specific changes, we may provide you with additional notice or require a renewed consent (e.g., by adding a statement to our website’s homepage or in the App). We encourage you to review the Privacy Policy whenever you access the App to stay informed about our information practices and the ways you can help protect your privacy.

Advertising and Analytics Services

We may allow third parties to serve contextual advertisements and provide analytics services in connection with the App. These entities may use various identifiers to collect information about your use of the App, including your device identifiers, software and hardware information, time zone and usage information. This information may be used by Desioffers and others to, among other things, determine the popularity of certain content, deliver contextual advertising and content and better understand your activity on the App. Third-party ad serving and analytics technologies are integrated into the App, so if you do not want to be subject to these technologies, do not use or access the App.

Use of Information

Provide, maintain and improve the App
Develop new apps, sites and services
Provide and deliver the products and services you request and send you related information
Send you technical notices, updates, security alerts and support and administrative messages
Provide news and information about the App we think will be of interest to you
Personalize and improve the App and provide tailored content and features
Monitor and analyze trends, usage and activities in connection with the App;
Link or combine with information we get from others to help understand your needs and provide you with better service
Carry out any other purpose for which the information was collected.

Contact Us

If you have any questions about this Privacy Policy, please contact us at sriharishsathya@gmail.com on behalf of www.desioffers.com