Skip to content

Instantly share code, notes, and snippets.

View anilshrish's full-sized avatar
🎯
Focusing

Anil Shrish anilshrish

🎯
Focusing
View GitHub Profile
@anilshrish
anilshrish / docker_troubleshoot_02Feb2020.md
Last active February 5, 2020 10:11
Docker Troubleshooting

02Feb2020

I was doing the docker installation following throught the official documentation

it by default installed me 19.03.5 there was a slight problem with this perticular version

since I was not able to login to private docker registry(harbor)

Here is how issue looked like:

$ sudo docker login registry.example.com 
Username: <registry-username>
Password: <registry-password>
@anilshrish
anilshrish / jenkins_migrate_volume.md
Created February 5, 2020 08:22
Jenkins on docker migrate Jenkins volume to different host

Jenkins run: (VM OLD)

docker run -d -v jenkins_home:/var/jenkins_home -p 8080:8080 -p 50000:50000 --name jenkins_cicd jenkins/jenkins:2.208

Backup: (VM OLD)

sudo docker run --rm --volumes-from jenkins_cicd -v $(pwd):/backup busybox tar cvf /backup/backup.tar -C /var/jenkins_home .
@anilshrish
anilshrish / windows_tips.md
Created January 23, 2020 15:22
Reset view in Microsoft Outlook(email client) in windows
  • Open Run console ( win + R )
  • put below command:
outlook.exe /cleanviews
@anilshrish
anilshrish / lxc_notes.md
Last active January 23, 2020 15:59
LXC notes

Problem:

$ lxc launch images:centos/7 kmaster 
Creating kmaster
Error: Failed instance creation: Get https://images.linuxcontainers.org/streams/v1/index.json: Unable to connect to: images.linuxcontainers.org:443

$ lxc image list images:
Error: Get https://images.linuxcontainers.org/streams/v1/index.json: proxyconnect tcp: read tcp 161.85.18.78:39688->165.225.104.34:9480: read: connection reset by peer
@anilshrish
anilshrish / change_docker_root_folder.txt
Created July 15, 2019 09:02 — forked from jokla/change_docker_root_folder.txt
Change Docker root folder Ubuntu 14.04 and Ubuntu 16.04
$ sudo service docker stop
$ gksudo gedit /etc/default/docker
# Use DOCKER_OPTS to modify the daemon startup options.
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4 -g /home/jokla/docker/docker/"
$ sudo service docker start
UBUNTU 16.04

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!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@anilshrish
anilshrish / svn_commands_ref.md
Last active February 28, 2019 10:19
svn commands Reference

svn essentials

svn info .                     # svn info of the repo
svn co <url>                   # svn checkout
svn up                         # svn update
svn st                         # svn status
svn up <file/directory>        # svn update specific file or directory
svn add <file/directory>       # svn add/stage file
svn ci -m "<msg>" [<filename>] # commit to svn
svn log                        # svn log for whole repo
@anilshrish
anilshrish / scripted_vs_declarative.md
Created August 8, 2018 04:44
Jenkins Scripted pipeline vs Declarative pipeline

#Scripted Pipeline Job

node('SlaveSCMConnected') {
    stage('SCM operation'){
        checkout scm
        sh 'mvn clean install'
   }
}
@anilshrish
anilshrish / node_exporter.sh
Created July 2, 2018 05:39 — forked from galexrt/node_exporter.sh
Simple Prometheus node_exporter install script
#!/bin/bash
version="${VERSION:-0.14.0}"
arch="${ARCH:-linux-amd64}"
bin_dir="${BIN_DIR:-/usr/local/bin}"
wget "https://github.com/prometheus/node_exporter/releases/download/v$version/node_exporter-$version.$arch.tar.gz" \
-O /tmp/node_exporter.tar.gz
mkdir -p /tmp/node_exporter
@anilshrish
anilshrish / docker_practical.md
Last active March 23, 2018 16:58
Docker lifesaver tips

Export running container as image:

docker export --output="<filename>.tar" <container_name/id>

Ex:
  docker export --output="alpine.tar" alpine

Importing exported container as docker image: