Giter Club home page Giter Club logo

devops_for_the_desperate's Introduction

DevOps For The Desperate

dftd

This repo is for the book DevOps for the Desperate.

Directories

Each one of these directories contain different material for different parts in the book. Here is a quick overview of each directory:

  • ansible: Contains the playbook and tasks to follow along in the first section of the book.

  • monitoring: Contains the k8s manifest files to install Prometheus, Alertmanager, and Grafana.

  • runbooks: Contains a simple runbook for telnet-server and examples of a runbook broken up by alert. These are used in the alerts for Chapter 9.

  • telnet-server: Contains the sample application that is used throughout two-thirds of the book.

  • vagrant: Contains the Vagrantfile for the VM used in the first section of the book.

  • apple-silicon: Contains the Vagrantfile for the VM used in the first section of the book and minikube instructions.

devops_for_the_desperate's People

Contributors

bradleyd avatar jlee7x2 avatar klipperkyle avatar qhartman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

devops_for_the_desperate's Issues

[Chapter 1] Vagrant up fails

Platform : linux
Vagrant 2.2.9
Vbox 6.1.34

Issue
Running vagrant up fails with

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "ipconfig", "vboxnet2", "--ip", "172.28.128.1", "--netmask", "255.255.255.0"]

Stderr: VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp

Possible Solution

I don't know much about the best practice, but for me it worked when I added an IP address to Vagrantfile on line 36

config.vm.network "private_network", type: "dhcp", ip: "192.168.56.11"

Support for using the book on GitHub Codespace platform

Hi @bradleyd , is there a way we can code along on Codespace while reading this book? Codespace provides a VM so I think there is no need for VirtualBox? Also, instead of running Vagrant commands, should I run Ansible commands (like ansible playbook) directly? Can we configure the Codespace VM in some way to set it up for following the code samples(something similar was done in the Apple Silicon Qemu case)?
Any suggestions will be helpful, thank you.

vagrant-vbguest (0.32.0) is no longer maintained and it contains bugs for curent vagrant (2.3.4) on fedora 40

vagrant-vbguest (0.32.0) is no longer maintained and it contains bugs for current vagrant (2.3.4) on fedora 40

you will encounter NoMethodError after you run command vagrant up and your VM will not instantiated.

for quick fix if you still want to use this plugin is go to
.vagrant.d/gems/3.3.1/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/hosts/virtualbox.rb on your home directory
and fix File.exists? into File.exist? on line 84

I try to publish new plugin that already fix this issue but ruby is not my field of expertise. But in my opinion you can follow along the book just fine without this unmaintained plugin installed.

Can't Get Past Chapter 1 - Please Help!

I recently bought the book DevOps for the Desparate and cannot get past chapter 1 exercises and I've gone through the exercises multiple times now.

Per the introduction instructions on page xiv:

I am running the examples in a Windows 11 Pro - Hyper - V Ubuntu VM.
I've tried the following OS's

  1. Ubuntu 18.04 LTS
  2. Ubuntu 20.04 LTS
  3. Ubuntu 22.04 LTS

image

(Not in the instructions)
When the Hyper-V image is created, I resized the hard drive to 100GB in Hyper-V setting since I was running out of space when I ran
$vagrant up

After I resized the hard drive in Hyper-V I also needed to resize the Linux partition which I did.

image

All of the other steps I completed successfully, IE:

Page xiv
Set-VMProcessor -VMName 'Ubuntu 20.04 LTS' -ExposeVirtualizationExtensions $true

Page xxi
$git clone https://github.com/bradleyd/devops_for_the_desperate/

Page 4
Installed Vagrant

Page 7
Installed Ansible

Page 9
'$ vagrant up'

I've been getting different errors, but now I am getting this one:

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/focal64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/focal64' version '20230719.0.0' is up to date...
==> default: Setting the name of the VM: dftd
==> default: Clearing any previously set network interfaces...
**There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "ipconfig", "vboxnet2", "--ip", "172.28.128.1", "--netmask", "255.255.255.0"]

Stderr: VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp**

I can't move on to the next chapter since evertything from this point is dependent on getting this set up correctly.

PS: There is a VM in VirtualBox, but I don't think it's working:

image

Typo on the book

Hello,
There is a typo page 27 of the book:

After you confirm the passphrase, the private key and public key files are created under your local ~./ssh/ directory.
~/.ssh/

Chapter 7 - Please Help

Output from Chapter 6 is flawless.

jasen@Renegade:devOps(main*)$ minikube start --driver=virtualbox
W0315 21:40:31.503000   12953 main.go:291] Unable to resolve the current Docker CLI context "default": context "default" does not exist
๐Ÿ˜„  minikube v1.29.0 on Ubuntu 22.04
โœจ  Using the virtualbox driver based on user configuration
๐Ÿ‘  Starting control plane node minikube in cluster minikube
๐Ÿ”ฅ  Creating virtualbox VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
๐Ÿณ  Preparing Kubernetes v1.26.1 on Docker 20.10.23 ...
    โ–ช Generating certificates and keys ...
    โ–ช Booting up control plane ...
    โ–ช Configuring RBAC rules ...
๐Ÿ”—  Configuring bridge CNI (Container Networking Interface) ...
    โ–ช Using image gcr.io/k8s-minikube/storage-provisioner:v5
๐Ÿ”Ž  Verifying Kubernetes components...
๐ŸŒŸ  Enabled addons: default-storageclass, storage-provisioner
๐Ÿ„  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
jasen@Renegade:devOps(main*)$ minikube docker-env
W0315 21:42:09.517386   13977 main.go:291] Unable to resolve the current Docker CLI context "default": context "default" does not exist
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.59.106:2376"
export DOCKER_CERT_PATH="/home/jasen/.minikube/certs"
export MINIKUBE_ACTIVE_DOCKERD="minikube"

# To point your shell to minikube's docker-daemon, run:
# eval $(minikube -p minikube docker-env)
jasen@Renegade:devOps(main*)$ ^C
jasen@Renegade:devOps(main*)$ eval $(minikube -p minikube docker-env)
W0315 21:42:35.665405   14080 main.go:291] Unable to resolve the current Docker CLI context "default": context "default" does not exist
jasen@Renegade:devOps(main*)$ docker --version
Docker version 23.0.1, build a5ee5b1
jasen@Renegade:devOps(main*)$ cd telnet-server/
jasen@Renegade:telnet-server(main*)$ docker build -t dftd/telnet-server:v1 .
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon  30.72kB
Step 1/9 : FROM golang:alpine AS build-env
alpine: Pulling from library/golang
63b65145d645: Pull complete 
a2d21d5440eb: Pull complete 
935e6c44a52c: Pull complete 
94cc34f8dd06: Pull complete 
Digest: sha256:1db127655b32aa559e32ed3754ed2ea735204d967a433e4b605aed1dd44c5084
Status: Downloaded newer image for golang:alpine
 ---> 898000b2160b
