Deploy jenkins with minikube in windows 10 - windows

I am trying to launch a jenkins on minikube on my windows computer.
For this, the first thing I have done has been to install minikube, virtualBox, kubectl and kubernetes-helm.
I have then run the following commands to pull up my minikube container and install jenkins.
minikube --memory 4096 --cpus 2 start --vm-driver=virtualbox
minikube status
helm repo add stable https://charts.helm.sh/stable/
helm upgrade --install myjenkins jenkins/jenkins
When I execute this last command, the following window appears:
My problem is that when I try to execute the command to know the password it gives me an error. I am working on a windows laptop. What would be the way to execute all the commands. With cmd, power shell, git bash?? I have tried to run it with all three and in none of them have I been able to execute the command to find out the password to enter jenkins that does seem to be up.

Related

Weird error when deploying with pm2 and WSL2

I have a deploy.sh script which looks like this:
ssh -t <name> -<port> 'cd <foldername>; git pull; yarn build <appname>; pm2 restart <appname> --update-env'
It works perfectly when I'm using Windows Powershell but for some reason, it fails if I use my WSL terminal. It completes all stages of the script up until pm2 restart part, at this point error: unknown option --update-env appears, ssh connection closes and I have to manually connect to ssh server and restart pm2.
I'm not sure if there is a problem with my wsl or with pm2 but since '--update-env' is a pm2 option I guess it is pm2.
I'm using pm2 version 4.5.6
PSVersion 5.1.19041.1237
WSL2 Ubuntu-20.04.2 LTS

docker installation on Windows

I have installed Docker in my windows 10 machine.
When i open power-shell and check docker version it shows below
PS C:\Users\XXXXX> docker --version
Docker version 19.03.4, build 9013bf5
But when i ran Docker images or docker run it did not worked
PS C:\Users\XXXXX> docker images
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/images/json: open
//./pipe/docker_engine: The system cannot find the file specified. In the
default daemon configuration on Windows, the docker client must be run elevated to connect. This
error may also indicate that the docker daemon is not running.
For Docker run
PS C:\Users\XXXX> docker run hello-world
docker : C:\Program Files\Docker\Docker\Resources\bin\docker.exe: error during connect: Post
http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/containers/create: open //./pipe/docker_engine: The
system cannot find
the file specified. In the default daemon configuration on Windows, the docker client must be run
elevated to connect. This error may also indicate that the docker daemon is not running.
I am not getting if docker is installed then why docker images and docker run are not working ?
Make sure the Docker service is runnig.
(1) Go to Services.
(2) Check service Docker for Windows is running.
You can stop/start the service as well using below commands in command prompt.
Net stop com.docker.service
Net start com.docker.service
Refer article : https://success.docker.com/article/docker-for-windows-fails-with-a-daemon-not-running-message
Have you manually started docker after the installation?
Install Docker Desktop on Windows

windows minikube kubectl fail to pull image

Very simple. I'm running both docker and minikube on my local machine.
I build a docker image on my windows machine:
docker build -t my-service-image:1.0.0
Then I create a deployment
kubectl create deployment test-node --image=my-service-image:1.0.0
Checking event
kubectl get events
And I see:
Error: ErrImagePull
Error: ImagePullBackOff
The common suggestion to address this issue on linux/mac is to run the following command before building the docker image
eval $(minikube docker-env)
However, as stated, this is a windows machine. What is the easiest way to resolve this issue?
As I see from this blog post, run this command in powershell before building your docker image.
minikube docker-env | Invoke-Expression
I couldn't try it out, as I am running ubuntu. Let us know what is the outcome.
I have very inconvenient but working suggestion for you:
So basically what you can do is:
1) print out all variables to output just using minikube docker-env command
2) set manually all the variables from previous step using set windows command.
Hope this will help.

issue while installing docker for Mac using command line?

I want to install docker using command line not using docker for mac. I have downloaded the individual binary for Mac from this link.
docker ce binaries
I am able to run docker command but if I run docker ps then it shows
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
I tried another way to downloading docker using brew as below
brew cask install docker
But using brew it only download the desktop setup of docker and I have to start it manually.
So I am looking for a solution in which I can install and run docker through command without involving any UI.
Thanks
The error above means that the docker service is not running so you have to run it first. Then enable it to start on boot - to avoid the need to start it each time you login to your macOS - at the end you should be able to use docker cli without issues

After installation, `docker info` is not working

I installed Dock via chocolatey install docker-toolbox. After installation, docker info is not working.
C:\Users\Chloe>docker info
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/info: open
//./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration
on Windows, the docker client must be run elevated to connect. This error may also indicate that the
docker daemon is not running.
C:\Users\Chloe>docker --version
Docker version 18.03.0-ce, build 0520e24302
https://docs.docker.com/get-started/#test-docker-version
I did run it from an Administrator shell.
Windows 8.1.
Had to run Start > Programs > Docker > Docker Quickstart Terminal which ran a lot of commands. Then in my original Console2 shell, I ran refreshenv. Then docker info would work. (I already had VirtualBox installed (choco install virtualbox).)

Resources