Skip to content

Commit

Permalink
chore: commit save point
Browse files Browse the repository at this point in the history
  • Loading branch information
mmmarceleza committed Jan 28, 2025
1 parent de28427 commit 7fa67d3
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 17 deletions.
8 changes: 8 additions & 0 deletions helm/test-basic-app/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v2
name: basic-app
type: application
version: 0.0.10
dependencies:
- name: basic-app
version: 0.0.10
repository: "https://charts.getup.io/getupcloud"
2 changes: 2 additions & 0 deletions helm/test-basic-app/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
basic-app:
replicaCount: 2
4 changes: 2 additions & 2 deletions vagrant/kubernetes/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ systemctl restart containerd

echo "[TASK 6] Add apt repo for kubernetes"
apt install -qq -y apt-transport-https ca-certificates curl >/dev/null 2>&1
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.28/deb/ /' > /etc/apt/sources.list.d/kubernetes.list
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.31/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.31/deb/ /' > /etc/apt/sources.list.d/kubernetes.list
#apt install -qq -y apt-transport-https ca-certificates curl >/dev/null 2>&1
#curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
#echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
Expand Down
2 changes: 1 addition & 1 deletion vagrant/kubernetes/bootstrap_kmaster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ echo "[TASK 1] Pull required containers"
kubeadm config images pull >/dev/null 2>&1

echo "[TASK 2] Initialize Kubernetes Cluster"
kubeadm init --apiserver-advertise-address=172.16.16.100 --pod-network-cidr=192.168.0.0/16 >> /root/kubeinit.log 2>/dev/null
kubeadm init --apiserver-advertise-address=192.168.56.2 --pod-network-cidr=192.168.0.0/16 >> /root/kubeinit.log 2>/dev/null

echo "[TASK 3] Deploy Calico network"
kubectl --kubeconfig=/etc/kubernetes/admin.conf create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.3/manifests/calico.yaml >/dev/null 2>&1
Expand Down
24 changes: 14 additions & 10 deletions vagrant/multivm/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,28 @@
#--------------------------------------------------------------
Vagrant.configure("2") do |config|

NodeCount = 3
# Stderr: VBoxManage: error: Out of memory condition when allocating memory with low physical backing. (VERR_NO_LOW_MEMORY)
# solution: echo 3 > /proc/sys/vm/drop_caches
NodeCount = 4

(1..NodeCount).each do |i|

config.vm.define "machine#{i}" do |node|

#node.vm.box = "generic/ubuntu2004"
node.vm.box = "generic/rhel8"
# node.vm.box = "generic/ubuntu2004"
# node.vm.box = "generic/rhel8"
node.vm.box = "generic/oracle8"
node.vm.box_check_update = false
#node.vm.box_version = "4.2.8"
node.vm.box_version = "4.2.16"
node.vm.hostname = "machine#{i}.example.com"
# node.vm.box_version = "4.2.8"
node.vm.box_version = "4.3.12"
node.vm.hostname = "machine#{i}.marceleza.local"

node.vm.network "private_network", ip: "172.16.16.10#{i}"
node.vm.network "private_network", ip: "192.168.56.10#{i}"

node.vm.provider :libvirt do |v|
v.memory = 2048
v.nested = true
# node.vm.provider :libvirt do |v|
node.vm.provider :virtualbox do |v|
v.memory = 4096
# v.nested = true
v.cpus = 2
end

Expand Down
9 changes: 5 additions & 4 deletions vagrant/singlevm/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# VARIABLES
#--------------------------------------------------------------

#VAGRANT_BOX = "generic/ubuntu2204"
VAGRANT_BOX = "generic/arch"
VAGRANT_BOX = "generic/ubuntu2204"
# VAGRANT_BOX = "generic/arch"
VAGRANT_BOX_VERSION = "4.3.6"
CPUS = 2
MEMORY = 2048
Expand All @@ -30,7 +30,8 @@ Vagrant.configure("2") do |config|
#----------------------------------------------------------
# Configuration of the provider and its specs
#----------------------------------------------------------
config.vm.provider "libvirt" do |v|
config.vm.provider "virtualbox" do |v|
# config.vm.provider "libvirt" do |v|
v.memory = MEMORY
v.cpus = CPUS
end
Expand Down Expand Up @@ -60,7 +61,7 @@ Vagrant.configure("2") do |config|
# config.vm.network "private_network", type: "dhcp"

## Private network with a static ip
config.vm.network "private_network", ip: "192.168.50.2"
config.vm.network "private_network", ip: "192.168.56.2"

## Forward guest port to host
config.vm.network "forwarded_port", guest: 80, host: 8080
Expand Down

0 comments on commit 7fa67d3

Please sign in to comment.