Step 2/9 : ADD . /
 ---> 7cc76dc4198d
Step 3/9 : RUN cd / && go build -o telnet-server
 ---> Running in 72e12a126ee6
go: downloading github.com/prometheus/client_golang v1.6.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.1.1
go: downloading github.com/golang/protobuf v1.4.0
go: downloading github.com/prometheus/common v0.9.1
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading github.com/prometheus/procfs v0.0.11
go: downloading google.golang.org/protobuf v1.21.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f
Removing intermediate container 72e12a126ee6
 ---> d8883e3d47b3
Step 4/9 : FROM alpine:latest as final
latest: Pulling from library/alpine
63b65145d645: Already exists 
Digest: sha256:ff6bdca1701f3a8a67e328815ff2346b0e4067d32ec36b7992c1fdc001dc8517
Status: Downloaded newer image for alpine:latest
 ---> b2aa39c304c2
Step 5/9 : WORKDIR /app
 ---> Running in 78924180d9c7
Removing intermediate container 78924180d9c7
 ---> 4827fa0a2a99
Step 6/9 : ENV TELNET_PORT 2323
 ---> Running in 19483d0b9c7f
Removing intermediate container 19483d0b9c7f
 ---> 207a91df947d
Step 7/9 : ENV METRIC_PORT 9000
 ---> Running in 86b0e6a6e037
Removing intermediate container 86b0e6a6e037
 ---> e4d674d473da
Step 8/9 : COPY --from=build-env /telnet-server /app/
 ---> 862c1462ab4a
Step 9/9 : ENTRYPOINT ["./telnet-server"]
 ---> Running in 22fffb844758
Removing intermediate container 22fffb844758
 ---> 2f32fb902fc6
Successfully built 2f32fb902fc6
Successfully tagged dftd/telnet-server:v1
jasen@Renegade:telnet-server(main*)$ docker image ls git 
REPOSITORY           TAG       IMAGE ID       CREATED          SIZE
dftd/telnet-server   v1        2f32fb902fc6   10 seconds ago   19MB
jasen@Renegade:telnet-server(main*)$ docker run -p 2323:2323 -d --name telnet-server dftd/telnet-server:v1
507cda205191e7f9afd9a68d650e6c5c9e54c5a6ae09abfdfa6782b179bf6607
jasen@Renegade:telnet-server(main*)$ docker container ls -f name=telnet-server
CONTAINER ID   IMAGE                   COMMAND             CREATED          STATUS         PORTS                    NAMES
507cda205191   dftd/telnet-server:v1   "./telnet-server"   10 seconds ago   Up 9 seconds   0.0.0.0:2323->2323/tcp   telnet-server
jasen@Renegade:telnet-server(main*)$ minikube ip
192.168.59.106
jasen@Renegade:telnet-server(main*)$ telnet 192.168.59.106 2323
Trying 192.168.59.106...
Connected to 192.168.59.106.
Escape character is '^]'.

____________ ___________
|  _  \  ___|_   _|  _  \
| | | | |_    | | | | | |
| | | |  _|   | | | | | |
| |/ /| |     | | | |/ /
|___/ \_|     \_/ |___/

>d
Thu Mar 16 04:45:47 +0000 UTC 2023
>q
Good Bye!
Connection closed by foreign host.

Here is Chapter 7. I can't figure this one out.

jasen@Renegade:telnet-server(main*)$ minikube kubectl cluster-info
Kubernetes control plane is running at https://192.168.59.106:8443
CoreDNS is running at https://192.168.59.106:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- explain deployment.metadata.labels
KIND:     Deployment
VERSION:  apps/v1

FIELD:    labels <map[string]string>

DESCRIPTION:
     Map of string keys and values that can be used to organize and categorize
     (scope and select) objects. May match selectors of replication controllers
     and services. More info: http://kubernetes.io/docs/user-guide/labels
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- apply -f kubernetes/
deployment.apps/telnet-server configured
service/telnet-server unchanged
service/telnet-server-metrics unchanged
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- get deployments.apps telnet-server
NAME            READY   UP-TO-DATE   AVAILABLE   AGE
telnet-server   0/2     1            0           9m26s
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- get pods -l app=telnet-server
NAME                             READY   STATUS             RESTARTS   AGE
telnet-server-5fd648cdd9-dwdkw   0/1     ImagePullBackOff   0          9m39s
telnet-server-5fd648cdd9-md9lv   0/1     ImagePullBackOff   0          9m39s
telnet-server-68f9f68c45-8d9s8   0/1     ErrImagePull       0          32s
jasen@Renegade:telnet-server(main*)$ minikube kubectl --help
Run the Kubernetes client, download it if necessary. Remember -- after kubectl!

This will run the Kubernetes client (kubectl) with the same version as the cluster

Normally it will download a binary matching the host operating system and architecture,
but optionally you can also run it directly on the control plane over the ssh connection.
This can be useful if you cannot run kubectl locally for some reason, like unsupported
host. Please be aware that when using --ssh all paths will apply to the remote machine.

Examples:
minikube kubectl -- --help
minikube kubectl -- get pods --namespace kube-system

Options:
    --ssh=false:
        Use SSH for running kubernetes client on the node

Usage:
  minikube kubectl [flags] [options]

Use "minikube options" for a list of global command-line options (applies to all commands).
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- --help
kubectl controls the Kubernetes cluster manager.

 Find more information at: https://kubernetes.io/docs/reference/kubectl/

Basic Commands (Beginner):
  create          Create a resource from a file or from stdin
  expose          Take a replication controller, service, deployment or pod and expose it as a new Kubernetes service
  run             Run a particular image on the cluster
  set             Set specific features on objects

Basic Commands (Intermediate):
  explain         Get documentation for a resource
  get             Display one or many resources
  edit            Edit a resource on the server
  delete          Delete resources by file names, stdin, resources and names, or by resources and label selector

Deploy Commands:
  rollout         Manage the rollout of a resource
  scale           Set a new size for a deployment, replica set, or replication controller
  autoscale       Auto-scale a deployment, replica set, stateful set, or replication controller

Cluster Management Commands:
  certificate     Modify certificate resources.
  cluster-info    Display cluster information
  top             Display resource (CPU/memory) usage
  cordon          Mark node as unschedulable
  uncordon        Mark node as schedulable
  drain           Drain node in preparation for maintenance
  taint           Update the taints on one or more nodes

Troubleshooting and Debugging Commands:
  describe        Show details of a specific resource or group of resources
  logs            Print the logs for a container in a pod
  attach          Attach to a running container
  exec            Execute a command in a container
  port-forward    Forward one or more local ports to a pod
  proxy           Run a proxy to the Kubernetes API server
  cp              Copy files and directories to and from containers
  auth            Inspect authorization
  debug           Create debugging sessions for troubleshooting workloads and nodes
  events          List events

Advanced Commands:
  diff            Diff the live version against a would-be applied version
  apply           Apply a configuration to a resource by file name or stdin
  patch           Update fields of a resource
  replace         Replace a resource by file name or stdin
  wait            Experimental: Wait for a specific condition on one or many resources
  kustomize       Build a kustomization target from a directory or URL.

Settings Commands:
  label           Update the labels on a resource
  annotate        Update the annotations on a resource
  completion      Output shell completion code for the specified shell (bash, zsh, fish, or powershell)

Other Commands:
  alpha           Commands for features in alpha
  api-resources   Print the supported API resources on the server
  api-versions    Print the supported API versions on the server, in the form of "group/version"
  config          Modify kubeconfig files
  plugin          Provides utilities for interacting with plugins
  version         Print the client and server version information

Usage:
  kubectl [flags] [options]

Use "kubectl <command> --help" for more information about a given command.
Use "kubectl options" for a list of global command-line options (applies to all commands).
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- delete
error: You must provide one or more resources by argument or filename.
Example resource specifications include:
   '-f rsrc.yaml'
   '--filename=rsrc.json'
   '<resource> <name>'
   '<resource>'
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- delete telnet/*
error: the server doesn't have a resource type "telnet"
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- delete telnet
error: the server doesn't have a resource type "telnet"
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- get pods -l app=telnet-server
NAME                             READY   STATUS             RESTARTS   AGE
telnet-server-5fd648cdd9-dwdkw   0/1     ImagePullBackOff   0          14m
telnet-server-5fd648cdd9-md9lv   0/1     ImagePullBackOff   0          14m
telnet-server-68f9f68c45-8d9s8   0/1     ImagePullBackOff   0          5m12s
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- delete pod
error: resource(s) were provided, but no name was specified
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- delete pod telnet-server-5fd648cdd9-dwdkw
pod "telnet-server-5fd648cdd9-dwdkw" deleted
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- delete pod telnet-server-5fd648cdd9-md9lv
pod "telnet-server-5fd648cdd9-md9lv" deleted
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- delete pod telnet-server--68f9f68c45-8d9s8
Error from server (NotFound): pods "telnet-server--68f9f68c45-8d9s8" not found
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- delete pod telnet-server-68f9f68c45-8d9s8
pod "telnet-server-68f9f68c45-8d9s8" deleted
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- get pods -l app=telnet-server
NAME                             READY   STATUS         RESTARTS   AGE
telnet-server-5fd648cdd9-6sh5r   0/1     ErrImagePull   0          30s
telnet-server-5fd648cdd9-9dtxf   0/1     ErrImagePull   0          45s
telnet-server-68f9f68c45-gpbpn   0/1     ErrImagePull   0          9s
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- get endpoints -l app=telnet-server
NAME                    ENDPOINTS   AGE
telnet-server                       16m
telnet-server-metrics               16m
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- get pods -l app=telnet-server
NAME                             READY   STATUS             RESTARTS   AGE
telnet-server-5fd648cdd9-6sh5r   0/1     ImagePullBackOff   0          5m41s
telnet-server-5fd648cdd9-9dtxf   0/1     ImagePullBackOff   0          5m56s
telnet-server-68f9f68c45-gpbpn   0/1     ImagePullBackOff   0          5m20s
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- delete pod telnet-server-5fd648cdd9-6sh5r
pod "telnet-server-5fd648cdd9-6sh5r" deleted
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- delete pod telnet-server-5fd648cdd9-9dtxf
pod "telnet-server-5fd648cdd9-9dtxf" deleted
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- delete pod telnet-server-68f9f68c45-gpbpn
pod "telnet-server-68f9f68c45-gpbpn" deleted
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- get pods -l app=telnet-server
NAME                             READY   STATUS             RESTARTS   AGE
telnet-server-5fd648cdd9-2rljq   0/1     ErrImagePull       0          37s
telnet-server-5fd648cdd9-v8j7f   0/1     ImagePullBackOff   0          22s
telnet-server-68f9f68c45-ggwnl   0/1     ErrImagePull       0          6s
jasen@Renegade:telnet-server(main*)$ minikube ip
192.168.59.106
jasen@Renegade:telnet-server(main*)$ telnet 192.168.59.106 2323
Trying 192.168.59.106...
Connected to 192.168.59.106.
Escape character is '^]'.

____________ ___________
|  _  \  ___|_   _|  _  \
| | | | |_    | | | | | |
| | | |  _|   | | | | | |
| |/ /| |     | | | |/ /
|___/ \_|     \_/ |___/

>d
Thu Mar 16 05:13:19 +0000 UTC 2023
>q
Good Bye!
Connection closed by foreign host.
jasen@Renegade:telnet-server(main*)$ docker stats --no-stream telnet-server
CONTAINER ID   NAME            CPU %     MEM USAGE / LIMIT     MEM %     NET I/O          BLOCK I/O   PIDS
507cda205191   telnet-server   0.00%     1.336MiB / 5.651GiB   0.02%     2.1kB / 2.22kB   0B / 0B     4
jasen@Renegade:telnet-server(main*)$ docker history dftd/telnet-server:v1
IMAGE          CREATED          CREATED BY                                      SIZE      COMMENT
2f32fb902fc6   29 minutes ago   /bin/sh -c #(nop)  ENTRYPOINT ["./telnet-serโ€ฆ   0B        
862c1462ab4a   29 minutes ago   /bin/sh -c #(nop) COPY file:ddd6f4d196922fabโ€ฆ   12MB      
e4d674d473da   29 minutes ago   /bin/sh -c #(nop)  ENV METRIC_PORT=9000         0B        
207a91df947d   29 minutes ago   /bin/sh -c #(nop)  ENV TELNET_PORT=2323         0B        
4827fa0a2a99   29 minutes ago   /bin/sh -c #(nop) WORKDIR /app                  0B        
b2aa39c304c2   4 weeks ago      /bin/sh -c #(nop)  CMD ["/bin/sh"]              0B        
<missing>      4 weeks ago      /bin/sh -c #(nop) ADD file:40887ab7c06977737โ€ฆ   7.05MB    
jasen@Renegade:telnet-server(main*)$ docker inspect telnet-server
[
    {
        "Id": "507cda205191e7f9afd9a68d650e6c5c9e54c5a6ae09abfdfa6782b179bf6607",
        "Created": "2023-03-16T04:45:00.726405304Z",
        "Path": "./telnet-server",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 6699,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2023-03-16T04:45:01.027052925Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:2f32fb902fc64b957bc6916f8ca2e19f4b0c319a546f7d4c9457efa5ea62b1f2",
        "ResolvConfPath": "/var/lib/docker/containers/507cda205191e7f9afd9a68d650e6c5c9e54c5a6ae09abfdfa6782b179bf6607/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/507cda205191e7f9afd9a68d650e6c5c9e54c5a6ae09abfdfa6782b179bf6607/hostname",
        "HostsPath": "/var/lib/docker/containers/507cda205191e7f9afd9a68d650e6c5c9e54c5a6ae09abfdfa6782b179bf6607/hosts",
        "LogPath": "/var/lib/docker/containers/507cda205191e7f9afd9a68d650e6c5c9e54c5a6ae09abfdfa6782b179bf6607/507cda205191e7f9afd9a68d650e6c5c9e54c5a6ae09abfdfa6782b179bf6607-json.log",
        "Name": "/telnet-server",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": null,
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {
                    "max-size": "100m"
                }
            },
            "NetworkMode": "default",
            "PortBindings": {
                "2323/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "2323"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "host",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                43,
                271
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": [],
            "BlkioDeviceWriteBps": [],
            "BlkioDeviceReadIOps": [],
            "BlkioDeviceWriteIOps": [],
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "KernelMemory": 0,
            "KernelMemoryTCP": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": [
                {
                    "Name": "nofile",
                    "Hard": 1048576,
                    "Soft": 1048576
                }
            ],
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/c5083ad4993ea3d63f2c87a787393e01840fdd58928a49b1f9d5ea3c3012bc03-init/diff:/var/lib/docker/overlay2/b0c1e128111a91a7513c54a5028d3836e73e048cc3f90891927bc7920fa52979/diff:/var/lib/docker/overlay2/ed270f9c8a361ac5a64e873fc876a3225feb79d2782c55fa619cba64340b5d19/diff:/var/lib/docker/overlay2/79c806a82bff6f718c460a9d54c84772ed72aae465144bf11bfa92dea88fe474/diff",
                "MergedDir": "/var/lib/docker/overlay2/c5083ad4993ea3d63f2c87a787393e01840fdd58928a49b1f9d5ea3c3012bc03/merged",
                "UpperDir": "/var/lib/docker/overlay2/c5083ad4993ea3d63f2c87a787393e01840fdd58928a49b1f9d5ea3c3012bc03/diff",
                "WorkDir": "/var/lib/docker/overlay2/c5083ad4993ea3d63f2c87a787393e01840fdd58928a49b1f9d5ea3c3012bc03/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [],
        "Config": {
            "Hostname": "507cda205191",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "2323/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "TELNET_PORT=2323",
                "METRIC_PORT=9000"
            ],
            "Cmd": null,
            "Image": "dftd/telnet-server:v1",
            "Volumes": null,
            "WorkingDir": "/app",
            "Entrypoint": [
                "./telnet-server"
            ],
            "OnBuild": null,
            "Labels": {}
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "426086e9cf416dce47acdf5ae7fff4e2b876612d4db3f07106970899425804eb",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "2323/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "2323"
                    }
                ]
            },
            "SandboxKey": "/var/run/docker/netns/426086e9cf41",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "82894c96620fe47e81108a7707c99e7d7f54620c884d584746d10333e10d3938",
            "Gateway": "172.17.0.1",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "172.17.0.2",
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "02:42:ac:11:00:02",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "cef4436cf314ffe2176c7a8600489298cc6ed7fecfe36dad534e9d779af26045",
                    "EndpointID": "82894c96620fe47e81108a7707c99e7d7f54620c884d584746d10333e10d3938",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:02",
                    "DriverOpts": null
                }
            }
        }
    }
]
jasen@Renegade:telnet-server(main*)$ docker exec -it telnet-server /bin/sh
/app # exit
jasen@Renegade:telnet-server(main*)$ docker exec telnet-server env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=507cda205191
TELNET_PORT=2323
METRIC_PORT=9000
HOME=/root
jasen@Renegade:telnet-server(main*)$ docker exec telnet-server env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=507cda205191
TELNET_PORT=2323
METRIC_PORT=9000
HOME=/root
jasen@Renegade:telnet-server(main*)$ docker container ls -f name=telnet-server
CONTAINER ID   IMAGE                       COMMAND             CREATED          STATUS          PORTS                    NAMES
bacdab32d850   registry.k8s.io/pause:3.6   "/pause"            5 minutes ago    Up 5 minutes                             k8s_POD_telnet-server-68f9f68c45-ggwnl_default_5b09cc3c-ecdf-483e-adfd-641955b5c0f2_0
8bc0526561f3   registry.k8s.io/pause:3.6   "/pause"            5 minutes ago    Up 5 minutes                             k8s_POD_telnet-server-5fd648cdd9-v8j7f_default_e63fe101-69fa-40cd-ab4f-77b211e26eff_0
4836c1e5fb75   registry.k8s.io/pause:3.6   "/pause"            6 minutes ago    Up 5 minutes                             k8s_POD_telnet-server-5fd648cdd9-2rljq_default_be99308c-ab12-4f57-850e-29afc56f6672_0
507cda205191   dftd/telnet-server:v1       "./telnet-server"   31 minutes ago   Up 31 minutes   0.0.0.0:2323->2323/tcp   telnet-server
jasen@Renegade:telnet-server(main*)$ docker image ls
REPOSITORY                                TAG       IMAGE ID       CREATED          SIZE
dftd/telnet-server                        v1        2f32fb902fc6   32 minutes ago   19MB
<none>                                    <none>    d8883e3d47b3   32 minutes ago   380MB
golang                                    alpine    898000b2160b   8 days ago       254MB
alpine                                    latest    b2aa39c304c2   4 weeks ago      7.05MB
registry.k8s.io/kube-apiserver            v1.26.1   deb04688c4a3   8 weeks ago      134MB
registry.k8s.io/kube-scheduler            v1.26.1   655493523f60   8 weeks ago      56.3MB
registry.k8s.io/kube-controller-manager   v1.26.1   e9c08e11b07f   8 weeks ago      124MB
registry.k8s.io/kube-proxy                v1.26.1   46a6bb3c77ce   8 weeks ago      65.6MB
registry.k8s.io/etcd                      3.5.6-0   fce326961ae2   3 months ago     299MB
registry.k8s.io/pause                     3.9       e6f181688397   5 months ago     744kB
registry.k8s.io/coredns/coredns           v1.9.3    5185b96f0bec   9 months ago     48.8MB
registry.k8s.io/pause                     3.6       6270bb605e12   18 months ago    683kB
gcr.io/k8s-minikube/storage-provisioner   v5        6e38f40d628d   23 months ago    31.5MB
jasen@Renegade:telnet-server(main*)$ spec.selector
spec.selector: command not found
jasen@Renegade:telnet-server(main*)$ spec.selector
spec.selector: command not found
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- get services -l app=telnet-server
NAME                    TYPE           CLUSTER-IP     EXTERNAL-IP   PORT(S)          AGE
telnet-server           LoadBalancer   10.104.37.35   <pending>     2323:31340/TCP   30m
telnet-server-metrics   ClusterIP      10.100.0.62    <none>        9000/TCP         30m
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- get pods -l app=telnet-server
NAME                             READY   STATUS             RESTARTS   AGE
telnet-server-5fd648cdd9-2rljq   0/1     ImagePullBackOff   0          9m32s
telnet-server-5fd648cdd9-v8j7f   0/1     ImagePullBackOff   0          9m17s
telnet-server-68f9f68c45-ggwnl   0/1     ImagePullBackOff   0          9m1s
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- get deployments.apps telnet-server
NAME            READY   UP-TO-DATE   AVAILABLE   AGE
telnet-server   0/2     1            0           31m
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- apply -f kubernetes/
deployment.apps/telnet-server configured
service/telnet-server unchanged
service/telnet-server-metrics unchanged
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- get deployments.apps telnet-server
NAME            READY   UP-TO-DATE   AVAILABLE   AGE
telnet-server   0/2     1            0           32m
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- get deployments.apps telnet-server
NAME            READY   UP-TO-DATE   AVAILABLE   AGE
telnet-server   0/2     1            0           32m
jasen@Renegade:telnet-server(main*)$ minikube kubectl -- get pods -l app=telnet-server
NAME                             READY   STATUS             RESTARTS   AGE
telnet-server-5fd648cdd9-2rljq   0/1     ImagePullBackOff   0          10m
telnet-server-5fd648cdd9-v8j7f   0/1     ImagePullBackOff   0          10m
telnet-server-68f9f68c45-ggwnl   0/1     ImagePullBackOff   0          9m58s
jasen@Renegade:telnet-server(main*)$ git add .
jasen@Renegade:telnet-server(main*)$ git commit -m 'everything checks out but ImagePullBackOff again'
[main b043e9e] everything checks out but ImagePullBackOff again
 1 file changed, 3 insertions(+), 4 deletions(-)
jasen@Renegade:telnet-server(main*)$ git push origin main
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 16 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 517 bytes | 517.00 KiB/s, done.
Total 5 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
To https://github.com/jasencarroll/DevOps-Desperate.git
   2664231..b043e9e  main -> main
jasen@Renegade:telnet-server(main*)$ docker image ls git
REPOSITORY   TAG       IMAGE ID   CREATED   SIZE
jasen@Renegade:telnet-server(main*)$ telnet 192.168.59.106 2323
Trying 192.168.59.106...
Connected to 192.168.59.106.
Escape character is '^]'.

____________ ___________
|  _  \  ___|_   _|  _  \
| | | | |_    | | | | | |
| | | |  _|   | | | | | |
| |/ /| |     | | | |/ /
|___/ \_|     \_/ |___/

>d
Thu Mar 16 05:25:48 +0000 UTC 2023
>q
Good Bye!
Connection closed by foreign host.
jasen@Renegade:telnet-server(main*)$ docker build -t dftd/telnet-server:v1 .
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon  30.72kB
Step 1/9 : FROM golang:alpine AS build-env
 ---> 898000b2160b
Step 2/9 : ADD . /
 ---> Using cache
 ---> 7cc76dc4198d
Step 3/9 : RUN cd / && go build -o telnet-server
 ---> Using cache
 ---> d8883e3d47b3
Step 4/9 : FROM alpine:latest as final
 ---> b2aa39c304c2
Step 5/9 : WORKDIR /app
 ---> Using cache
 ---> 4827fa0a2a99
Step 6/9 : ENV TELNET_PORT 2323
 ---> Using cache
 ---> 207a91df947d
Step 7/9 : ENV METRIC_PORT 9000
 ---> Using cache
 ---> e4d674d473da
Step 8/9 : COPY --from=build-env /telnet-server /app/
 ---> Using cache
 ---> 862c1462ab4a
Step 9/9 : ENTRYPOINT ["./telnet-server"]
 ---> Using cache
 ---> 2f32fb902fc6
Successfully built 2f32fb902fc6
Successfully tagged dftd/telnet-server:v1
jasen@Renegade:telnet-server(main*)$ docker image ls git
REPOSITORY   TAG       IMAGE ID   CREATED   SIZE
jasen@Renegade:telnet-server(main*)$ docker run -p 2323:2323 -d --name telnet-server dftd/telnet-server:v1
docker: Error response from daemon: Conflict. The container name "/telnet-server" is already in use by container "507cda205191e7f9afd9a68d650e6c5c9e54c5a6ae09abfdfa6782b179bf6607". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
jasen@Renegade:telnet-server(main*)$ docker container ls -f name=telnet-server
CONTAINER ID   IMAGE                       COMMAND             CREATED          STATUS          PORTS                    NAMES
bacdab32d850   registry.k8s.io/pause:3.6   "/pause"            16 minutes ago   Up 16 minutes                            k8s_POD_telnet-server-68f9f68c45-ggwnl_default_5b09cc3c-ecdf-483e-adfd-641955b5c0f2_0
8bc0526561f3   registry.k8s.io/pause:3.6   "/pause"            17 minutes ago   Up 17 minutes                            k8s_POD_telnet-server-5fd648cdd9-v8j7f_default_e63fe101-69fa-40cd-ab4f-77b211e26eff_0
4836c1e5fb75   registry.k8s.io/pause:3.6   "/pause"            17 minutes ago   Up 17 minutes                            k8s_POD_telnet-server-5fd648cdd9-2rljq_default_be99308c-ab12-4f57-850e-29afc56f6672_0
507cda205191   dftd/telnet-server:v1       "./telnet-server"   42 minutes ago   Up 42 minutes   0.0.0.0:2323->2323/tcp   telnet-server
jasen@Renegade:telnet-server(main*)$ ^C
jasen@Renegade:telnet-server(main*)$ 

This is what happened to my dockerd service. I don't know when or how this stopped running and how the docker was able to keep going?

Also I'm really confused why we installed docker locally and your statement was "if docker connected with minikube correctly run docker version" like, my docker version was already working from the bin installs?

asen@Renegade:Downloads$ sudo dockerd &
[1] 10799
jasen@Renegade:Downloads$ INFO[2023-03-15T21:27:50.882337779-07:00] Starting up                                  
INFO[2023-03-15T21:27:50.882741526-07:00] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf 
INFO[2023-03-15T21:27:50.901889828-07:00] [core] [Channel #1] Channel created           module=grpc
INFO[2023-03-15T21:27:50.901917305-07:00] [core] [Channel #1] original dial target is: "unix:///run/containerd/containerd.sock"  module=grpc
INFO[2023-03-15T21:27:50.901937881-07:00] [core] [Channel #1] parsed dial target is: {Scheme:unix Authority: Endpoint:run/containerd/containerd.sock URL:{Scheme:unix Opaque: User: Host: Path:/run/containerd/containerd.sock RawPath: OmitHost:false ForceQuery:false RawQuery: Fragment: RawFragment:}}  module=grpc
INFO[2023-03-15T21:27:50.901944378-07:00] [core] [Channel #1] Channel authority set to "localhost"  module=grpc
INFO[2023-03-15T21:27:50.902030817-07:00] [core] [Channel #1] Resolver state updated: {
  "Addresses": [
    {
      "Addr": "/run/containerd/containerd.sock",
      "ServerName": "",
      "Attributes": {},
      "BalancerAttributes": null,
      "Type": 0,
      "Metadata": null
    }
  ],
  "ServiceConfig": null,
  "Attributes": null
} (resolver returned new addresses)  module=grpc
INFO[2023-03-15T21:27:50.902073844-07:00] [core] [Channel #1] Channel switches to new LB policy "pick_first"  module=grpc
INFO[2023-03-15T21:27:50.902122492-07:00] [core] [Channel #1 SubChannel #2] Subchannel created  module=grpc
INFO[2023-03-15T21:27:50.902153644-07:00] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to CONNECTING  module=grpc
INFO[2023-03-15T21:27:50.902178492-07:00] [core] [Channel #1 SubChannel #2] Subchannel picks a new address "/run/containerd/containerd.sock" to connect  module=grpc
INFO[2023-03-15T21:27:50.902327688-07:00] [core] [Channel #1] Channel Connectivity change to CONNECTING  module=grpc
INFO[2023-03-15T21:27:50.902442348-07:00] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to READY  module=grpc
INFO[2023-03-15T21:27:50.902461357-07:00] [core] [Channel #1] Channel Connectivity change to READY  module=grpc
INFO[2023-03-15T21:27:50.903331088-07:00] [core] [Channel #4] Channel created           module=grpc
INFO[2023-03-15T21:27:50.903342012-07:00] [core] [Channel #4] original dial target is: "unix:///run/containerd/containerd.sock"  module=grpc
INFO[2023-03-15T21:27:50.903355224-07:00] [core] [Channel #4] parsed dial target is: {Scheme:unix Authority: Endpoint:run/containerd/containerd.sock URL:{Scheme:unix Opaque: User: Host: Path:/run/containerd/containerd.sock RawPath: OmitHost:false ForceQuery:false RawQuery: Fragment: RawFragment:}}  module=grpc
INFO[2023-03-15T21:27:50.903361231-07:00] [core] [Channel #4] Channel authority set to "localhost"  module=grpc
INFO[2023-03-15T21:27:50.903383905-07:00] [core] [Channel #4] Resolver state updated: {
  "Addresses": [
    {
      "Addr": "/run/containerd/containerd.sock",
      "ServerName": "",
      "Attributes": {},
      "BalancerAttributes": null,
      "Type": 0,
      "Metadata": null
    }
  ],
  "ServiceConfig": null,
  "Attributes": null
} (resolver returned new addresses)  module=grpc
INFO[2023-03-15T21:27:50.903400961-07:00] [core] [Channel #4] Channel switches to new LB policy "pick_first"  module=grpc
INFO[2023-03-15T21:27:50.903417400-07:00] [core] [Channel #4 SubChannel #5] Subchannel created  module=grpc
INFO[2023-03-15T21:27:50.903431304-07:00] [core] [Channel #4 SubChannel #5] Subchannel Connectivity change to CONNECTING  module=grpc
INFO[2023-03-15T21:27:50.903444341-07:00] [core] [Channel #4 SubChannel #5] Subchannel picks a new address "/run/containerd/containerd.sock" to connect  module=grpc
INFO[2023-03-15T21:27:50.903462331-07:00] [core] [Channel #4] Channel Connectivity change to CONNECTING  module=grpc
INFO[2023-03-15T21:27:50.903711175-07:00] [core] [Channel #4 SubChannel #5] Subchannel Connectivity change to READY  module=grpc
INFO[2023-03-15T21:27:50.903750262-07:00] [core] [Channel #4] Channel Connectivity change to READY  module=grpc
INFO[2023-03-15T21:27:50.950272470-07:00] [graphdriver] using prior storage driver: overlay2 
INFO[2023-03-15T21:27:50.971548829-07:00] Loading containers: start.                   
INFO[2023-03-15T21:27:51.164785286-07:00] Removing stale sandbox 23bc190e6b5d8bcac39e8e7acc1bca291d02561a81f3f4d0308c9e520751fe2a (c8ffaf269440249f2faca383c5dd0968d489fbf096d606d78a07a1a4106cf090) 
WARN[2023-03-15T21:27:51.298283485-07:00] Error (Unable to complete atomic operation, key modified) deleting object [endpoint 6d007e64896ddfd29b62c905364f17991e5798ab1db61c4b259fec97170f9219 a2f1d6eb62585756ae7f859622fe133e277bcdd591daf69db581c6c618e64a91], retrying.... 
INFO[2023-03-15T21:27:51.650567675-07:00] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address 
INFO[2023-03-15T21:27:51.684041422-07:00] Loading containers: done.                    
INFO[2023-03-15T21:27:51.692066980-07:00] Docker daemon                                 commit=bc3805a graphdriver=overlay2 version=23.0.1
INFO[2023-03-15T21:27:51.692320181-07:00] Daemon has completed initialization          
INFO[2023-03-15T21:27:51.714690356-07:00] [core] [Server #7] Server created             module=grpc
INFO[2023-03-15T21:27:51.717524264-07:00] API listen on /var/run/docker.sock           
jasen@Renegade:Downloads$ sudo dockerd &
[2] 21226

[2]+  Stopped                 sudo dockerd
jasen@Renegade:Downloads$ sudo dockerd &
[3] 21292

[3]+  Stopped                 sudo dockerd
jasen@Renegade:Downloads$ sudo dockerd &
[4] 21319

[4]+  Stopped                 sudo dockerd
jasen@Renegade:Downloads$ sudo dockerd &
[5] 21342

[5]+  Stopped                 sudo dockerd
jasen@Renegade:Downloads$ sudo dockerd &
[6] 21352

[6]+  Stopped                 sudo dockerd
jasen@Renegade:Downloads$ sudo dockerd &
[7] 21362

[7]+  Stopped                 sudo dockerd
jasen@Renegade:Downloads$ sudo dockerd &
[8] 21373

[8]+  Stopped                 sudo dockerd
jasen@Renegade:Downloads$ sudo dockerd &
[9] 21383

[9]+  Stopped                 sudo dockerd
jasen@Renegade:Downloads$ sudo dockerd &
[10] 21393

[10]+  Stopped                 sudo dockerd
jasen@Renegade:Downloads$ sudo dockerd &
[11] 21403

[11]+  Stopped                 sudo dockerd
jasen@Renegade:Downloads$ sudo dockerd &
[12] 21413

[12]+  Stopped                 sudo dockerd
jasen@Renegade:Downloads$ sudo dockerd &
[13] 21423

[13]+  Stopped                 sudo dockerd

Chapter 3, Page 34, Testing SSH Access

Book has been great until now, often verbatim identical to my output, but ... now I hit this:
begin terminal quote

cpm@pop-os:~/devops_for_the_desperate/vagrant$ ssh -i ~/.ssh/dftd -p 2222 bender@localhost
The authenticity of host '[localhost]:2222 ([127.0.0.1]:2222)' can't be established.
ED25519 key fingerprint is SHA256:wueB0xyyhmfAjJ3sI46IthN9rqhBoENWQQ2aOdl0k8k.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[localhost]:2222' (ED25519) to the list of known hosts.
bender@localhost: Permission denied (publickey).
cpm@pop-os:~/devops_for_the_desperate/vagrant$ ssh -i ~/.ssh/dftd -p 2222 bender@localhost
bender@localhost: Permission denied (publickey).
cpm@pop-os:~/devops_for_the_desperate/vagrant$ ssh -i ~/.ssh/dftd -p 2222 bender@dftd
ssh: Could not resolve hostname dftd: Temporary failure in name resolution
cpm@pop-os:~/devops_for_the_desperate/vagrant$ cat /etc/hosts
127.0.0.1	localhost
::1		localhost
127.0.1.1	pop-os.localdomain	pop-os
cpm@pop-os:~/devops_for_the_desperate/vagrant$ 

end terminal quote
My guess is that localhost is the physical host, where bender is unknown. Physical host doesn't know the VM exists (not in /etc/hosts), so how could physical host ssh to the VM? Nothing in VM:/var/log/auth.log or VM:/var/log/syslog looks significant to me. May I please request your help in getting this example to succeed? Thank you.
begin terminal quote

cpm@pop-os:~/devops_for_the_desperate/vagrant$ vagrant ssh
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.4.0-135-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Fri Dec 30 23:19:34 UTC 2022

  System load:  0.0               Processes:               115
  Usage of /:   4.3% of 38.70GB   Users logged in:         0
  Memory usage: 22%               IPv4 address for enp0s3: 10.0.2.15
  Swap usage:   0%                IPv4 address for enp0s8: 192.168.56.3

 * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
   just raised the bar for easy, resilient and secure K8s cluster deployment.

   https://ubuntu.com/engage/secure-kubernetes-at-the-edge

0 updates can be applied immediately.

Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings


Last login: Fri Dec 30 22:21:55 2022 from 10.0.2.2
vagrant@dftd:~$ less /var/log/auth.log
/var/log/auth.log: Permission denied
vagrant@dftd:~$ sudo less /var/log/auth.log
vagrant@dftd:~$ sudo less /var/log/syslog
vagrant@dftd:~$ 

end terminal quote

[Chapter 8] Configuration file backwards incompatibility in container-structure-test

Hello Bradley,

First of all thanks for the book it's awesome :)

While doing the chapter 8 i encountered an error with the skaffold dev --cleanup=false command, more precisely this error :

=======================================================
====== Test file: command-and-metadata-test.yaml ======
=======================================================
=== RUN: 
--- FAIL
duration: 0s
Error: error parsing config file: error unmarshalling config: yaml: unmarshal errors:
  line 8: field env not found in type v2.MetadataTest

=======================================================
======================= RESULTS =======================
=======================================================
Passes:      0
Failures:    1
Duration:    0s
Total tests: 1

FAIL
time="2023-01-07T13:15:03+01:00" level=fatal msg=FAIL
running tests: running container-structure-test: error running container-structure-test command: exit status 1

I didn't change the command-and-metadata-test.yaml file.
I searched a bit and the configuration files of container-structure changed with version 1.13.0
More information here :
GoogleContainerTools/container-structure-test#322

I checked my container-structure-test = v1.14.0

TLDR; env field is now called envVars

I resolved the issue by modifying the line 8 of command-and-metadata-test.yaml

schemaVersion: 2.0.0
commandTests:
  - name: "telnet-server"
    command: "./telnet-server"
    args: ["-i"]
    expectedOutput: ["telnet port :2323\nMetrics Port: :9000"]
metadataTest:
  envVars:
    - key: TELNET_PORT
      value: 2323
    - key: METRIC_PORT
      value: 9000
  entrypoint: ["./telnet-server"]
  workdir: "/app"

I don't know if the contributors behind container-structure-test are going to fix this, but just wanted to warn you about this current problem :)

Issue with running ansible playbook command for setting up qemu on Apple Silicon.

Hello, I am on an M1 Apple Silicon device and encountered the following error when trying to configure qemu.

Commands:
In a separate tab,

qemu-system-aarch64 -cpu cortex-a72 -smp cpus=4,sockets=1,cores=4,threads=1 -machine virt,highmem=off -accel hvf -accel tcg,tb-size=2048 -m 3G -initrd initrd.img-5.10.0-11-arm64 -kernel vmlinuz-5.10.0-11-arm64 -append "root=/dev/vda2 console=ttyAMA0" -drive if=virtio,file=debian-dftd-aarch64.qcow2,format=qcow2,id=hd -net user,hostfwd=tcp::10022-:22,hostfwd=tcp::20375-:2375,hostfwd=tcp::5001-:5000 -net nic -device intel-hda -device hda-duplex -nographic

Then,

ansible-playbook ./ansible/site.yml -i hosts -c paramiko --ask-pass --ask-become-pass -u dftd

which results in the following error:

% ansible-playbook ./ansible/site.yml -i hosts -c paramiko --ask-pass --ask-become-pass -u dftd

SSH password: 
BECOME password[defaults to SSH password]: 

PLAY [dftd] ************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************
[WARNING]: Platform linux on host 127.0.0.1 is using the discovered Python interpreter at /usr/bin/python3.9, but
future installation of another Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-core/2.15/reference_appendices/interpreter_discovery.html for more information.
ok: [127.0.0.1]

TASK [Install ufw] *****************************************************************************************************
fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "Failed to update apt cache: unknown reason"}

PLAY RECAP *************************************************************************************************************
127.0.0.1                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

Any ideas?

Chapter 1 - umount /mnt exited with a nonzero status

I'm getting the following error when running Vagrant up in chapter one. I'm on Fedora 38 with Virtualbox 7.0.10 and guest editions installed via package manager.

Unmounting Virtualbox Guest Additions ISO from: /mnt
umount: /mnt: not mounted.
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 6.1.38
    default: VirtualBox Version: 7.0
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

umount /mnt

Stdout from the command:



Stderr from the command:

umount: /mnt: not mounted.

I even used vagrant ssh and confirmed there is no vagrant directory in either the home or root of the system.

M1 Pro Issues with network.

i am using M1 mac and here is my qemu commands that works

i aliased it though

alias qemu-devops='qemu-system-aarch64 -cpu cortex-a72 -smp cpus=4,sockets=1,cores=4,threads=1 -machine virt,highmem=off -accel hvf -accel tcg,tb-size=2048 -m 2G -initrd initrd.img-5.10.0-11-arm64 -kernel vmlinuz-5.10.0-11-arm64 -append "root=/dev/vda2 console=ttyAMA0" -drive if=virtio,file=debian-dftd-aarch64.qcow2,format=qcow2,id=hd -net user,hostfwd=tcp::10022-:22,hostfwd=tcp::20375-:2375,hostfwd=tcp::5001-:5000 -net nic -device intel-hda -device hda-duplex -nographic'

i do not know much but from the error i am getting i am thinking its a network issue cause when i run my qemu command
and i try to run the ansible playbook to set it up i get the following error on the the qemu shell

[   19.457612] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[   19.459610] Bridge firewalling registered
[   19.557540] Initializing XFRM netlink socket
[   56.165252] systemd-journald[190]: File /var/log/journal/c2ab053aa964497ba825c6ea95ed73c8/user-1000.journal corrupted or uncleanly shut down, renaming and replacing.

creating vm using qemu fails apple-silicon

Hello there,

I'm using a macbook with M2, 256GB, 16GB. I'm following the instructions under apple-silicon/qemu , after downloading the tar file, and running:

qemu-system-aarch64 -cpu cortex-a72 -smp cpus=4,sockets=1,cores=4,threads=1 -machine virt,highmem=off -accel hvf -accel tcg,tb-size=2048 -m 4G -initrd initrd.img-5.10.0-11-arm64 -kernel vmlinuz-5.10.0-11-arm64 -append "root=/dev/vda2 console=ttyAMA0" -drive if=virtio,file=debian-dftd-aarch64.qcow2,format=qcow2,id=hd -net user,hostfwd=tcp::10022-:22,hostfwd=tcp::20375-:2375,hostfwd=tcp::5001-:5000 -net nic -device intel-hda -device hda-duplex -nographic

I get this error and then bails out.

qemu-system-aarch64: Addressing limited to 32 bits, but memory exceeds it by 1073741824 bytes

Do you know what might be the issue?

PS: really enjoying the book so far :)

[Apple M1 Pro] SSH connection refused upon Debian login via QEMU

OS: OS X 13.5.2 (22G91)
Following the README, I executed:

Command:
qemu-system-aarch64 -cpu cortex-a72 -smp cpus=4,sockets=1,cores=4,threads=1 -machine virt,highmem=off -accel hvf -accel tcg,tb-size=2048 -m 2G -initrd initrd.img-5.10.0-11-arm64 -kernel vmlinuz-5.10.0-11-arm64 -append "root=/dev/vda2 console=ttyAMA0" -drive if=virtio,file=debian-dftd-aarch64.qcow2,format=qcow2,id=hd -net user,hostfwd=tcp::10022-:22,hostfwd=tcp::20375-:2375,hostfwd=tcp::5001-:5000 -net nic -device intel-hda -device hda-duplex -nographic
(I changed memory from 4G to 2G)

Attempt to login with SSH:

dftd@debian:~$ ssh [email protected] -p 10022
ssh: connect to host 127.0.0.1 port 10022: Connection refused
dftd@debian:~$

Is this expected?

Chapter 6, minikube env

Hey, I'm not sure if anyone else has run into this. I'm more educated in SDLC and QA so I'm a bit out of my realm playing with this stuff but for what it's worth:

Without including minikube docker-env - I would get this really confusing response. I couldn't quickly find the solution for.

jasen@Renegade:devOps(main*)$ eval $(minikube -p minikube docker-env)
W0315 18:45:42.516285    7508 main.go:291] Unable to resolve the current Docker CLI context "default": context "default" does not exist

I randomly ended up typing:

jasen@Renegade:devOps(main*)$ minikube docker --version
Error: unknown command "docker" for "minikube"

Did you mean this?
	docker-env

Run 'minikube --help' for usage.

And the magic happened.

minikube start --driver=virtualbox
# It's importat to start minikube's docker-env 
minikube docker-env
# export DOCKER_TLS_VERIFY="1"
# export DOCKER_HOST="tcp://192.168.59.105:2376"
# export DOCKER_CERT_PATH="/home/jasen/.minikube/certs"
# export MINIKUBE_ACTIVE_DOCKERD="minikube"
# To point your shell to minikube's docker-daemon, run:
# eval $(minikube -p minikube docker-env)
eval $(minikube -p minikube docker-env)

Additionally, if there is another version planned or something - I'd suggest providing more clarity around the "Installing the Docker Client and Setting Up Docker Environment Variables" Admittedly I am a bit happy to install new software and try things out I initally had docker installed locally with docker desktop and then realized that was a nightmare with VirtualBox so I took care of that and reinstalled the bins and that wouldn't recognize the minikube docker-env either. At one point I was confused if I needed to curl the bins inside of miniKube.

Installing the Docker Client and Setting Up Docker Environment Variables
To install the docker client, follow the instructions at https://docs.docker.com/engine/install/binaries/ for your local operating system. (Local is where VirtualBox is running.) Make sure you only download and install the client binary and follow the steps for copying the bin files to your /bin/ file. Youโ€™ll use minikube to set some local environment variables in your shell, including the Docker host IP and the path to the Docker host TLS certificates, which are needed to connect. The Bash eval command will source the environment variables in your shell. In a terminal, enter the following to set your Docker environment variables

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

Note: Anyone who has to sudo to get docker --version does not have the proper config.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.