forked from konstructio/kubefirst
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: DrummyFloyd <[email protected]>
- Loading branch information
DrummyFloyd
committed
Oct 28, 2023
1 parent
e160d01
commit 186efe7
Showing
13 changed files
with
904 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
-----BEGIN OPENSSH PRIVATE KEY----- | ||
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn | ||
NhAAAAAwEAAQAAAYEAptpOX9wkTve5E5qkV8wgGqs7t25BM2EuV3l9AMgGFT5txDyt34TV | ||
VC3+7DcsCBML3j4jY1Fx8bRuS3+pqKkMmivbpy7el6pVBcV/a52KBDXLWmtwzh0cKrkjDV | ||
kl0ljPzMvPCFMggMCZN3wU0JS7attUTQ3xYq6uR9TqDt7p4rJsIjfQcB7feKqaJQ2WU910 | ||
9T0CMCR879Z3H5vNkEhOejHNQJ+U0R0WnXsSIsces2gAN7dFPPfYg3w6hs3b2ErsrQC1MO | ||
eKRcT9xczc++fkZO0p88cHs7Q0W0vWVCm4JjfRJi62CcztlGL6YmEffG726Aq2kbQrnVOX | ||
D5i7H4erJlbuyQR9GzJBQp1IZAiYb2x5y+2m9c8Ch2ia/8h/jKkdkW6P1t3Wv4+ujnYfPy | ||
cOz6V8Al902v5wPo6pmxW4yObmp8/1aedi8tRgl6+az+mDaG4in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cnuqTP2ol+S0/x1Sf46gIXmrv6BHcEag/856k | ||
XI5+MD/1QKhNquyQMgZ8Nb9Bm9Zs1cIt1XL/ZUJt2FSA/bpxU7fVxPKYbZO6jpYX5RAAAA | ||
wQCDw++1SfyOxsndUUulhn0gmL1XeStMqe/uOtOagTW5uJ7psgRoS6YVZjVdFnDWZYnkgd | ||
Z95JVISSmYjMJNSDOSvLIvPjslSuN4EHSrFPYEWl9K2Y4xJFYS6iNlGllTxzs1EsOczIEl | ||
rTm7D+6Zy/mvXdHm+uU7O9FotkBuCAJv1cU+c6/Qh4RUP5zkhSrnDWKTZ+hNekNrk36QzB | ||
Qf4XBEpSD38dJAty1wiw5awxC8IRoe0Kw+qn7y9HTJ5McwJ28AAADBAM8tN6heahz072F+ | ||
tjXYfBtXHy0aWM2dTXROadimB1MM8z3rnd4QiS1ZWzbHTvoQey2O1kqsHRh4pb/m34b4sz | ||
7U9oT3MA5/FKEmv/jo8XmEBCPLc4569myDlnUDMgv9gTtA32jOXX7L+/+MGiYOnHz0Drtl | ||
EcZrlkXkgWHc9e8mK37yQlhwjxcghxQrOIWpAMTg+9E63Dc4hxjHdNs73qwRaQJgEfsfzy | ||
PAgkFtraILzRuknpCWUsbnqwLQ0HmAkQAAAMEAzixioASGX8jDrc8wwergGnitju95Pvts | ||
V68RiNmP3YYJORKrahzXe86LZTw8Xi4skOp9Tr05l0iTohZYIOFc5gu70CiAGDY3WbZPdL | ||
jJNAr0BCxA1HABP0I6QetZ2pbkDmYbcsfEewLmG/ZU4jOqIoJMFk/bqOMQI9bv8NZFC84b | ||
GnfqXlgHe9L+2erOCSAVLI2bHSVyrPGU46eM+uqyKx7CGx0k5CB5CxEQttX3mtdAATxLyb | ||
hZweShsfkOZTlPAAAAD2ptb25uZXRAam1vbm5ldAECAw== | ||
-----END OPENSSH PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCm2k5f3CRO97kTmqRXzCAaqzu3bkEzYS5XeX0AyAYVPm3EPK3fhNVULf7sNywIEwvePiNjUXHxtG5Lf6moqQyaK9unLt6XqlUFxX9rnYoENctaa3DOHRwquSMNWSXSWM/My88IUyCAwJk3fBTQlLtq21RNDfFirq5H1OoO3unismwiN9BwHt94qpolDZZT3XT1PQIwJHzv1ncfm82QSE56Mc1An5TRHRadexIixx6zaAA3t0U899iDfDqGzdvYSuytALUw54pFxP3FzNz75+Rk7SnzxweztDRbS9ZUKbgmN9EmLrYJzO2UYvpiYR98bvboCraRtCudU5cPmLsfh6smVu7JBH0bMkFCnUhkCJhvbHnL7ab1zwKHaJr/yH+MqR2Rbo/W3da/j66Odh8/Jw7PpXwCX3Ta/nA+jqmbFbjI5uanz/Vp52Ly1GCXr5rP6YNobiKeg/7lag5y2okC4vQGUVZi63CIDEMwO1Agaq8guzx9BVGbwlwQ4HKP3ApT9b8= jmonnet@jmonnet |
1 change: 1 addition & 0 deletions
1
vagrant-test/.vagrant/machines/machine1/virtualbox/action_set_name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1695938830 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
f753599b-e3dc-42e5-9b14-7d81606ac285 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2cc40af2d213404a88c2cb931804e0fe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/home/jmonnet/Documents/01-perso/kubefirst/vagrant-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This file loads the proper rgloader/loader.rb file that comes packaged | ||
# with Vagrant so that encoded files can properly run with Vagrant. | ||
|
||
if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"] | ||
require File.expand_path( | ||
"rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]) | ||
else | ||
raise "Encoded files can't be read outside of the Vagrant installer." | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
MASTER_COUNT = 3 | ||
IMAGE = 'ubuntu/mantic64' | ||
# | ||
# ... | ||
# | ||
# Vagrant.configure("2") do |config| | ||
# | ||
# (1..MASTER_COUNT).each do |i| | ||
# config.ssh.insert_key = false | ||
# config.vm.define "kubemaster#{i}" do |kubemasters| | ||
# kubemasters.vm.box = IMAGE | ||
# kubemasters.vm.hostname = "kubemaster#{i}" | ||
# kubemasters.vm.network :private_network, ip: "10.0.0.#{i+10}" | ||
# kubemasters.vm.provision "file", source: "~/.ssh/id_ed25519.pub", destination: "/tmp/id_ed25519.pub" | ||
# kubemasters.vm.provision "file", source: "~/.ssh/id_ed25519", destination: "/tmp/id_ed25519" | ||
# kubemasters.vm.provision "shell", privileged: true, path: "scripts/master_install.sh" | ||
# end | ||
# end | ||
# | ||
# end | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure(2) do |config| | ||
# Configuration de base pour toutes les machines | ||
config.vm.box = IMAGE | ||
|
||
# Configuration de la clé SSH | ||
|
||
# Configuration des machines individuelles | ||
(1..MASTER_COUNT).each do |i| | ||
config.vm.define "kubemaster#{i}" do |machine| | ||
machine.vm.network :private_network, type: 'static', ip: "10.0.0.#{10 + i}" | ||
machine.vm.hostname = "kubemaster#{i}" | ||
machine.vm.provision 'file', source: '~/.ssh/id_ed25519.pub', destination: '/tmp/id_ed25519.pub' | ||
machine.vm.provision 'shell', privileged: true, inline: <<-SHELL | ||
echo $(cat /tmp/id_ed25519.pub) >> /home/vagrant/.ssh/authorized_keys | ||
echo "10.0.0.11 kubemaster1" >>/etc/hosts | ||
echo "10.0.0.12 kubemaster2" >>/etc/hosts | ||
echo "10.0.0.13 kubemaster3" >>/etc/hosts | ||
SHELL | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
# based on https://tferdinand.net/creer-un-cluster-kubernetes-local-avec-vagrant/ | ||
# Deploy keys to allow all nodes to connect each others as root | ||
mv /tmp/id_ed25519* /root/.ssh/ | ||
# | ||
chmod 400 /root/.ssh/id_ed25519* | ||
chown root:root /root/.ssh/id_ed25519* | ||
# | ||
cat /root/.ssh/id_ed25519.pub >>/root/.ssh/authorized_keys | ||
chmod 400 /root/.ssh/authorized_keys | ||
chown root:root /root/.ssh/authorized_keys | ||
|
||
# Add current node in /etc/hosts | ||
echo "127.0.1.1 $(hostname)" >>/etc/hosts | ||
|
||
# If we are on first node, launch k3s with cluster-init, else we join the existing cluster | ||
# curl -sfL https://get.k3s.io | sh - |
Oops, something went wrong.