Skip to content

Instantly share code, notes, and snippets.

View satishchennu1's full-sized avatar
💭
Infrastucture as code

schennu satishchennu1

💭
Infrastucture as code
View GitHub Profile
@satishchennu1
satishchennu1 / Things to learn
Last active August 24, 2020 17:51
Things to learn
#1. https://app.linuxacademy.com/hands-on-labs/9e85c684-37ef-4b7a-9bdf-6e37cfaa9e2a?redirect_uri=https:%2F%2Fapp.linuxacademy.com%2Fsearch%3Fcategories%3DContainers%26page%3D3
#2. https://linuxacademy.com/cp/modules/view/id/446
#3.https://linuxacademy.com/cp/modules/view/id/392?redirect_uri=https://app.linuxacademy.com/search?categories=Azure&type=Course&page=2
#4. https://linuxacademy.com/cp/modules/view/id/392?redirect_uri=https://app.linuxacademy.com/search?query=aks&categories=Azure&type=Course
#5. https://linuxacademy.com/cp/modules/view/id/327?redirect_uri=https://app.linuxacademy.com/search?type=Course&categories=Containers
#6.https://linuxacademy.com/cp/modules/view/id/285?redirect_uri=https://app.linuxacademy.com/search?categories=Containers&type=Course
@satishchennu1
satishchennu1 / gist:5df3dbd47772d576484664a6d9f45bc1
Created July 18, 2020 23:12 — forked from ikke-t/gist:7009061545316ccc6e735b544dd02c40
Sample Ansible playbook with openshift_raw module to setup project in multi zone cluster
---
#
# This playbook sets up a project which is locked into some given environment.
# Consider you have cluster labelled to have three zones, e.g.
#
# 1. devtest
# 2. prodA
# 3. prodB
#
# This playbook sets up a new project, and labels it to force all the pods to
@satishchennu1
satishchennu1 / openshift_cli_tricks.MD
Last active August 19, 2020 16:58 — forked from tuxfight3r/openshift_cli_tricks.MD
openshift cli tricks - using go templates

openshift list all pods and thier specs (requests/limits)

oc get pod -o jsonpath='{range .items[*]}{"SPEC:  \n  LIMITS  : "}{.spec.containers[*].resources.limits}{"\n  REQUESTS: "}{.spec.containers[*].resources.requests}{"\n"}{end}'

openshift list all pods and thier specs with name (requests /limits)

oc get pod -o jsonpath='{range .items[*]}{"NAME:  "}{.metadata.name}{"\nSPEC:  \n  LIMITS  : "}{.spec.containers[*].resources.limits}{"\n  REQUESTS: "}{.spec.containers[*].resources.requests}{"\n\n"}{end}'
@satishchennu1
satishchennu1 / my-openshift-template.json
Created July 17, 2020 15:08 — forked from lucywyman/my-openshift-template.json
Example template to create Openshift image from private git repo
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {"name": "my-template"},
"objects": [
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "my-app",
// Set your project Prefix using your GUID
def prefix = "user22"
// Routes
def clusterDomain = "apps.cluster-19ae.sandbox478.opentlc.com"
def tasksDevRoute = "tasks-${prefix}-tasks-dev.${clusterDomain}"
def ocpRegistryRoute = "default-route-openshift-image-registry.${clusterDomain}"
def nexusRegistryRoute = "nexus-registry-${prefix}-cicd.${clusterDomain}"
// Set variable globally to be available in all stages
@satishchennu1
satishchennu1 / Ansible Tower project creation
Created May 30, 2020 23:08
Ansible Tower project creation and usage
Ansible Tower
a) Define a project.
b) Define an inventory.
c) Define credentials.
d) Define a template.
@satishchennu1
satishchennu1 / htpasswd-ansible
Created May 22, 2020 22:29
htpasswd_ansible
user=admin
password=admin
htpasswd=$(printf "$user:$(openssl passwd -apr1 $password)\n")
htpasswd=$(echo $htpasswd | base64)
oc apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
name: htpass-secret
@satishchennu1
satishchennu1 / Important URLS on openshift
Last active June 11, 2020 17:14
Important URLS on openshift
Important URLS on openshift
https://developers.redhat.com/courses/openshift/getting-started/?sc_cid=7013a000002Dc57AAC
https://learn.openshift.com/middleware/
https://learn.openshift.com/servicemesh/ --> important one
https://developers.redhat.com/products/codeready-containers/overview
https://developers.redhat.com/courses/
https://developers.redhat.com/courses/subsystems/
https://developers.redhat.com/courses/spring-boot/
https://developers.redhat.com/courses/middleware/openshift-pipelines/?sc_cid=7013a000002Dc57AAC
@satishchennu1
satishchennu1 / build tools
Created April 11, 2020 01:10
build tools
Nexus --> https://github.com/OpenShiftDemos/nexus
a) https://medium.com/ibm-garage/run-red-hat-openshift-version-4-on-amazon-web-services-aws-cloud-platform-part-1-e9a49ea19bc0
b)