Skip to content

Commit

Permalink
Merge pull request #9 from bcochofel/upgrade_k8s
Browse files Browse the repository at this point in the history
feat: upgrade kubernetes
  • Loading branch information
bcochofel authored Mar 27, 2021
2 parents 36dc237 + 0280a52 commit 3b2300c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
## [Unreleased]


<a name="1.0.1"></a>
## [1.0.1] - 2021-03-27
### Feat
- upgrade kubernetes


<a name="1.0.0"></a>
## [1.0.0] - 2021-01-23

<a name="0.1.0"></a>
## 0.1.0 - 2021-01-23
### Feat
Expand All @@ -15,6 +24,7 @@
- github actions job name

### Pull Requests
- Merge pull request [#8](https://github.com/bcochofel/vagrant-kubespray/issues/8) from bcochofel/fix_gh_actions
- Merge pull request [#7](https://github.com/bcochofel/vagrant-kubespray/issues/7) from bcochofel/first_release
- Merge pull request [#6](https://github.com/bcochofel/vagrant-kubespray/issues/6) from bcochofel/some-fixes
- Merge pull request [#5](https://github.com/bcochofel/vagrant-kubespray/issues/5) from bcochofel/github-actions
Expand All @@ -24,4 +34,6 @@
- Merge pull request [#1](https://github.com/bcochofel/vagrant-kubespray/issues/1) from bcochofel/initial-commit


[Unreleased]: https://github.com/bcochofel/vagrant-kubespray/compare/0.1.0...HEAD
[Unreleased]: https://github.com/bcochofel/vagrant-kubespray/compare/1.0.1...HEAD
[1.0.1]: https://github.com/bcochofel/vagrant-kubespray/compare/1.0.0...1.0.1
[1.0.0]: https://github.com/bcochofel/vagrant-kubespray/compare/0.1.0...1.0.0
12 changes: 8 additions & 4 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# vi: set ft=ruby :

# Check for missing plugins
required_plugins = %w(vagrant-hostmanager vagrant-scp vagrant-env)
required_plugins = %w(vagrant-hostmanager vagrant-env)
plugin_installed = false
required_plugins.each do |plugin|
unless Vagrant.has_plugin?(plugin)
Expand All @@ -22,12 +22,12 @@ end
VAGRANTFILE_API_VERSION = "2"
DEFAULT_BOX_NAME = "bento/ubuntu-20.04"

kubespray_ver = ENV["KUBESPRAY_VER"] || "v2.14.2"
kubespray_ver = ENV["KUBESPRAY_VER"] || "v2.15.0"
kube_version = ENV["KUBE_VERSION"] || "v1.18.10"
kube_network_plugin = ENV["KUBE_NETWORK_PLUGIN"] || "calico"
cluster_name = ENV["CLUSTER_NAME"] || "k8slab"
dns_domain = ENV["DNS_DOMAIN"] || "cluster.local"
terraform_ver = ENV["TERRAFORM_VER"] || "0.14.3"
terraform_ver = ENV["TERRAFORM_VER"] || "0.14.9"

# control node
ctrlnodes = [
Expand All @@ -36,7 +36,7 @@ ctrlnodes = [
:ip => "192.168.77.10",
:ram => 2048,
:cpus => 2,
:box => "bento/ubuntu-18.04"
:box => "bento/ubuntu-20.04"
}
]

Expand Down Expand Up @@ -157,6 +157,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
m.path = "scripts/preinst.sh"
end

# copy files
config.vm.provision "file", source: "/tmp/vagrant_rsa", destination: "~/.ssh/id_rsa"
config.vm.provision "file", source: "./ansible.cfg", destination: "~/.ansible.cfg"

# kubernetes
config.vm.provision "k8s", type: "shell", run: "never", privileged: false do |m|
m.path = "scripts/k8s.sh"
Expand Down
8 changes: 1 addition & 7 deletions scripts/trigger_after.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
#!/bin/bash

# copy private key to controller
vagrant scp /tmp/vagrant_rsa controller:~/.ssh/id_rsa

# copy ansible.cfg
vagrant scp ./ansible.cfg controller:~/.ansible.cfg

# copy public key to nodes
PUB_KEY=$(cat /tmp/vagrant_rsa.pub)
vagrant ssh node01 -- "echo $PUB_KEY >> ~/.ssh/authorized_keys"
vagrant ssh node02 -- "echo $PUB_KEY >> ~/.ssh/authorized_keys"
vagrant ssh node03 -- "echo $PUB_KEY >> ~/.ssh/authorized_keys"
rm -f /tmp/vagrant_rsa*
#rm -f /tmp/vagrant_rsa*

exit 0

0 comments on commit 3b2300c

Please sign in to comment.