Friday, 4 September 2020

Installing Docker and Minikube

 

install docker-

 

sudo apt install docker.io

 

set user to docker group:-

sudo gpasswd -a  {user} docker

 

imp commands:-

docker image ls

docker container ls

docker run -p 80:80 -d richardchesterwood/k8s-fleetman-webapp-angular:release0-5

docker stop <containerId>

docker rm <containerId>

 

running mysql with storage persist scenario:

 

docker run --name sampleDockerDB -p 3306:3306 -e MYSQL_ROOT_PASSWORD=pass -d mysql:5

 

docker exec -it 3e bash

mysql -p{password}  `Comment:#no space after -p`

show databases;

apart from its internal file system, mysql stores data on actual hardware:

 

docker container inspect <containerId>

 

docker volume ls  `to list volumes mounted on actual hardware not docker image`

 

set default local volume to persist data:-

 

docker run --name viksDB -v mydata:/var/lib/mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=pass -d mysql:5

 

 

---------------------

 

- Starting with running minikube locally

 

https://kubernetes.io/docs/tasks/tools/install-minikube/

 

check if virtualization is supported on Linux,run the following command and verify that the output is non-empty:

grep -E --color 'vmx|svm' /proc/cpuinfo

 

 

Minikube also supports a --driver=none option that runs the Kubernetes components on the host and not in a VM. Using this driver requires Docker and a Linux environment but not a hypervisor.

 

Install kubectl

curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.19.0/bin/linux/amd64/kubectl

 

Make the kubectl binary executable.

 

chmod +x ./kubectl

 

Move the binary in to your PATH.

 

sudo mv ./kubectl /usr/local/bin/kubectl

 

Test to ensure the version you installed is up-to-date:

 

kubectl version --client

 

Install Minikube via direct download

 

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \

  && chmod +x minikube

sudo mv ./minikube /usr/local/bin/minikube

 

minikube start --vm-driver=none

 

(optional):-

 

minikube addons list

 

minikube addons enable dashboard

 

to get minikube dashboard url:-

 

minikube dashboard --url

 

access url in local machine using ssh tunnel:-

ssh -L 8081:localhost:42441 ubuntu@192.168.0.102

 

optional:

access docker within minikube

minikube docker-env

 

# To point your shell to minikube's docker-daemon, run:

# eval $(minikube -p minikube docker-env)

 

minikube ip

installing proper MINT and saving the vdi in safe location

 Mouse Scroll:-

 

sudo apt-get install imwheel && wget http://www.nicknorton.net/mousewheel.sh && chmod +x mousewheel.sh && ./mousewheel.sh

 

Use the usermod command to add the user to the sudo/root group:

 

adduser <username>

usermod -aG sudo <username>

userdel <username>

 

 

To Enable Snap in Linux Mint 20,

 

    Open terminal as root.

    Type the following command: # rm /etc/apt/preferences.d/nosnap.pref.   This will enable Snap.

    Now, update the package cache for apt with this command: # apt update

    Finally, install the snapd package: # apt install snapd

sudo snap install snap-store

 

Shared Folders:-

In Ubuntu, you need to add your username to the vboxsf group, using the adduser/addgroup command in terminal (sudo adduser <username> vboxsf), then logout and log back in, or reboot.

 

Move “Show Applications” right to left of the Dock:

 

“gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true”

 

Friday, 1 June 2018

GIT Bash in windows



The advantage of installing git is that you will get git UI and git bash.
and you can right click and get git bash in whichever folder you want.

Useful commands:-

cd /c/           ---- it will take you to c folder
cd .. ---- it will take you to parent folder 1 step
ls ----  list all files
ls -a ---- list all hidden files too

Thursday, 26 October 2017

Machine Learning Notes




Machine learning notes on Clustering

Clustering:
  The method of identifying similar groups(patterns) of data in a dataSet is called clustering.
  clustering can be divided into two subgroups :
      Hard Clustering
      Soft Clustering

    Types of clustering algorithms:

    Connectivity models:
    Centroid models:
      K-Means clustering algorithm
    Distribution models:
      example:- Normal, Gaussian
    Density Models:

    K-Means clustering algorithm:
 

   










Hierarchical Clustering:

Applications:-

·        Recommendation engines
·        Market segmentation
·        Social network analysis
·        Search result grouping
·        Medical imaging

·        Image segmentation

Monday, 25 September 2017

Intro to Machine learning:python setup

Tried many versions/flavours of python but this is finally working:

while setting up python for machine learning.
I followed the below steps :-
Install python-2.7.13.msi
• set PATH=C:\Python27
• set PATH=C:\Python27\Scripts
Downloaded:- • numpy-1.13.1+mkl-cp27-cp27m-win32.whl 
                       • scipy-0.18.0-cp27-cp27m-win32.whl
Installing numpy: pip install numpy-1.13.1+mkl-cp27-cp27m-win32.whl
Installing scipy: pip install scipy-0.18.0-cp27-cp27m-win32.whl
You can test the correctness using below cmds:-
>>> import numpy
>>> import scipy
>>> import sklearn
>>> numpy.version.version
'1.13.1'
>>> scipy.version.version
'0.19.1'
>>>

Good things of doing this course:-

  • Helped me in beliving that I can learn Machine Learning.
  • Very interactive,you will not get bored
  • Nice simple exercises,me being new to python running my code in python is very Joyful.
  • Andrew's classes were very therotic and mathematical,one needs great concentration in understanding those concepts.

Installing Docker and Minikube

  install docker-   sudo apt install docker.io   set user to docker group:- sudo gpasswd -a   {user} docker   imp commands:- ...