https://www.testpreptraining.com/
https://www.whizlabs.com/cart/
https://www.testpreptraining.com/
https://www.whizlabs.com/cart/
https://www.youtube.com/watch?v=zCIpWFYDJ8s&list=PL9nWRykSBSFgQrO66TmO1vHFP6yuPF5G-
https://www.youtube.com/watch?v=s0XFX3WHg0w
Step Function :
Serverless Orchestration Service
ADSL
https://stackoverflow.com/questions/36999461/how-to-install-only-devdependencies-using-npm
npm init -y
npm i -D typescript
npx tsc example.ts
node example.js
https://www.youtube.com/watch?v=1UcLoOD1lRM
https://www.youtube.com/watch?v=JHiSGnh5Two&list=PLwbWIFE49l8kxe3PLftHFrwIYSfhNxaVZ&index=2
https://registry.terraform.io/providers/hashicorp/aws/latest/docs
https://www.youtube.com/watch?v=JHiSGnh5Two&list=PLwbWIFE49l8kxe3PLftHFrwIYSfhNxaVZ&index=2
https://www.youtube.com/watch?v=SLB_c_ayRMo
https://www.youtube.com/watch?v=JHiSGnh5Two&list=PLwbWIFE49l8kxe3PLftHFrwIYSfhNxaVZ&index=3
https://www.youtube.com/watch?v=esGezkpzpRo&list=PLwbWIFE49l8kxe3PLftHFrwIYSfhNxaVZ&index=4
resource "aws_instance" "tcw" {
em-ui LoadBalancer 172.20.221.225 internal-a54ec7ad6f02c49899f5bbd68ce6da3f-74411592.us-east-1.elb.amazonaws.com
em-ui LoadBalancer 172.20.221.225 internal-a54ec7ad6f02c49899f5bbd68ce6da3f-74411592.us-east-1.elb.amazonaws.com
TargetPort is port at which Docker Container Listens
NodePort is port at which NodePort - public ip of node listens
Port is port at which PODS listens
https://linuxhint.com/sort-kubectl-events-by-time/
kubectl get events --sort-by='.lastTimestamp' -n amex-poc
============================================================
kubectl describe pod foobar-1h6yyy -n namespace
kubectl describe svc foobarservice -n namespace
kubectl describe deployment foobardeploy -n namespace
============================================================
kubectl logs mongodb-2 -n amex-poc mongodb --tail=200
kubectl logs mongodb-2 -n amex-poc mongodb --follow
============================================================
kubectl get pods -n namespace1 -w -l app=io.dev.service
-w is watch
-l "key=value" Labels
============================================================
kubectl create -f rabbitmq-deployment.yml -f rabbitmq-service.yml
kubectl delete -f rabbitmq-service.yml -f rabbitmq-deployment.yml
============================================================
kubectl delete deployment foodeploy -n namespace1
kubectl delete deployments foodeploy -n namespace1
kubectl delete service foobarservice -n namespace1
kubectl delete svc foobarservice -n namespace1
deployments ==== deployment
svc ====service ==== services
============================================================
// Use this code snippet in your app.
// If you need more information about configurations or implementing the sample code, visit the AWS docs:
https://aws.amazon.com/developers/getting-started/nodejs/
// Load the AWS SDK
var AWS = require('aws-sdk'),
region = "us-east-1",
secretName = "qa/cca-product/mongodb",
secret,
decodedBinarySecret;
// Create a Secrets Manager client
var client = new AWS.SecretsManager({
region: region
});
// In this sample we only handle the specific exceptions for the 'GetSecretValue' API.
// See https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetSecretValue.html
// We rethrow the exception by default.
client.getSecretValue({SecretId: secretName}, function(err, data) {
if (err) {
if (err.code === 'DecryptionFailureException')
// Secrets Manager can't decrypt the protected secret text using the provided KMS key.
// Deal with the exception here, and/or rethrow at your discretion.
throw err;
else if (err.code === 'InternalServiceErrorException')
// An error occurred on the server side.
// Deal with the exception here, and/or rethrow at your discretion.
throw err;
else if (err.code === 'InvalidParameterException')
// You provided an invalid value for a parameter.
// Deal with the exception here, and/or rethrow at your discretion.
throw err;
else if (err.code === 'InvalidRequestException')
// You provided a parameter value that is not valid for the current state of the resource.
// Deal with the exception here, and/or rethrow at your discretion.
throw err;
else if (err.code === 'ResourceNotFoundException')
// We can't find the resource that you asked for.
// Deal with the exception here, and/or rethrow at your discretion.
throw err;
}
else {
// Decrypts secret using the associated KMS CMK.
// Depending on whether the secret is a string or binary, one of these fields will be populated.
if ('SecretString' in data) {
secret = data.SecretString;
} else {
let buff = new Buffer(data.SecretBinary, 'base64');
decodedBinarySecret = buff.toString('ascii');
}
}
// Your code goes here.
});
[Copy something to Pod]
kubectl cp /DBScript/Extraction.tar mongodb-0:/tmp -n namespace1
[Copy something from Pod]
kubectl cp mongodb-0:/tmp/ . -n namespace1
kubectl logs vea-cc -n amex-poc --tail=20 nginx
kubectl logs vea-cc -n amex-poc --follow
kubectl get deployments-n amex-poc
kubectl edit deployment eaas
=================
kubectl delete deployment eaas
kubectl get pods -l app=rabbitmq -n cs
kubectl get pod -w -l app=rabbitmq -n cs
kubectl delete pod -l app=rabbitmq -n cs
https://www.youtube.com/watch?v=6T5mI2VwUNc
apiVersion : v1 kind : configMap metadata : name : wordpress-credentials data: username : "blaize" db-password : "password" --- spec: containers: - image: wordpress:4.8-apache name: env: - name: WORDPRESS_DB_PASSWORD valueFrom: configMapKeyRef: name: wordpress-credentials key: db-password
https://intellipaat.com/community/42232/aws-ec2-instances-are-not-getting-to-internet-access
For Internet Access -
A VM should be having Public IP address if its in Public Subnet and that Subnet should have Internet Gateway and Internet Gateway should have a route in Routetable
If a VM is in Private Subnet, It should have private IP and should have access to NAT Gateway in RouteTable of that Subnet
Internet Gateway (IGW) allows instances with public IPs to access the internet.
NAT Gateway (NGW) allows instances with no public IPs to access the internet.
IGW allows Outside traffic to go in
NAT-GW does not allow Outside traffic to come in, It only allows from inside to Outside
https://www.youtube.com/watch?v=EcnqJbxBcM0
https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html
Ansible :
/etc/ansible/hosts
. -i <path>
option.LEARN From Here -> https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/gettingstarted.templatebasics.html
https://aws.amazon.com/premiumsupport/knowledge-center/cloudformation-custom-name/
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-whatis-howdoesitwork.html
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html
Update requires: No interruption
docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-get-template.html#using-cfn-updating-stacks-get-stack.CON
When updating a stack, AWS CloudFormation might interrupt resources or replace updated resources, depending on which properties you update. For more information about resource update behaviors, see Update behaviors of stack resources.
Update methods
AWS CloudFormation provides two methods for updating stacks: direct update or creating and executing change sets. When you directly update a stack, you submit changes and AWS CloudFormation immediately deploys them. Use direct updates when you want to quickly deploy your updates.
With change sets, you can preview the changes AWS CloudFormation will make to your stack, and then decide whether to apply those changes. Change sets are JSON-formatted documents that summarize the changes AWS CloudFormation will make to a stack. Use change sets when you want to ensure that AWS CloudFormation doesn't make unintentional changes or when you want to consider several options. For example, you can use a change set to verify that AWS CloudFormation won't replace your stack's database instances during an update.
Drift detection operations
docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-route53.html
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-elb.html
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html
aws cloudformation create-stack --stack-name cca-cloudformation-targetgroup --template-url s3://cca-cloudformation-template/CCA-CloudFormationTemplate-TargetGroup.json --parameters s3://cca-cloudformation-template/params.json
aws cloudformation create-stack --stack-name cca-cloudformation-targetgroup --template-body file://CCA-CloudFormationTemplate-TargetGroup.json --parameters file://params.json
https://docs.microsoft.com/en-us/azure/storage/blobs/storage-how-to-mount-container-linux
Warning
Blobfuse doesn't guarantee 100% POSIX compliance as it simply translates requests into Blob REST APIs.
authType Key
)authType SAS
)authType MSI
)authType SPN
)https://linuxize.com/post/vim-delete-line/
Esc
key to go to normal mode.5dd
and hit Enter to delete the next five lines.The basic steps to perform a search in Vim are as follows:
/
.Enter
to perform the search.n
to find the next occurrence or N
to find the previous occurrence.https://levelup.gitconnected.com/how-to-mount-s3-bucket-on-an-ec2-linux-instance-df44c7885aae
S3FS
An S3 bucket can be mounted in an AWS instance as a file system known as S3fs. S3fs is a FUSE file system that allows you to mount an Amazon S3 bucket as a local file system.
Filesystem in Userspace (FUSE) is a simple interface for userspace programs to export a virtual file system to the Linux kernel.
https://wisetut.com/best-ping-test-ip-addresses-google-dns-8-8-8-8-cloudflare-dns-1-1-1-1/
The network connection to the 8.8.8.8 Google DNS service can be tested with the ping command like below.
$ ping 8.8.8.8
The output is like below as we can see that the time or RTT is very low.
eks@GRDLUSAWSAMUT01:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
eks@GRDLUSAWSAMUT01:~$ cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/bash
/bin/rbash
/bin/dash
/usr/bin/tmux
/usr/bin/screen
eks@GRDLUSAWSAMUT01:~$
https://linuxize.com/post/how-to-create-users-in-linux-using-the-useradd-command/
sudo useradd -m username
ls -la /home/username/
https://careerkarma.com/blog/linux-add-user-to-group/
sudo usermod -a -G group_to_add username
https://www.tecmint.com/change-a-users-default-shell-in-linux/
usermod --shell /bin/bash tecmint
admin@MACHINEVM01:~$ hostname -I
10.102.25.95 172.17.0.1 172.19.0.1
admin@MACHINEVM01:~$ getent passwd|grep admin
admin:*:16777219:16777220:Kaw, Karan:/home/admin:/bin/bash
admin@MACHINEVM01:~$ getent group|grep docker
docker:x:118:
admin@MACHINEVM01:~$ groups admin
admin : domain users BUILTIN\users
admin@MACHINEVM01:~$ sudo useradd -m eks
[sudo] password for admin:
admin@MACHINEVM01:~$ groups eks
eks : eks
admin@MACHINEVM01:~$ id eks
uid=1006(eks) gid=1006(eks) groups=1006(eks)
admin@MACHINEVM01:~$ getent group|grep eks
eks:x:1006:
admin@MACHINEVM01:~$ getent passwd|grep eks
eks:x:1006:1006::/home/eks:/bin/sh
admin@MACHINEVM01:~$ sudo usermod -a -G docker eks
admin@MACHINEVM01:~$ getent passwd|grep eks
eks:x:1006:1006::/home/eks:/bin/sh
admin@MACHINEVM01:~$ groups eks
eks : eks docker
admin@MACHINEVM01:~$
apt install docker.io
apt install docker-compose
docker-compose up
docker-compose up -d
docker image ls
docker container ls
======================
docker ps
docker images
docker-compose -f docker-compose.yml down
docker-compose -f docker-compose.yml up -d
netstat -tulpn|grep LISTEN
tail -f nohup.out
kubernetes.io/docs/tasks/tools/included/optional-kubectl-configs-bash-linux/
apt-get install bash-completion
or yum install bash-completion
o find out, reload your shell and run type _init_completion
. If the command succeeds, you're already set, otherwise add the following to your ~/.bashrc
file:
source /usr/share/bash-completion/bash_completion
The kubectl completion script for Bash can be generated with the command
kubectl completion bash
kubectl rollout history deployment vea-cc -n fda
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass