Skip to content

Instantly share code, notes, and snippets.

View dkhode's full-sized avatar
🏠
Working from home

Devikiran Khode dkhode

🏠
Working from home
View GitHub Profile
@dkhode
dkhode / create_user_and_kubeconfig_rancher2.sh
Created February 23, 2021 21:40 — forked from superseb/create_user_and_kubeconfig_rancher2.sh
Create local user and generate kubeconfig in Rancher 2 via API
#!/bin/bash
RANCHERENDPOINT=https://your_rancher_endpoint/v3
# The name of the cluster where the user needs to be added
CLUSTERNAME=your_cluster_name
# Username, password and realname of the user
USERNAME=username
PASSWORD=password
REALNAME=myrealname
# Role of the user
GLOBALROLE=user
@dkhode
dkhode / kubernetes_add_service_account_kubeconfig.sh
Created February 10, 2021 22:03 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
@dkhode
dkhode / jenkins-set-system-message.groovy
Created May 7, 2020 03:45
Jenkins - Set Jenkins system message via groovy script - #jenkins #groovy #system #message #html
#!groovy
// imports
import jenkins.model.Jenkins
// parameters
def systemMessage = '''
<h1><span style="background-color: #ff0000">Scheduled maintanence: Jenkins won't be available for use tonight @7pm CST</span></h1>
'''
@dkhode
dkhode / install_rundeck.sh
Last active August 19, 2019 21:57
Install Rundeck on Centos
#!/bin/bash
## Install Rundeck on Centos7
### Run as root (sudo su)
wget https://dl.bintray.com/rundeck/rundeck-rpm/rundeck-config-2.9.3-1.37.GA.noarch.rpm
wget https://dl.bintray.com/rundeck/rundeck-rpm/rundeck-2.9.3-1.37.GA.noarch.rpm
sudo yum install ./rundeck-config-2.9.3-1.37.GA.noarch.rpm ./rundeck-2.9.3-1.37.GA.noarch.rpm -y
sudo service rundeckd start
curl localhost:4440
## default credentials
#username: admin
This file has been truncated, but you can view the full file.
PK
¬RˆJ META-INF/PK
 «RˆJd ðÚm ‚  META-INF/MANIFEST.MFóMÌËLK-.Ñ
K-*ÎÌϳR0Ô3àår,JÎÈ,K-Bä¤V”+À$x¹œJ3sJt*­RRË2y¹œ‹RKRSÀ"Ž‰É©
¾‰e©y
Æz¦ #AêSt½R²AVXèÄòrñr PK
ªRˆJ  WEB-INF/PK
ªRˆJ  WEB-INF/classes/PK
ªRˆJ  WEB-INF/classes/ly/PK
ªRˆJ  WEB-INF/classes/ly/jamie/PK
@dkhode
dkhode / gist:81f2bdaaa72f4b4560c615db4f9027f9
Created January 2, 2017 19:35 — forked from gmhawash/gist:4043232
Reset jenkins password
0. SSH to server
1. Edit /opt/bitnami/apps/jenkins/jenkins_home/config.xml
2. set userSecurity to false: <userSecurity>false</userSecurity>
3. delete
<authorizationStrategy> and <securityRealm>
4. /etc/init.d/bitnami restart
@dkhode
dkhode / gist:b55da670f343374a1700e80f231cbeb4
Created December 26, 2016 05:44 — forked from learncodeacademy/gist:5f84705f2229f14d758d
Getting Started with Vagrant, SSH & Linux Server Administration
@dkhode
dkhode / vagrant-cheat-sheet.md
Created December 26, 2016 05:22 — forked from wpscholar/vagrant-cheat-sheet.md
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Common Vagrant Commands

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
  • vagrant status -- outputs status of the vagrant machine
  • vagrant halt -- stops the vagrant machine
  • vagrant reload -- restarts vagrant machine, loads new Vagrantfile configuration
  • vagrant provision -- forces reprovisioning of the vagrant machine
@dkhode
dkhode / my-job-generator.groovy
Created October 10, 2016 18:00 — forked from glombard/my-job-generator.groovy
Using Jenkins Job-DSL plugin to create a job with a Post-Build Step / publisher plugin
job('my-generated-job') {
description('This job was automatically generated by a Job-DSL seed job')
steps {
shell('echo Testing Job-DSL and log-parser')
}
wrappers {
colorizeOutput('xterm')
}
// Use configure to add the 'publishers' XML node in the generated config.xml
configure { project ->
@dkhode
dkhode / Jenkins log
Created May 9, 2016 21:09
Could not launch simulator: -600
01:57:29 2016-05-09 01:57:29.535 xcodebuild[3082:4342631] [MT] iPhoneSimulator: Could not launch simulator: -600
01:57:29 xcodebuild: error: Failed to build workspace CertifyHL with scheme CertifyHL.
01:57:29 Reason: The operation couldn’t be completed. (OSStatus error -600.)
01:57:29 Build step 'Execute shell' marked build as failure