-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworking-on-it
149 lines (110 loc) · 4.93 KB
/
working-on-it
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# Goal
Go through to install all dependencies/binaries/plugins/set $PATH(s):/ core program installs
and document seperate steps - ie: qemu/kvm/and virt manager, /docker/k8s/vs code/, all $PATH:/.bashrc, access dashboards (kubernetes, jupyter labs, strelka)
Ubuntu 24.10>amd
Docker
Getting started!
# DOWNLOAD DOCKER
modprobe kvm
modprobe kvm_intel # Intel processors
modprobe kvm_amd # AMD processors
kvm-ok # View the diagnostics
lsmod | grep kvm # Check if the KVM modules are enabled
ls -al /dev/kvm # Check ownership
sudo usermod -aG kvm $USER # Add your user to group
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
# Install Docker packages:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Verify the installation:
sudo docker run hello-world
# Download latest deb package
# https://desktop.docker.com/linux/main/amd64/docker-desktop-amd64.deb?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-linux-amd64&_gl=1*kkt779*_gcl_au*MTg3OTA0NTQ4NS4xNzM2Mjg3OTc2*_ga*MTIyNzg5ODA4Mi4xNzM2Mjg3OTc3*_ga_XJWPQMJYHQ*MTczNjI4Nzk3Ni4xLjEuMTczNjI4OTI2OS40OS4wLjA.
# Install the package with apt as follows:
sudo apt-get update
sudo apt-get install ./docker-desktop-amd64.deb
# At the end of the installation process, apt displays an error due to installing a downloaded package. You can ignore this error message.
# N: Download is performed unsandboxed as root, as file '/home/user/Downloads/docker-desktop.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
# Check versions of binaries
$ docker compose version
Docker Compose version v2.29.1
$ docker --version
Docker version 27.1.1, build 6312585
$ docker version
Client:
Version: 23.0.5
API version: 1.42
Go version: go1.21.12
<...>
# Initialize pass by using a gpg key
gpg --generate-key # Follow the prompts
pass init <your_generated_gpg-id_public_key>
# Launch Docker Desktop:
systemctl start docker
systemctl --user start docker-desktop
# Quit Docker Desktop
systemctl --user stop docker-desktop
# Enable Docker Desktop to start on sign in
# Open Docker Desktop and go to Settings > General, then select Start Docker Desktop when you log in or:
systemctl --user enable docker-desktop
# Update Docker Desktop
sudo apt-get install ./docker-desktop-<arch>.deb # Replace <arch> with the architecture of your system
KUBERNETES
Getting started!
# DOWNLOAD KUBERNETES
#Install helm
1. Download the latest release with the command:
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
2. Checksum
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256"
3. Validate
echo "$(cat kubectl.sha256) kubectl" | sha256sum --check
4. Install kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
5. Test to ensure the version you installed is up-to-date:
kubectl version –-client
or
kubectl version --client –-output=yaml
6. Install GO
golang.org/dl/>copy link location
wget url
ll
tar -xzvf <file>
./go/bin/go
sudo mv go /usr/local/
ll /usr/local
vi ~/.bashrc
# Add go to path
export PATH=$PATH:/usr/local/go/bin
source ~/.bash.rc
7. Install kind
/** Kind is well-suited for CI/CD environments **/
go install sigs.k8s.io/[email protected]
8. Install minikube
/** single node/ better for testing applications in a production-like environment **/
curl -LO https://github.com/kubernetes/minikube/releases/latest/download/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube && rm minikube-linux-amd64
9. Install Helm
# Download desired version
https://github.com/helm/helm/releases
tar -zxvf helm-v3.0.0-linux-amd64.tar.gz
mv linux-amd64/helm /usr/local/bin/helm
#Initialize a Helm repo
helm repo add bitnami https://charts.bitnami.com/bitnami
# Deploy a Helm Release named "kubernetes-dashboard" using the kubernetes-dashboard chart
helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard
/** Now, vscode>kubernetes ext>Helm repos dropdown will display Bitnami and kubernetes-dashboard **/
# Add kubernetes-dashboard repository
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
# Add kubernetes-dashboard to cluster
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/