Commit 46919ff0 authored by David Yu Yuan's avatar David Yu Yuan
Browse files

Merge branch 'latest' into 'master'

Latest to master

See merge request !166
parents 6250047a 412d6144
......@@ -56,53 +56,76 @@ If a sudor other than ubuntu is used, move the following two directories::
Exercise 0.0: Starting Minikube
-------------------------------
Start Minikube without a hypervisor (a.k.a Docker runtime)::
Start Minikube with Docker::
sudo minikube start --vm-driver=none
minikube start --vm-driver='docker'
The following message should be displayed when Minikube is started successfully::
😄 minikube v1.0.1 on linux (amd64)
🔥 Creating none VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
📶 "minikube" IP address is 10.0.0.5
🐳 Configuring Docker as the container runtime ...
🐳 Version of container runtime is 18.09.2
✨ Preparing Kubernetes environment ...
❌ Unable to load cached images: loading cached images: loading image /home/ubuntu/.minikube/cache/images/gcr.io/k8s-minikube/storage-provisioner_v1.8.1: stat /home/ubuntu/.minikube/cache/images/gcr.io/k8s-minikube/storage-provisioner_v1.8.1: no such file or directory
💾 Downloading kubeadm v1.14.1
💾 Downloading kubelet v1.14.1
🚜 Pulling images required by Kubernetes v1.14.1 ...
🚀 Launching Kubernetes v1.14.1 using kubeadm ...
⌛ Waiting for pods: apiserver proxy etcd scheduler controller dns
🔑 Configuring cluster permissions ...
🤔 Verifying component health .....
🤹 Configuring local host environment ...
⚠️ The 'none' driver provides limited isolation and may reduce system security and reliability.
⚠️ For more information, see:
👉 https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md
⚠️ kubectl and minikube configuration will be stored in /home/ubuntu
⚠️ To use kubectl or minikube commands as your own user, you may
⚠️ need to relocate them. For example, to overwrite your own settings:
▪ sudo mv /home/ubuntu/.kube /home/ubuntu/.minikube $HOME
▪ sudo chown -R $USER $HOME/.kube $HOME/.minikube
💡 This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true
💗 kubectl is now configured to use "minikube"
🏄 Done! Thank you for using minikube!
(Optional) Note that ~/.kube/config is owned by root. Run `chown` to avoid using `sudo` all the time::
sudo chown -R $USER $HOME/.kube $HOME/.minikube
😄 minikube v1.17.1 on Ubuntu 18.04 (amd64)
✨ Using the docker driver based on user configuration
👍 Starting control plane node minikube in cluster minikube
🚜 Pulling base image ...
💾 Downloading Kubernetes v1.20.2 preload ...
> preloaded-images-k8s-v8-v1....: 491.22 MiB / 491.22 MiB 100.00% 18.07 Mi
🔥 Creating docker container (CPUs=2, Memory=2200MB) ...
❗ This container is having trouble accessing https://k8s.gcr.io
💡 To pull new external images, you may need to configure a proxy: https://minikube.sigs.k8s.io/docs/reference/networking/proxy/
🐳 Preparing Kubernetes v1.20.2 on Docker 20.10.2 ...
▪ Generating certificates and keys ...
▪ Booting up control plane ...
▪ Configuring RBAC rules ...
🔎 Verifying Kubernetes components...
🌟 Enabled addons: storage-provisioner, default-storageclass
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
Enable addons such as metrics-server and ingress by running the following::
minikube addons enable metrics-server
minikube addons enable ingress
Verify the right addons are enabled::
minikube addons list
|-----------------------------|----------|--------------|
| ADDON NAME | PROFILE | STATUS |
|-----------------------------|----------|--------------|
| ambassador | minikube | disabled |
| csi-hostpath-driver | minikube | disabled |
| dashboard | minikube | disabled |
| default-storageclass | minikube | enabled ✅ |
| efk | minikube | disabled |
| freshpod | minikube | disabled |
| gcp-auth | minikube | disabled |
| gvisor | minikube | disabled |
| helm-tiller | minikube | disabled |
| ingress | minikube | enabled ✅ |
| ingress-dns | minikube | disabled |
| istio | minikube | disabled |
| istio-provisioner | minikube | disabled |
| kubevirt | minikube | disabled |
| logviewer | minikube | disabled |
| metallb | minikube | disabled |
| metrics-server | minikube | enabled ✅ |
| nvidia-driver-installer | minikube | disabled |
| nvidia-gpu-device-plugin | minikube | disabled |
| olm | minikube | disabled |
| pod-security-policy | minikube | disabled |
| registry | minikube | disabled |
| registry-aliases | minikube | disabled |
| registry-creds | minikube | disabled |
| storage-provisioner | minikube | enabled ✅ |
| storage-provisioner-gluster | minikube | disabled |
| volumesnapshots | minikube | disabled |
|-----------------------------|----------|--------------|
Verify that Minicube is working and you can access it. You should see the following message::
kubectl get node
NAME STATUS ROLES AGE VERSION
minikube Ready master 3m59s v1.14.3
NAME STATUS ROLES AGE VERSION
minikube Ready control-plane,master 12m v1.20.2
Now, you have a Kubernetes environment to develop and to test your workload. Never use it for production though.
......
......@@ -54,7 +54,7 @@ Course guidelines
+------------------------+----------+-------------------------------------------------------------------------------------------------------+
| 16:30 - 16:45 | 15 min | `GitLab Auto DevOps`_ |
+------------------------+----------+-------------------------------------------------------------------------------------------------------+
| 16:45 - 17:05 | 20 min | Demo: GitLab Auto DevOps |
| 16:45 - 17:05 | 20 min | `Demo - GitLab Auto DevOps`_ |
+------------------------+----------+-------------------------------------------------------------------------------------------------------+
| 17:05 - 18:00 | 55 min | Q&A, continue with practicals |
+------------------------+----------+-------------------------------------------------------------------------------------------------------+
......@@ -87,6 +87,7 @@ Course guidelines
.. _Creating Containers with Docker: ../../_static/pdf/resops2020/Creating-Containers-with-Docker.pdf
.. _Introduction to Gitlab: ../../_static/pdf/resops2020/Introduction-to-Gitlab.pdf
.. _GitLab Auto DevOps: ../../_static/pdf/resops2020/Gitlab_Auto-DevOps.pdf
.. _Demo - GitLab Auto DevOps: https://drive.google.com/file/d/1atLANuG8Com64I0TBdcXUER8IlgucE_O/view?usp=sharing
.. _Kubernetes 101: ../../_static/pdf/resops2020/Kubernetes-101.pdf
.. _Overview of Kubernetes (Demo): ../../_static/pdf/resops2020/KubernetesPracticalsDemo.pdf
.. _Overview of K8S Practical: ../../_static/pdf/resops2020/KubernetesPracticals.pdf
......
......@@ -13,4 +13,5 @@ source ~/Downloads/ResOps-openrc.sh
terraform init "${DIR}/kubespray/contrib/terraform/openstack"
# Destroy a deployment. It is a good idea not to use auto-approval.
terraform destroy -lock=false
\ No newline at end of file
# -lock=false
terraform destroy
\ No newline at end of file
......@@ -14,9 +14,9 @@ source ~/Downloads/ResOps-openrc.sh
terraform init "${DIR}/kubespray/contrib/terraform/openstack"
# It is a good idea to create a plan first. The input values can be provided with var-files.
#
terraform plan -lock=false -var-file "${DIR}/resops.tf" -out "${DIR}/kubespray/out.plan" "${DIR}/kubespray/contrib/terraform/openstack"
# -lock=false
terraform plan -var-file "${DIR}/resops.tf" -out "${DIR}/kubespray/out.plan" "${DIR}/kubespray/contrib/terraform/openstack"
# Apply the changes planned explicitly. Terraform does not guarantee plan and apply generates the same plan. Thus, it is a good idea to provide an explicit plan and turn on the auto approval.
#
terraform apply -lock=false -auto-approve "${DIR}/kubespray/out.plan"
# -lock=false
terraform apply -auto-approve "${DIR}/kubespray/out.plan"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment