Skip to content

Commit 26df8d0

Browse files
committed
Add more workers and tools
1 parent e52df7d commit 26df8d0

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

Vagrantfile

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ VAGRANTFILE_API_VERSION = "2"
55

66
server_hostname="master"
77
server_ip="10.20.90.60"
8-
server_vnc_port=5910
8+
server_vnc_port=5905
99

1010
workers = [
11-
{ :hostname => "worker1", :ip => "10.20.90.61", :vnc_port => 5911 },
12-
{ :hostname => "worker2", :ip => "10.20.90.62", :vnc_port => 5912 },
13-
{ :hostname => "worker3", :ip => "10.20.90.63", :vnc_port => 5913 }
11+
{ :hostname => "worker1", :ip => "10.20.90.61", :vnc_port => 5906 },
12+
{ :hostname => "worker2", :ip => "10.20.90.62", :vnc_port => 5907 },
13+
{ :hostname => "worker3", :ip => "10.20.90.63", :vnc_port => 5908 },
14+
{ :hostname => "worker4", :ip => "10.20.90.64", :vnc_port => 5909 },
15+
{ :hostname => "worker5", :ip => "10.20.90.65", :vnc_port => 5910 }
1416
]
1517

1618
$write_server_config=<<SCRIPT
@@ -46,6 +48,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
4648
apt-get update -y
4749
apt-get install -y git vim curl build-essential openssh-server
4850
apt-get install -y jq open-iscsi nfs-common
51+
52+
echo "export CRI_CONFIG_FILE=/var/lib/rancher/rke2/agent/etc/crictl.yaml" >> /root/.bashrc
53+
echo "export PATH=$PATH:/var/lib/rancher/rke2/bin" >> /root/.bashrc
4954
SHELL
5055

5156
# Server node
@@ -83,6 +88,18 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8388
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
8489
apt-get update -y
8590
apt-get install -y docker-ce docker-ce-cli containerd.io
91+
92+
echo "root:vagrant" | chpasswd
93+
94+
echo "source <(kubectl completion bash)" >> /root/.bashrc
95+
echo "alias k='kubectl'" >> /root/.bashrc
96+
echo "complete -F __start_kubectl k" >> /root/.bashrc
97+
echo "alias kl='kubectl -n longhorn-system'" >> /root/.bashrc
98+
echo "complete -F __start_kubectl kl" >> /root/.bashrc
99+
100+
git config --global user.name "Derek Su"
101+
git config --global user.email [email protected]
102+
git config --global core.editor vim
86103
SHELL
87104
end
88105

init.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
export LIBVIRT_DEFAULT_URI="qemu:///system"

0 commit comments

Comments
 (0)