This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl" | |
| curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl.sha256" | |
| If valid, the output is: | |
| kubectl: OK | |
| chmod +x ./kubectl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In Terraform, the data block is used to fetch existing resources, but if the resource doesn’t exist, it can result in an error. To handle such cases gracefully, you can use workarounds or implement conditional logic to prevent the error from causing a failure in your Terraform run. | |
| Options for Error Handling | |
| 1. Use the try() Function | |
| The try() function can catch errors and provide a default value if a data source lookup fails. This approach works if the data block supports an attribute that might return null or is optional. | |
| data "aws_vpc" "example" { | |
| filter { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3" | |
| services: | |
| sonarqube: | |
| image: sonarqube:community | |
| restart: unless-stopped | |
| container_name: sonarqube | |
| hostname: sonarqube | |
| read_only: true | |
| depends_on: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Uninstall the PostgreSQL application | |
| sudo apt-get --purge remove postgresql postgresql-doc postgresql-common | |
| # Remove PostgreSQL packages | |
| dpkg -l | grep postgres | |
| sudo apt-get --purge remove <package_name> | |
| #Remove PostgreSQL directories | |
| sudo rm -rf /var/lib/postgresql/ | |
| sudo rm -rf /var/log/postgresql/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Add Docker's official GPG key: | |
| sudo apt-get update | |
| sudo apt-get install ca-certificates curl | |
| sudo install -m 0755 -d /etc/apt/keyrings | |
| sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc | |
| sudo chmod a+r /etc/apt/keyrings/docker.asc | |
| # Add the repository to Apt sources: | |
| echo \ | |
| "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Install Jenkins on Mac OS | |
| https://www.macminivault.com/installing-jenkins-on-macos/ | |
| //Steps to install Jenkins on Ubuntu | |
| sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \ | |
| https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | |
| echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" \ | |
| https://pkg.jenkins.io/debian-stable binary/ | sudo tee \ | |
| /etc/apt/sources.list.d/jenkins.list > /dev/null | |
| sudo apt-get update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To sync changes from the parent repository into your forked repository, you can follow these steps: | |
| 1. Configure the parent repository as a remote | |
| First, you need to ensure that the original (parent) repository is added as a remote in your local repository. This is typically named upstream. | |
| # Navigate to your forked repository's directory | |
| cd path/to/your/repo | |
| # Add the parent repository as 'upstream' remote |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## To configure git for a project in VS Code | |
| 1. git remote add origin repo_url | |
| 2. git push origin [branch name] | |
| git remote -v to see current origin remote url | |
| //to change existing origin url | |
| git remote set-url origin new.git.url/here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //to generate public & private keys | |
| ssh-keygen -t rsa -b 4096 | |
| //Login to Linux VM | |
| ssh -i C:\Users\Varaprasad.Reddy\Downloads\vm-loadbalancer1-dev_key.pem azureuser@ip_address | |
| //to get current machine ip address | |
| curl ifconfig.me | |
| //to change user to root user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| variable "resources_list_of_objects2" { | |
| type = map(object({ | |
| deployment_id = string | |
| model_name = string | |
| model_format = string | |
| })) | |
| default = { | |
| "deployment_1" = { | |
| deployment_id = "gpt-3" | |
| model_name = "gpt-3" |
NewerOlder